Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Server.HTMLEncode and the # (pound) symbol

Reply
Thread Tools

Server.HTMLEncode and the # (pound) symbol

 
 
Chris
Guest
Posts: n/a
 
      07-13-2004
Can someone tell me why HTMLEncode doesn't convert # to %23?

I am building a querystring and the # comes through as a #, which of
course kills the rest of the items in the querystring.

Any idea? Is there another function I can use? For now I just wrote
my own to swap out any #s.
 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      07-13-2004
query strings should not be HTML encoded, but rather URL encoded. try

HttpUtility.UrlEncode

-- bruce (sqlwork.com)


"Chris" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Can someone tell me why HTMLEncode doesn't convert # to %23?
>
> I am building a querystring and the # comes through as a #, which of
> course kills the rest of the items in the querystring.
>
> Any idea? Is there another function I can use? For now I just wrote
> my own to swap out any #s.



 
Reply With Quote
 
 
 
 
Chris
Guest
Posts: n/a
 
      07-15-2004
Holy crap, I can't believe that I didn't realize what I was doing.

I knew something wasn't right... I am a disgrace

Thanks!



"bruce barker" <(E-Mail Removed)> wrote in message news:<#(E-Mail Removed)>...
> query strings should not be HTML encoded, but rather URL encoded. try
>
> HttpUtility.UrlEncode
>
> -- bruce (sqlwork.com)
>
>
> "Chris" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) om...
> > Can someone tell me why HTMLEncode doesn't convert # to %23?
> >
> > I am building a querystring and the # comes through as a #, which of
> > course kills the rest of the items in the querystring.
> >
> > Any idea? Is there another function I can use? For now I just wrote
> > my own to swap out any #s.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(Encryption Package) error: cannot find symbol symbol: class BaseNCode clusardi2k@aol.com Java 6 08-29-2012 08:33 PM
Why ":symbol" failed but 'symbol' successed with JRuby 1.0.3? Song Ma Ruby 2 07-20-2008 04:08 AM
OT: Congtats Mr. Frisbee(funny tm symbol) and your Gators. MitchS MCSE 5 04-04-2006 08:57 PM
what's differnece between #ifdef symbol and #if defined(symbol) baumann@pan C Programming 1 04-15-2005 08:25 AM
Can't display trademark symbol in javascript and aspx mrwoopey ASP .Net 2 06-30-2003 11:50 PM



Advertisments