473,385 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Moving to Pages

Vini171285
Hi,
This is my code
Expand|Select|Wrap|Line Numbers
  1. If (Request.Form("desc1")<>"") Then
  2.     Response.Redirect "SecondPage.asp"
  3. End If
  4. If (Request.Form("desc3")<>"") Then
  5.     Response.Redirect "ThirdPage.asp"
  6. End If
  7.  
I have a ASP page, in that there are 3 options.
If i leave the first option blank it should move to third page..
But it doesn't work.
Can anyone help??
Thanx..
Jun 17 '08 #1
5 1487
DrBunchman
979 Expert 512MB
Hi Vini,

To debug this replace your response.redirect line with a response.write like this:
Expand|Select|Wrap|Line Numbers
  1. If (Request.Form("desc1")<>"") Then
  2.     Response.Write Request.Form("desc1")
  3. End If
  4. If (Request.Form("desc3")<>"") Then
  5.     Response.Write Request.Form("desc3")
  6. End If
  7.  
so you can check the value that is being passed in the form. Remember that if the first option is blank it won't necessarily redirect to the third page - you are testing whether desc3 is blank as well and if it is then it won't redirect. If you want it to always redirect when the first option is blank then you'll need to use:
Expand|Select|Wrap|Line Numbers
  1. If (Request.Form("desc1")<>"") Then
  2.     Response.Redirect "SecondPage.asp"
  3. Else
  4.     Response.Redirect "ThirdPage.asp"
  5. End If
  6.  
Dr B
Jun 17 '08 #2
Hi Dr B,
Actually i am having three list boxes named desc1,desc2,desc3.
If desc1 is selected then it should go to second page..
If desc2 is selected then it should go to third page..
If desc3 is selected then it should go to fifth page..
It is not necessary that if first is left blank,then it should go to third page..
If first list box is blank it should check the next list box and should go to the respective pages.
Can u suggest some line of code??
Thanx..
Jun 17 '08 #3
idsanjeev
241 100+
are you trying to like this

Expand|Select|Wrap|Line Numbers
  1. If (Request.Form("desc1")<>"") Then
  2.     Response.Redirect "SecondPage.asp"
  3. ElseIf (Request.Form("desc3")<>"") Then
  4.     Response.Redirect "ThirdPage.asp"
  5. Else
  6.  Response.Redirect "firstpage.asp")
  7. End If
Regards
Jha
Jun 17 '08 #4
Hi,
Yes i have tried this also..
Thanx..
Jun 17 '08 #5
idsanjeev
241 100+
Hi,
Yes i have tried this also..
Thanx..
lets try this code
Expand|Select|Wrap|Line Numbers
  1. IF request.Form("desc1")<>"" Then
  2.   If request.Form("desc2")<>"" Then
  3.     if request.Form("desc3")<>"" then
  4.        response.Redirect ("thirdpage.asp")
  5.     else
  6.      response.Redirect"secondpage.asp"
  7.     End if
  8.   Else
  9.      RESPONSE.Redirect "FIRSTPAGE.ASP" 
  10.   end if
  11. else
  12.   response.Redirect "page.asp"
  13. end if
let us know what happen
Regards
jha
Jun 17 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Sergio Lombardo | last post by:
reshello everyone! as mentioned above, I just completed a website in visual studio .Net. which consists of several ASP pages. This website is currently sitting on my development machine (and it...
3
by: jqpdev | last post by:
Hello all, I've been developing web apps using Borland's websnap technology which is built upon asp technology. I'm tranisitioning to ASP.NET VS.NET and need some techniques/best practices to...
3
by: Geoff | last post by:
All my pages come up with "SQL Server does not exist or access denied" after moving to a new Sql Server with a different name. None of my pages come up even though I am addressing the servername by...
1
by: Rob R. Ainscough | last post by:
I'm running into a problem with Master Pages. I have some "absolute" controls (labels, textboxes) that I position on the page using: ControlObject.Style.Add("Top", "250") or ...
14
by: rabbitrun | last post by:
Hi Everyone, I work for a financial company. I am planning to give a presentation to rest of the development team (15 people) here on moving server side logic to client-side javascript for an...
2
by: Paul | last post by:
I am moving an existing app written years ago to a new server. It uses Sigma Template 1.3 and Quickform 1.1.1 and PEAR.php,v 1.1.1.1 2004/02/16 The directory structure is like this: /site...
4
by: Alex | last post by:
Hello, This is a follow-up to my earlier post about having issues with our application pool recycling. We currently use Session State InProc, but if I were to choose to move the existing...
2
by: localhost1 | last post by:
hi everyone my all pages are loading appropriately in FireFox but showing problem in IE 6. what happens in IE6 is that all the pages load and all the contents of the pages are also loaded but the...
3
by: SonOf27 | last post by:
Morning all. I was hoping somone would be able to help me with some VBA program that will allow me to move the whole Tab Control on an Access form at runtime. What I have is a form in Access 2000...
1
colinod
by: colinod | last post by:
Hi everyone i am trying to make a page that goes to the next recorset when i click on a button so the page only shows one record at a time, this is for updating so i need to be able to go to the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.