Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic 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 July 2nd, 2003, 10:38 AM
Authorized User
 
Join Date: Jun 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default request object

i need some serious help

i generate values dynamically and pass an unspecifyed No. of variables to the next page in the requststring... that works fine... now i need to retrieve and sort those values stored in variables called CaseAsset1, CaseAsset2 , CaseAsset3... the nr after Asset is autogenerated by a counter (depending on howmany values the user will have to enter)
How do i concatinate in the line:

<%= request.QueryString("CaseAsset" + ANY CHARACTER) %>
is there a wildcard i can use?

i will need that line to be dynamic since i never know howmany variables i have to deal with

thanks a bunch
Toran
__________________
... there is always more to learn...
 
Old July 2nd, 2003, 05:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

Why not set a boolean to false and then use a DO WHILE loop and then within that test to see if you have a parameter :

Dim incomplete
Dim count
incomplete=TRUE
count=0

Do while incomplete
  if (Request.QueryString("Field" & count)) then
       response.write("we have a field")
       count=count+1
   else
       response.write("the end")
       incomplete=FALSE
   end if
WEnd
 
Old July 2nd, 2003, 06:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Or this:

Code:
Dim intCnt
Dim strConCat

' assuming that you are writing the variables to the screen
' you could also do something else with them
For intCnt = 0 To Request.QueryString.Count
    If (Left(Request.QueryString.Key(intCnt), 9) = "CaseAsset") Then
        Response.Write Request.QueryString.Item(intCnt) & "<br>"
    End If
Next
regards
David Cameron
 
Old July 8th, 2003, 07:22 PM
Authorized User
 
Join Date: Jun 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

many thanks to both of you... i will try this ...:)

I'll keep ya posted


Toran ...

 
Old July 24th, 2003, 12:45 PM
Authorized User
 
Join Date: Jun 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

worx..:) Thanks again







Similar Threads
Thread Thread Starter Forum Replies Last Post
object required Request RoniR ASP.NET 1.0 and 1.1 Basics 3 January 8th, 2007 06:53 AM
Request Object g2000 ASP.NET 1.0 and 1.1 Basics 1 October 21st, 2005 02:01 PM
Request Object kagitas .NET Web Services 1 October 2nd, 2004 10:26 PM
the request object Toran Classic ASP Basics 0 June 27th, 2003 01:06 PM





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