slimasian Posted February 13, 2004 Posted February 13, 2004 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 Quote
kahlua001 Posted February 13, 2004 Posted February 13, 2004 Where are you setting your User.Identity.Name to anything? Show us that code. Quote
Administrators PlausiblyDamp Posted February 13, 2004 Administrators Posted February 13, 2004 Does your website require the user to authenticate? If not then they will not have a username.... Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
slimasian Posted February 13, 2004 Author Posted February 13, 2004 Nevermind guys, I was able to resolve it...thanks for the responses! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.