|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Logon users
<i><b>Originally posted by : Matt (Mchojnacki@k12.dserv.com)</b></i><br />I have a simple piece of code here:<br /><br />user=request.servervariables("LOGON_USER")<br />response.write("Welcome to my home page " & user)<br /><br />it stores a user name in the format of DOMAIN/USERNAME. <br /><br />so on my page it prints "Welcome to my home page DATASERV/Mchojnacki<br /><br />is there a way to just print the username onto the page, 'Mchojnacki'??
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : Robert Knight (jknight.cannon@yfi.co.uk)</b></i><br />You could use the split function with the delimiter '/'<br />For instance:<br /><br />Dim arrUser<br /><br />arrUser = Split(user, "/", -1, 0) <br />Response.Write arrUser(1)<br /><br />Would return an array called arrUser, the first being the domain and the second being the name.<br /><br />If you wanted to reverse this you could use<br /><br />Join(arrUser, '/') <br /><br />Good Luck!<br /><br />==AtomicBomb==<br /><br /><br />
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > Logon users |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
![]() |
|