Forums

This topic is locked

Can I request a form object from an Insert page?

Posted 24 Oct 2002 17:20:20
1
has voted
24 Oct 2002 17:20:20 Brian Dunk posted:
Hello. I have a very simple insert form that inserts from a single textfield. After pressing the submit button, I have a success page that I would like to display what ever was typed into the previous textfield or that is being submitted into my db. On the success page i am entering <%=Request.Form("textfield"%> where i would like the textfield entry to show up. This continues to turn up blank. However the data is submitted into the db properly. I cannot for the life of me figure out why this does not work. All form elements match up properly. Any input is much appreciated.

bdunk

Replies

Replied 24 Oct 2002 19:46:21
24 Oct 2002 19:46:21 Ned Frankly replied:
You submitted the form to the insert page, and at that point the form objects were available. The success page is a Response.Redirect that occurs after the insert, and is not a form submission. This is why your form fields are showing up empty - they ARE empty. You can either modify your redirect URL to include the contents of your form field (success.asp?PassValue=FormValue), or you can store your field in a session variable.

There are many ways around this, but the URL method is probably the easiest and cleanest. Read your passed value on the success page with MyVar=Request.QueryString("PassValue"

Ned Frankly

Reply to this topic