0

I have a standard Login form

<asp:Login ID="lgnExcel" DestinationPageUrl="login/data.aspx" OnAuthenticate="Login1_Authenticate" runat="server">

Is it possible to attach the Username as a query string with the DestinationPageUrl or reference the value in the code behind. I've tried lgnExcel.UserName.ToString() but coudldn't get to show any help would be great. Thanks.

2 Answers 2

2

Why not just grab the username from the User.Identity.Name field on the destination page?

Sign up to request clarification or add additional context in comments.

1 Comment

Well what I want to do is grab the default value and insert it into a database. I know how to display it but I want the raw text/value in the code behind.
0

Alright for future lurkers to get the value of your username in you code behind try { string getname = Page.User.Identity.Name; } and you can retain the value across pages.

-Cheers.

2 Comments

Thats the same thing @Chris Lively put up
Not exactly... I mean he DID add "string getname = Page" lol. Maybe he's going for the Self Learner badge?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.