Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 30th, 2007, 06:26 AM
Registered User
 
Join Date: Nov 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default preserve form values in classic asp

Hi,

I am new to asp. The problem I face is as follows.

I have a user registeration form which gets validated server side. When the form is posted & if there is a validation error, all the fields are wiped out & the user needs to re enter the values. Is there any way to preserve these values so that the user does not need to re enter the entire form data? Would appreciate if could some1 cld point me in the right direction?
Many Thanks,

Ps: I can't change to .net

 
Old November 30th, 2007, 09:19 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes you can do this.

You need some code to manipulate the generation of the input elements that contain those values.
There are many ways to do this.

If you are interspersing code throughout the HTML of your page, then you could write a function for each input element. The function would check for the existing value in the form vars and return it if it exists, and return a default value (such as an empty string) when it does not exisit.



Woody Z
http://www.learntoprogramnow.com
How to use a forum to help solve problems
By blog... please visit
 
Old December 1st, 2007, 02:28 AM
Registered User
 
Join Date: Nov 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Woddyz,

Thx for your response. Are you aware of any tutorials/examples around which show the method you have told above. I havent had much luck with this.

Many Thanks Again,
Rgds,
Tausif
 
Old December 1st, 2007, 02:55 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well... for starters try this link:
http://asp3wiki.wrox.com/wiki/show/H...ge+for+ASP+3.0

That is a pretty nice free book online that covers everything you will need.
You can also find that book at the online used book places for just a dollar or two.


and this link is the old stand by:
http://www.w3schools.com/asp/default.asp

If you can't get a simple example easily I'll be surprised... but let us know if you still need help


Woody Z
http://www.learntoprogramnow.com
How to use a forum to help solve problems
By blog... please visit
 
Old December 1st, 2007, 01:51 PM
Registered User
 
Join Date: Nov 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thx a lot for that asp3wiki link .. :) ..

I simply decided to store those form values in a variables & used
<%=sUserName%> ... so when the page was called , if username had any value it was displayed ...

Thx again, Good day,
Tausif
 
Old December 1st, 2007, 04:54 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sounds like a good solution

Woody Z
http://www.learntoprogramnow.com
How to use a forum to help solve problems
By blog... please visit





Similar Threads
Thread Thread Starter Forum Replies Last Post
asp.net vs classic asp "URGENT" naeem_ul_hussan Classic ASP Professional 1 August 1st, 2007 03:14 PM
ASP classic Form to Email problem melkin Classic ASP Basics 0 April 19th, 2007 10:28 AM
Fetching Form Values with ASP cancer10 Classic ASP Databases 1 March 15th, 2007 06:58 AM
Passing Form Values in ASP.Net sankar General .NET 10 September 21st, 2006 11:13 AM
Clearing values from form and ASP variables sniffer Classic ASP Basics 1 September 24th, 2003 02:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.