Passing Variables between Webforms

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
 
S

sam martin

protected void buttonOne_Click(object sender, EventArgs e) {

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

}

HTH

sam
 
I

Ivan Sammut

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

Sorry but I'm still a rookie
Thanks
Ivan Sammut
 
S

sam martin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top