Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Avoid ' in the URL
11-18-2007, 01:39 PM #1
- Join Date
- May 2007
- Thanked 0 Times in 0 Posts
Avoid ' in the URL
hmm..i duno how to elaborate this problem that i m facing. ok, let say ..i have a URL wit id number such as
when i add the symbol ' at the end of the url (like that:www.abc.com/memberpage.asp?memberid=12'), and enter, it will display error for my page.
But when i try to put a ' at this web page here, it will not display any error, how can i do this with ASP languagE?how can i avoid it using ASP language ?
plz help and guide.thank you.
11-18-2007, 02:02 PM #2
You can use the
Server.URLEncode()method to avoid symbols that interfere with the querystring.
Code:Dim mybadstr mybadstr = "www.'hello'2'birds'.com/mydirectory/'string'=3 Dim mynewstr mynewstr = Server.URLEncode(mybadstr)