Click to See Complete Forum and Search --> : Submit From to different page..


bharadwajrv
July 28th, 2003, 09:02 AM
hi,
i wanted to submit the form in "post1.aspx" to "post2.aspx"..
i have written the following code.... what is the problem in the below code ?



<form id=frmABC action=post2.aspx method=post Runat=Server>
<asp:TextBox id="txt1" runat="server" />
<asp:Button id="submit" text="Submit" runat="server" />
</form>



i want value of "txt1" in "post2.aspx"..
it is not submitted to Post2.aspx .. any idea why ?

thanks in adv..
Venu

coolbiz
July 28th, 2003, 11:53 PM
ASP.NET is cool and all but it cannot do that anymore. Form that you have RUNAT=server attribute will be automatically submitted to the code-behind.

The only workaround that I've found so far is to write a Javascript that submits an HTML form to the next page with the input required.

-Cool Bizs

bharadwajrv
July 30th, 2003, 08:26 AM
thanks for the reply..

can u plz give the code sample to post the form to differnt aspx file..


thanks
venu

coolbiz
August 1st, 2003, 10:41 AM
Extract the zip into your WWWROOT and set the directory up for running the ASP.NET app. Browse to the XferForm1.aspx and type in something in the USERNAME box. Then hit the SUBMIT button to continue.


-Cool Bizs

coolbiz
August 2nd, 2003, 12:02 AM
Have just found a "correct" way to do this. Thanks to the VIJAY who posted the question and answer:
http://www.codeguru.com/forum/showthread.php?s=&postid=785971

-Cool Bizs