hi
I heve some textbox and button in Info.aspx when I click on button it will save data into session and redirect to order.aspx...
protected void LBsabt_Click(object sender, EventArgs e)
{
UserData user = new UserData
{
Name = Txtname.Text,
State = DdlState.SelectedItem.Text,
City = DdlCity.SelectedItem.Text,
Mobile = TxtMob.Text,
Tell = txttell.Text,
Address = Txtaddu.Text,
PostCode = TxtcodeU.Text,
Email = TxtEmail.Text,
};
Session["UserData"] = user;
if (Session["UserData"] != null)
{
UserData userData = Session["UserData"] as UserData;
string Name = userData.Name;
string city = userData.City;
string state = userData.State;
string mobile = userData.Mobile;
string tell = userData.Tell;
string address = userData.Address;
string postCode = userData.PostCode;
string email = userData.Email;
}
Response.Redirect("order.aspx");
}
in order.aspx is back button that will back to Info.aspx page in info.aspx I put below code that will show session value in textboxes
if (Session["UserData"] != null)
{
UserData userData = Session["UserData"] as UserData;
if (userData != null)
{
Txtname.Text = userData.Name;
TxtMob.Text = userData.Mobile;
txttell.Text = userData.Tell;
TxtcodeU.Text = userData.PostCode;
Txtaddu.Text = userData.Address;
TxtEmail.Text = userData.Email;
}
}
now I want when I back to info.aspx page and change text into textboxs it will change sessions value...
i.e in Txtname is "Neda" that saved before in session now I want change it to "neda shahbazi" when I change textbox text and click on button it doesn't change usedata.Name I mean it is "Neda" same az before that saved in session
I want when I change textboxs text it will update session that saved before...
Best regards
neda