Link to home
Start Free TrialLog in
Avatar of powelt1
powelt1

asked on

Remove Domain from: ServerVariables("REMOTE_USER")

Hi All,

Is there anyway the domain name can be removed from Requets.ServerVariables("REMOTE_USER")?

At the moment, it comes up DOMAIN\MyName - where I just want it to say MyName

Many Thanks
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi powelt1,

No, because this is supplied by the client. You can easily trim it out though:

CurrentUser = Request.ServerVariables("REMOTE_USER")
CurrentUser = Mid(CurrentUser,Instr(CurrentUser,"\")+1)


Tim Cottee
Avatar of powelt1
powelt1

ASKER

Tim Cottee,

Thanks for your reply.

So how would I get the information into this textbox?

<input name="CreatedBy" type="hidden" id="CreatedBy" value="<%= Request.ServerVariables("REMOTE_USER") %>">
ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial