HTMLEncode vs. URLEncode methods

Results 1 to 2 of 2

Thread: HTMLEncode vs. URLEncode methods

  1. #1
    Kentium Guest

    Default HTMLEncode vs. URLEncode methods

    I&#039;ve read the definitions of these methods in my O&#039;Reillys VBScript in a Nutshell book, but I&#039;m still confused.<BR><BR>Can someone please explain the difference, and where they would be used? What is the practical application for each method?<BR><BR>Thanks.

  2. #2 Guest

    Default RE: HTMLEncode vs. URLEncode methods

    Hi,<BR><BR>Server.HTMLEncode used to display html code on pages.<BR>eg if you want to display "&#060;b&#062;Hello World&#060;/b&#062;" with those "&#060;b&#062;" tags as is and not just the words Hello World in bold you would either type "&lt ; b &gt ;" OR you could put "&#060;b&#062;Hello World&#060;/b&#062;" into a variable and then use Server.HTMLEncode(myVar) to display it on your page.<BR><BR>Server.URLEncode is used to in real-world applications to pass URLs in the querystring eg Without URLEncoding the 2nd URL you will run into problems with which values are with which names.URLEncoding changes all the special characters like ? and . into their encoded versions like %2E etc.<BR><BR>Hope this isnt more confusing!!!<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts