Transfer data from one page to another
-
if you know C# in Windows Form instead of Web Form you know that when you want to pass data from one window to another you only have to make something like this : Dialog2 dlg = new Dialog2(); dlg.label1.Text = this.text1.Text; now I want to make the same thing but in web form I have a form login in asp.net and if the user enter the correct username and password I want to access to the main page(the one after the login) and show his name in a label. how can I do this ?? Source will be appreciate or reference :) thanks
-
if you know C# in Windows Form instead of Web Form you know that when you want to pass data from one window to another you only have to make something like this : Dialog2 dlg = new Dialog2(); dlg.label1.Text = this.text1.Text; now I want to make the same thing but in web form I have a form login in asp.net and if the user enter the correct username and password I want to access to the main page(the one after the login) and show his name in a label. how can I do this ?? Source will be appreciate or reference :) thanks
somewhere in your login.aspx page you would redirect user to your main page... Response.Redirect("main.aspx?name=BLaZiNiX"); ... in your main page in Page_Load(...) label1.Text = Request.QueryString["name"]; Mike M WinInsider.com