Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am using formsauthentication.redirectfromloginpage(string,Boolean) and i want to retrieve this string value on landing page ?

so how can i get this string value on landing page ?
Posted
Comments
Laiju k 5-Nov-14 3:17am    
what do you mean by landing page
Akashjoshi 5-Nov-14 3:29am    
you just used session over their...
Naveen Singh 5-Nov-14 3:32am    
i mean after succesfull login thev result page

On login button click event pass

session["username"]=txtusername.text;


And In your Landing Page use that session on Page_Load

like if you used Lable then..

lable1.text=session["username"];
 
Share this answer
 
Comments
Naveen Singh 5-Nov-14 4:48am    
no session has been used.
Naveen Singh 5-Nov-14 4:50am    
i want to retrieve result from FormsAuthentication.RedirectFromLoginPage(string,boolean) this string value not need any session to tranfer value !
C#
string A= string.Empty;(local variable)

               if (User.Identity.IsAuthenticated)
               {
                   A =  User.Identity.Name;
               }



simply returns the string value that has been passed in formsauthentication.redirectfromloginpage(string,Boolean)

ex: formsauthentication.redirectfromloginpage(TEST,True)

will return Test in A.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900