Escape function within

Posted on 2014-01-07
Last Modified: 2014-01-08
Does a javascript Escape equivalent function exist in which allows me to post a form that contains specials characters?
Question by:TheChos
  • 3
LVL 22

Accepted Solution

Ivo Stoykov earned 500 total points
ID: 39764434
What about HttpServerUtility.UrlEncode? (There are samples in documentation)


Ivo Stoykov
LVL 40
ID: 39764470
VB does not use any type of escape character.

If you mean a Windows Form, there is no need for them anyway. Windows uses Unicode characters, so you can display anything you want.

You just have to select a font that has the characters you need.

In order to explore the characters available in a specific font and copy them to the clipboard in order to be able to paste them in your application, use the Character Map application that is provided with Windows. Simply call charmap in a command prompt.

Author Comment

ID: 39764713
I seem to be missing something and I'm sure it's an easy fix.  Below is what I have but receive errors with both attempts at the HttpServerUtility.UrlEncode answer.

Sample 1)
        Imports System.web

        Dim webClient As New System.Net.WebClient()
        Dim strDownload As String

        strDownload = "" _
            & "?ClientID=" & Trim(txtClientID.Text) _
            & "&CesNotes=" & Server.UrlEncode(txtNotes.Text)
        Dim content As String = webClient.DownloadString(strDownload)

Sample 2)
        Imports System.web

       Dim webClient As New System.Net.WebClient()
        Dim strDownload As String

        strDownload = "" _
            & "?ClientID=" & Trim(txtClientID.Text) _
            & "&CesNotes=" & HttpContext.Current.Server.UrlEncode(txtNotes.Text)
        Dim content As String = webClient.DownloadString(strDownload)

Author Comment

ID: 39766510
I've requested that this question be closed as follows:

Accepted answer: 0 points for TheChos's comment #a39764713

for the following reason:

Worked once I added the reference.  Thanks.

Author Closing Comment

ID: 39766511
Worked once I added the reference.  thanks.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now