JackyBoi
JackyBoi

Reputation: 2773

Getting textbox value from one page to another page textbox value

I am creating a form in my website and i link this form to the google docs (FORM which i created there). But this new form that i am trying to do is this in such a way that a textbox value from the first page should be passed over to the next page lets say page2 textbox value

CODE IS ROUGHLY SOMETHING LIKE THIS
PAGE 1.html,aspx,asp (Watever) "/>

Page2.html,aspx,asp (Watever) **readonly**"/>

So since i am using the google docs to save my data
** form action="http://docs.google.com
i am unsure how to pass these values, tks for the help.

Presently i am just getting the values from page1 to page2 using this microsoft tutorial http://support.microsoft.com/kb/300104

Upvotes: 0

Views: 23716

Answers (1)

BizApps
BizApps

Reputation: 6130

I think you need to read

How to: Pass Values Between ASP.NET Web Pages

you can store values using the approaches listed there.

Eg:

On your Page 1:

Create a textbox named textbox and an asp button.

on button.click code behind add

Session["test"] = textbox.Text;
Response.Redirect("Page2.aspx"); //Open page 2

On your Page 2 :

Creata a label named label1

Then on its Pageload Event in code behind

Add

string IpassAstringfrompage1 = Convert.ToString(Session["test"]);

label1.Text = IpassAstringfrompage1; //label1 will display TESTING from textbox on Page1

To test. On Page1 input "TESTING" on your textbox then click button

Regards

Upvotes: 3

Related Questions