johnhardy
asked on
insert windows username in insert field
I am using asp in windows XP and have a insert field for the username.
Is there a way I can get the name of the windows account holder name to appear in the username text field.
many thanks
John
Is there a way I can get the name of the windows account holder name to appear in the username text field.
many thanks
John
Where is the account holder's name stored? Are you using a site with anonymous access or does the user have to sign in. If the user signs in, how is it being validated? By you or Windows?
ASKER
I was thinking about the normal windows user accounts
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much for that
At the moment I have an empty textfield
<input type="text" name="InvestmentEntBy" value="" size="32" />
Can you please advise me where I please the code.
At the moment I have an empty textfield
<input type="text" name="InvestmentEntBy" value="" size="32" />
Can you please advise me where I please the code.
Place <%Request.ServerVariables ("LOGON_USER")%> between the quotes of value="". See below.
<input type="text" name="InvestmentEntBy" value="<%=Request.ServerVa riables ("LOGON_USER")%>
" size="32" />
If they are logged into Windows, there username (logon name) wil be inserted into the value of the textbox.
<input type="text" name="InvestmentEntBy" value="<%=Request.ServerVa
" size="32" />
If they are logged into Windows, there username (logon name) wil be inserted into the value of the textbox.
ASKER
Thanks, I think I have it correct but the box remains empty
<td colspan="3" valign="top"><input type="text" name="InvestmentEntBy" value="<%=Request.ServerVa riables ("LOGON_USER")%>" size="32" />
<td colspan="3" valign="top"><input type="text" name="InvestmentEntBy" value="<%=Request.ServerVa
In order for this to work, you need to make sure that:
1) anonymous access is turned off for the web site and
2) Integrated Windows authentication is turned on.
Both of these can be accomlished from Web Properties, SECURITY tab found under the IIS server application control panel.
1) anonymous access is turned off for the web site and
2) Integrated Windows authentication is turned on.
Both of these can be accomlished from Web Properties, SECURITY tab found under the IIS server application control panel.
ASKER
Thanks very much for the help and guidance.
All correct
John
All correct
John
Glad I could help.
Lee
Lee