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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

710 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