Connecting Tech Pros Worldwide Help | Site Map

get form value from another page

Newbie
 
Join Date: Mar 2007
Location: china
Posts: 24
#1: Feb 13 '08
in first page,
[HTML]<form id="form1" runat="server" action="page2.aspx">
<TEXTAREA id="txt1" runat=server></TEXTAREA>
<INPUT type=submit value=submit name=rev_submit>[/HTML]
in second page(c#)
Expand|Select|Wrap|Line Numbers
  1.  string str = Request.Form["txt1"];
In this way, data can be posted to second page. But I found when the first page is posted back, the content in browser is still that of first page, not second page.

How to jump to page2.aspx, while using the data in fomr1 posted back ?
kenobewan's Avatar
Moderator
 
Join Date: Dec 2006
Posts: 4,745
#2: Feb 13 '08

re: get form value from another page


You could it the old fashion way, steal oops I mean, use the post method in the scripts objRequest.Method = "POST";. HTH.
Reply