Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...