Passing Variables between Webforms

  • Thread starter Thread starter Ivan Sammut
  • Start date Start date
I

Ivan Sammut

I have 2 webforms (WebForm1 & Webform2)

I have a button on webform1 that when I click it I need to pass some
variables to webform2 and then Popup webform2 and show the variables I
passed.

Any idea how can I do this.
If possible give a short example

Thanks
Ivan Sammut
 
protected void buttonOne_Click(object sender, EventArgs e) {

Response.Redirect("webform2.aspx?fld=value&.......");

}

HTH

sam
 
Now on webform2 howo do i get the variables out.\

Sorry but I'm still a rookie
Thanks
Ivan Sammut
 
Request[fieldname]..

e.g.

Response.Redirect("WebForm2.aspx?name=Sam");


in Page_Load of Webform2

string name = Convert.ToString(Request["name"]); // or
Request["name"].ToString();

HTH

Sam
 
Back
Top