tags:

views:

33

answers:

2

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  A: 

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

Chris Lively
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.
Roger Reynolds
A: 

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.

Roger Reynolds
Thats the same thing @Chris Lively put up
Charlie Brown
Not exactly... I mean he DID add "string getname = Page" lol. Maybe he's going for the Self Learner badge?
Gage
lol. Guess I should have been more specific ;)
Chris Lively