related sites: <FREE Help> <ASP> <Asp.net> <worldwide> feedback: <lovethat> <hatethat> <thanks> <credits> <contact us>
advice: Write Your SQL <Next>
ASP Commandment #2: Encode!
When dynamically building a URL with your code, the URL may work fine in IE but Netscape presents this ERROR message:
HTTP Error 400 400 Bad Request Due to malformed syntax, the request could not be understood by the server. The client should not repeat the request without modifications.
HTTP Error 400
400 Bad Request
Due to malformed syntax, the request could not be understood by the server. The client should not repeat the request without modifications.
Use Server.URLEncode when passing parameters so that characters within the data are encoded properly (spaces replaced with "+", etc.).
This is bad: <% URL="wherever.asp" part1="fname=Joe" part2="&company=Bait Shop" part3="&fax=703-277-2233" response.redirect URL & "?" & part1 & part2 & part3 %>
This is good: <% URL="wherever.asp" part1="fname=" & server.URLencode("Joe") part2="&company=" & server.URLencode("Bait Shop") part3="&fax=" & server.URLencode("703-277-2233") response.redirect URL & "?" & part1 & part2 & part3 %>