473,406 Members | 2,549 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,406 software developers and data experts.

Problem with Pages in ASP

Vini171285
Hi..
I have a form,it consists of a six list boxes and depending on selection of that boxes i have to display six pages ..
i have used an array to store these values and case to go to particular pages,but the problem is all pages come in one window..
and i want that,first page should come user can fill it and after submitting that page,the next page stored in array should come..
so what can i do??
Expand|Select|Wrap|Line Numbers
  1. arrdesc=Array(Request.Form("desc1"),Request.Form("desc2"),Request.Form("desc3"),Request.Form("desc4"),Request.Form("desc5"),Request.Form("desc6"))
  2. Dim desc
  3. for each desc in arrdesc
  4.     select case desc
  5.         case 1
  6.             SecondPage()
  7.         case 2
  8.             SecondPage()
  9.         case 3
  10.             SecondPage()
  11.         case 4
  12.             ThirdPage()
  13.         case 5
  14.             ThirdPage()
  15.                                 case 6
  16.                                                 FifthPage()
  17.                                 case 7
  18.                                                 FifthPage()
  19.                                 case 8
  20.                                                 FifthPage()
  21.         case 9
  22.             FourthPage()
  23.     end select
  24. Next
May 11 '08 #1
3 1243
shweta123
692 Expert 512MB
Hi ,

You can do modification in your code like this :

On Page1.asp , you should write following code :

Expand|Select|Wrap|Line Numbers
  1.  <HTML>
  2.       <BODY>
  3.      <form method="post" action "Page2.asp">
  4.       <Select id= "pageSelect">
  5.       <Option value="page1">Page1.asp</Option>
  6.      <Option value="page2">Page2.asp</Option>
  7.       </Select>
  8.      </form>
  9.       <BODY>
  10.        </HTML>

On Page2.asp write the code below :

Expand|Select|Wrap|Line Numbers
  1.   <%
  2.      Dim page
  3.       page=Request.Form("pageSelect")
  4.      Select page
  5.      Case "page1"
  6.             Response.redirect "Page1.asp"
  7.  
  8.     Case "page2"
  9.            Response.redirect "Page2.asp"
  10.  
  11.     End Select
  12.    %>
  13.  
  14.  





Hi..
I have a form,it consists of a six list boxes and depending on selection of that boxes i have to display six pages ..
i have used an array to store these values and case to go to particular pages,but the problem is all pages come in one window..
and i want that,first page should come user can fill it and after submitting that page,the next page stored in array should come..
so what can i do??
Expand|Select|Wrap|Line Numbers
  1. arrdesc=Array(Request.Form("desc1"),Request.Form("desc2"),Request.Form("desc3"),Request.Form("desc4"),Request.Form("desc5"),Request.Form("desc6"))
  2. Dim desc
  3. for each desc in arrdesc
  4.     select case desc
  5.         case 1
  6.             SecondPage()
  7.         case 2
  8.             SecondPage()
  9.         case 3
  10.             SecondPage()
  11.         case 4
  12.             ThirdPage()
  13.         case 5
  14.             ThirdPage()
  15.                                 case 6
  16.                                                 FifthPage()
  17.                                 case 7
  18.                                                 FifthPage()
  19.                                 case 8
  20.                                                 FifthPage()
  21.         case 9
  22.             FourthPage()
  23.     end select
  24. Next
May 11 '08 #2
Hi Shweta,
Thanx for answering but u got my question wrong..

My problem is...
I am having 6 listboxes consisting of same options..
minimum 1 can be selected or maximum all 6 can be selected..
so suppose 2 are selected then we should go to first options page after submitting that page ,then we should go to second options page..
i.e. one by one it should go to pages as per selected in listboxes..
Hope this time i am clear..
Thanx..
May 18 '08 #3
shweta123
692 Expert 512MB
Hi,

After submitting main page on First.asp write this code :

Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim Pages()
  3.  
  4.  
  5. 'Get the listbox values into the array
  6. Pages(0) = Request.Form("lst1")
  7. '
  8. '
  9. '
  10. Redim preserve Pages(Ubound(Pages)+1)
  11. pages(Ubound(Pages))= Request.Form("lst6")
  12.  
  13.  
  14. ''Store the arry in session variable
  15. Session("myArray") = pages
  16.  
  17.  
  18. ''Redirect to first options page
  19.  
  20. If(pages(0) <> "") then
  21.   Response.redirect(Pages(0) & "&Cnt =1")
  22. End if%>
  23.  

On Second.asp write this code :
Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim localarr
  3. Dim arrindex
  4.  
  5. localarr = Session("myArray")
  6. arrindex = REquest.QueryString("cnt")
  7.  
  8. ''Check if array index is within array bounds
  9. If(arrindex <= Ubound(localarr)) Then
  10.  
  11.   ''Redirect to next Options page  
  12.   If(localarr(arrindex) <> "") Then
  13.       Response.redirect(Pages(arrindex+1) & "&Cnt = "& cnt & "")
  14.   End If
  15. End if
  16. %>

Hi Shweta,
Thanx for answering but u got my question wrong..

My problem is...
I am having 6 listboxes consisting of same options..
minimum 1 can be selected or maximum all 6 can be selected..
so suppose 2 are selected then we should go to first options page after submitting that page ,then we should go to second options page..
i.e. one by one it should go to pages as per selected in listboxes..
Hope this time i am clear..
Thanx..
May 19 '08 #4

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

Similar topics

9
by: GL | last post by:
I am running DB2 8.1.1 on AIX 5.1 Having a problem with a redirected restore. Once into the restore continue phase, I immediately get the following “SQL2059W A device full warning was...
4
by: Trevor Best | last post by:
I have a report that's fairly simple, page headers and footers, detail has a subreport in (can vary in length). The customer wanted a signature block for them, their client and 3rd party. This was...
8
by: Ashish | last post by:
Incase the problem got bogged down reposting... Hi Gregory, I think I didnt make myself much clear. The problem is: 1. I have one ASP.NET application (no classic asp) and it has a main page...
5
by: THX-1138 | last post by:
hi, I am having a trouble at work. We currently have many pages in our site and we are having trouble with dll's.( we think ) Our site outputs static pages as .aspx pages becasue we have a...
1
by: Teemu Keiski | last post by:
Hi, I have following type of scenario (also explained here http://blogs.aspadvice.com/joteke/archive/2005/01/10/2196.aspx ) We have problematic web server (wink2 Standard, 1.5GB of physical...
3
by: bhavik | last post by:
hi I have problem that when I am upload my application to the client server, I am losing buttion event on some pages. on some pages button event is working fine ro some pages is not working. I...
3
by: pentisia | last post by:
Hi there, We are using history.go(integer) to go back to the certain page directly. Because there are some pages interaction in between. For example, starting from page 1 to page 2. From page...
0
by: Sheau Wei | last post by:
I am using php version 4.3.3. The below was my pagination code. My problem is that when i run this code in my computer, i wall fail because of the hyperlink of the pagination not function when i...
9
by: Dave | last post by:
Hi guys, I have just set up a duplicate server running: apache 2.54, mysql 5.04 and php 5.04 This is the same setup as as the server we are using now, apart from the hardware inside. I have...
4
pradeepjain
by: pradeepjain | last post by:
i had posted the same code in javascript area !! this i am posting bcos of different problem. as you can see in ma code there is a dropdown called sort ...its sorts the result by the value he...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.