I need to create a form that routes someone to the next page according to the zip code they input.
Is there an easy way to set something like this up?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Mar 29, 2010, 5:20 PM
JimPosted Mar 29, 2010, 9:56 AM
Does anyone know what the script would look like?
Thanks for your help.
Sam HobbsPosted Mar 29, 2010, 4:10 AM
I am not sure of the details of ASP, but it seems to me that you should be able to send the zip code back to the server and let it do the look-up of zip code and navigation to the appropriate form. Probably the only problem with Amit's suggestion is that you need a table of some type to do a look-up of zip code.
JimPosted Mar 27, 2010, 5:34 PM
Here's the details (not too bad, I don't think!)
I have 400 zip codes.
When someone enters a zip code into the box and clicks send - they will be taken to one of four pages (depending upon their zip code).
400 zip codes - all going to either - page1.htm, page2.htm, page3.html or page4.htm
Sam HobbsPosted Mar 27, 2010, 2:01 AM
When you say "according to the zip code" I assume that the zip codes are put into regions or some other geographic category. Is there a database table that determines what the region is for each zip code? How can you determine what page to use, based on zip code? Your management has to decide how to do that.
Amit ChoudharyPosted Mar 27, 2010, 12:51 AM
Create a form put a textbox on it. Drop a button also name "Take me there"
OnClick event of this button.. you can check the value of ZipCode and compare it with your criteria of redirection.
like:
if(txtZipCode.Text=="248001")
Response.Redirect("~\Dehradun.aspx");
and you are done.
Please mark as answer if it helps.