Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
default.aspx design as follows;

username a[textbox1.text]
button (submit)
when i click the submit button in default.aspx page, default2.aspx will open and in that login name default.aspx value to retrieve to that page.how to do?in asp.net

default2.aspx design as follows;

loginname a[textbox2.text]

outputas

loginname a to be displayed.what value i type that thing to be displayed in the default2.aspx want to retrieve those value.
Posted

1 solution

In default.aspx:
C#
Session["LoginName"] = loginName;

In default2.aspx:
C#
string loginName = Session["LoginName"] as string;
if (loginName != null)
   {
   ...
   }


[edit]Typo: "LoginNmae" changed to "LoginName" - OriginalGriff[/edit]
 
Share this answer
 
v3

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