"Simon Gare" <si***@simongare.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi All,
I have a querystring that contains the + sign as a separator, I need to
read
these values individually in a select statement, for example.
&text=Single+205
where single is the type of room somebody wants and 205 is the user ID in
the Customer table.
Please help.
I include the following for academic reasons.
<do not use>
The + will be considered an escape character for space hence the code:-
Dim sText : sText = Request.QueryString("text")
Will put the string "Single 205" in the variable sText. The split function
can be used to get the separate values:-
Dim asText : asText = Split(sText, " ")
Now asText(0) is "Single" and asText(1) is "205"
</do not use>
However encoding two distinct pieces of data into a single value is not
sensible. Better would be:-
&type=Single&userid=205
Now the code is:-
Dim sType : sType = Request.QueryString("type")
Dim lUserID : lUserID = CLng(Request.QueryString("userid")
--
Anthony Jones - MVP ASP/ASP.NET