|
or
System.Web.HttpContext.Current.Request.LogonUserIdentity.Name;
if you want the SAMAccountName
or
public string Whoami()
{
string str;
int idx;
str = System.Web.HttpContext.Current.Request.LogonUserIdentity.Name;
idx = str.IndexOf("\\");
return str.Substring(idx + 1);
}
if you don't want the Domain in there.
..and water fell from the sky like rain.
|
|
|
|
|
I have a huge tree that is made in visual studio 2005 Windows application, it is made using the designer, and I would like to take this tree to an ASP.Net application. I tried copy paste the control but it didn't work lol...
So is their a way i can move this tree from the windows application to the web application? Or I have to redesign it from zero?
Thank you in Advance
|
|
|
|
|
The treeview control in a Windows application is located in the System.Windows.Forms namespace. In an ASP.NET application, you need to use the treeview control in the System.Web.UI.WebControls namespace. As these are two different controls, you will have to re-create the treview from scratch in your ASP.NET application.
|
|
|
|
|
No Dear, web is very deferent environment. it's controls visualization is based on rendering them to HTML tags.
you can just use the TreeView control available in the 'Navigation' tab in the Toolbox.
if you nead to build your custom Controls you can inhert from System.Web.UI.WebControls.WebControl .
for anyy further assist please contact me on ali.alomairi@hotmail.com
100
Help people,so poeple can help you.
|
|
|
|
|
I required sourcecode for online admission system.
|
|
|
|
|
sunny mehra wrote: I required sourcecode for online admission system
Then, this is not the right forum for you.
Search in CodePlex or google. I m sure you will get many similar applications.
If you are facing some issue during your development, ask for help.
|
|
|
|
|
This is either homework or you've taken on a job for which you are woefully lacking in ability. Either way, this is the wrong place to ask.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
This is wrong place to ask. Plus try Google first!
|
|
|
|
|
So your question is "I require someone to do my job for me"?
Neato, what do you intend to do with your day, sun your self in the Bahamas or just kick back with a nice coffee and a good read perhaps?
|
|
|
|
|
Hello Experts!
I am from U.K. and my server hosted in U.S.
I am using Ajax Calender on my page. Ajax Calender Date Format (MM/dd/yyyy) is working fine for retrieving particular data from SQL Server (Localhost and Web Server). But I need U.K. date format which is dd/MM/yyyy. For this reason I have used the following function:
Private Function SelectDate() As String<br />
Dim NewDate As String = ""<br />
Try<br />
Dim SelectedDate As DateTime = txtSelectDate.Text.ToString()<br />
NewDate = SelectedDate.ToString("MM/dd/yyyy")<br />
Catch ex As Exception<br />
lblmessage.Text = "Please put a valid date !! (date format should be dd/mm/yyyy)"<br />
End Try<br />
Return NewDate<br />
End Function
It's working fine on localhost but the problem is:
After publishing on hosting server it's not working properly. Ajax Calender format is dd/MM/yyyy but after clicking btnSearch date format is being changed to MM/dd/yyyy! and I can not retrieve correct information.
Waiting for your advise!
|
|
|
|
|
First, add this page directive to your page: Culture="en-GB" .
Then set the Format attribute of the CalendarExtender as: Format="dd/MM/yyyy" .
Here is the declaration for one I have just used and it works fine:
<asp:TextBox ID="txtDateTo" runat="server" Columns="8"/>
<asp:CalendarExtender ID="txtDateTo_CalendarExtender" runat="server" TargetControlID="txtDateTo" Format="dd/MM/yyyy"/>
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
thanks for your quick reply.
Columns="8" what does it mean?
|
|
|
|
|
I tend to use columns rather than width for text controls as it denotes the number of characters wide the control should be rather than an arbitrary width.
TextBox.Columns Property[^]
ps If you like my answer then vote for it!!!
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
sorry! brother its not working
when date is like 28/02/2011 no output
when date is from 01/02/2011 to 12/02/2011 its working fine
its not showing any data after 12th day of month
like 13/02/2011 to 28/02/2011 doesn't work
any other solution !!!
if Ajax Calender date format is MM/dd/yyyy its working fine with no prob
if Ajax Calender date format is dd/MM/yyyy its working not properly
any other idea
|
|
|
|
|
guys, i got the exception
Sys.ScriptLoadFailedException: The script '...' contains multiple calls to Sys.Application.notifyScriptLoaded(). Only one is allowed.]
while i was calling the method UpdatePanel.Update();
any one has an idea.
|
|
|
|
|
hi, ali;
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
does this line of code remind you with some thing?
|
|
|
|
|
well ..., I guess it does.
100
Help people,so poeple can help you.
|
|
|
|
|
Hi guys,
I have explained my probs here..,
this problem is occuring in IE browser only...,Mozila its working fine...,
Plz click on the following url in IE browser
http://www.justtrade.in/Portfoliotracker/Default.aspx
U will see "Registered User" link plz click tht one..., u will get a login page, with out changing the browser url...,becoz its opening in an iframe...,
so, the login page also in an iframe...,
here if i am trying to login a user...,if the user is authenticated...,
i am using his user name as session...,and redirecting him to home page...,
but, if the valid user login also, its redirecting him to login page only...,
this problem in IE browser only...,Mozila its working fine...,
can u plz tell me y its not working in IE? and how to solve this one?
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
guys, you know the function 'Page_Validate('validationgroup') ' we use to validate controls?
I need the opposite of it (e.i. hide all validators within a certain group.
waiting for your replays;
Help people,so poeple can help you.
|
|
|
|
|
That method does not exist. You will have to code one yourself.
|
|
|
|
|
Why!!? .... !!!
Help people,so poeple can help you.
|
|
|
|
|
Because not all methods exist and there is no business requirements which would require to do this in most applications. If everything would exist we wouldn't need sites like codeproject or developers like me and you.
You could also argue that it's the fault of Bill Gates, Steve Jobs, Google, Obama, Paris Hilton, Lady Gaga, Einstein or the creators of South Park, but I doubt they'll care...
|
|
|
|
|
JV9999 wrote: there is no business requirements which would require to do this in most applications.
For certain values of most.
My Boss' Boss wanted all these fields to be required, but also wanted to let the user "save for later", i.e. submit the data without finalizing the submission.
Would be nice to be able to just turn off the validation in one swell foop in cases like that.
..and water fell from the sky like rain.
|
|
|
|
|
That's gonna be a problem with a maxlength validation when you entered 50 characters and the database only allows 20... So even in that case you should validate before partially saving.
|
|
|
|
|
Or maxlength the textboxes, etc.
I hate web apps.
"We need a web application for this."
"How many users are there going to be?"
"Three"
..and water fell from the sky like rain.
|
|
|
|