Issues doing a User.Identity.Name

slimasian

Newcomer
Joined
Feb 13, 2004
Messages
5
Hey Guys,

This may be something really dumb on my part, but I figured I'd ask. On a PageLoad event for my ASP.NET web app, I have it assign a variable "userID" a value of User.Identity.Name

I actually used the code from a previous post here. When I preview this on the browser, it seems User.Identity.Name is given a blank value (I assigned TextBox1.Text = userID). I placed Imports System.Web.Security at the very top of the code, and everything built just dandy. Anyone had this issue before of User.Identity.Name spitting out a blank value?

Like I said, I'm probably doing something wrong, so if I am, please let me know haha I'm a newbie to .NET in general...here's the code for the PageLoad:

Dim userID as String
userID = User.Identity.Name
TextBox1.Text = userID


[Output:TextBox1 remains blank upon load]


Thanks for the help!

-slim
 
Back
Top