Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Removing a Querystring Name & Value

Reply
Thread Tools

Removing a Querystring Name & Value

 
 
scott
Guest
Posts: n/a
 
      07-28-2005
Below, I'm trying to remove the querystring name& value of "catID=12".
I mananged to isolate the RESULTS part, but I need to be able to strip the
querystring name and it's value, no matter if the value is 1, 2 or 3 digits.
I
chose to isolate the part I'd be removing below because I know I can take it
and run a replace and get correct string, although I hardcoded the qs name.

Basically, I'd like to end up with a function that I could just pass the
name of the querystring and the function would remove the qs name and it's
value.

One other issue, if the querystring name and value are the only part of the
querystring, I need to delete the "?" within the qs.

Any help?

CODE:

sQueryString = "millID=2&catID=12"

iMarker = InStr(sQueryString ,"catID")
mystring= Right(sQueryString ,Len(sQueryString )-iMarker+1)


RESULTS:
mystring=catID=1




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get value of QueryString inside QueryString Mehdi ASP .Net 6 04-06-2006 03:41 PM
Passing QueryString URL as a paremeter in QueryString Adeel Ahmad ASP General 1 03-07-2006 02:05 PM
Removing a Querystring Name & Value scott ASP General 10 08-01-2005 06:36 PM
Clearing QueryString Name/Value pair from URL Jon ASP .Net 3 02-09-2004 10:30 PM
Request.Form("Field Name") Versus Request.QueryString("Field Name") John Davis ASP General 2 08-18-2003 05:00 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57