Forms question - Novice

S

sean

Hi There,

I am trying to post a form to another page, I have edited the action of the
form command to the specific (URL much the same as HTML), when I submit the
form it just posts back to the same page. Can someone help me out with some
code or a tutorial on the subject?

Sean

<form id="frmValidator"
action="https://payments.verisign.com.au/payflowlink" method="post"
runat="server">
 
V

Vicky

Hi sean,
Just check action after your page gets loaded.U will find aspx has changed
action property back to the same page.
In ur case u have to handle this in page load event and from there u can
resubmit ur page to different link

Vicky
 
S

Steve C. Orr [MVP, MCSD]

Setting the form action attribute just isn't the ASP.NET way.

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/issues/03/04/ASPNETUserState/default.aspx

http://www.aspalliance.com/kenc/passval.aspx

http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=600

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)
 

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

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,087
Latest member
JeremyMedl

Latest Threads

Top