In ASP.NET 2.0 changing the form action will be easy. However, setting the
form action attribute just isn't the ASP.NET 1.x way. If you must do it
precisely that way the you can change the action attribute using client side
script or you can define a form without the runat=server attribute (in which
case it will act a whole lot like classic ASP.)
Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.
http://msdn.microsoft.com/msdnmag/is...e/default.aspx http://www.aspalliance.com/kenc/passval.aspx http://www.dotnetbips.com/displayarticle.aspx?id=79
Here's one nice, simple way to pass values from one page to another:
'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")
Then, in WebForm2.aspx:
'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Don Parker" <sc*************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I am a newbie to ASP.NET. I am converting some asp pages I had working.
I have a page which has a form with several input elements. When the
user clicks on a Submit element - the action specified in the form tags
is to post the data to a new page. What happens however is that the
original page simply reloads. How do I force it to post to the new page
instead. (I suspect the problem may be the runat server directive? I
had to use that to populate my dropdowns with databinding)
Here is the form declaration:
<form method="post" name="churchform" id="churchform"
action="localstuffPostData.aspx"
runat="server">
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!