"shank" <sh***@tampabay.rr.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Can someone direct me a set of rules for building strings in ASP?
I'm always getting stuck on when to use a quote (") or apostrophe{'} or
both.
This simple string is giving me fits...
Response.Redirect("test3.asp?orderno='" &
(rsProducts.Fields.Item("OrderNo").Value) & "')"
In general, for URLs you should use Server.URLEncode on the value portion of
your keys. You should not put any quotes around the values.
Response.Redirect("test3.asp?orderno=" &
Server.URLEncode(rsProducts.Fields.Item("OrderNo") .Value) )
I suspect that value is numeric, in which case the URLEncode is a little
redundant, but still a good habit to have. :)
Regards,
Peter Foti