Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving large amounts of text between ASP pages

Status
Not open for further replies.

AndyApp

Programmer
Dec 20, 2001
259
GB
As the querystring is limited to the amount of characters you can place in it, and I'd sooner not user it if I can help it anyway, is there another way for me to move text from one page to another?

I've got a form that when a user submits it takes the data to an ASP page which then checks everything is ok, if there's a problem it takes them back to the form and tells them what the problem is. What I want to do is re-populate the form fields with the data they've just entered rather than making them do it all over again.

The only way I can think is to have a message, say there's been an error' on the checking page with a 'continue' button. In the background I build another form with hidden fields and use the continue button to submit the data back to the form page.

There's got to be a better way.
 
you could use Session variables to repopulate the form fields


Tony
 
do the error handling using javascript...on error or wrong entry in the form the user will be notified with a pop up and you can set the focus to take the user back to that field...that way you wont lose any data already filled on the form...

i have already posted the javascript on this forum for validating form fields...i will post the link as soon as i find it...

-DNG
 
You still need validation running server-side to catch the users that dont use javascript.

I agree that javascript validation should be used though - just not on its own.


Tony
 
festerSXS - I thought about using sessions but are they not intensive on the server? What the users are filling in is a kind of CV, but some of the fields could be quite a few paragraphs of data.

DotNetGnat - didn't want to rely on javascript for the validation for the reason festersxs gave.
 
You could write it all into a database even though it failed validation and then only keep the unique key of the new data in a session variable and then, on the page you want to reload, if the key is present you would query the database, if not then the fields remain blank.

... but doing all this I imagine is just as taxing to the server as holding it all in a session variable... especially if you were to explicitly clear the session variable as soon as you used the data.

Another approach would be to use traditional cookies.
 
cheers sheco and eyeswideclosed decided given i'd have to save the data eventually may as well use the database option. I just put a flag on the data to stop it going live till it conforms. cheers guys and gals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top