Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 6th, 2004, 10:47 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default Server.UrlDecode Ques

When I use UrlEncode it works correctly but when I use UrlDecode I don't get the correct answer?

Instead of getting "This is a <Test String>."
I get "This is a ."


Dim encodedstr As System.Web.HttpUtility
        Dim encoded As String
        Dim decode As String


        encoded = encodedstr.UrlEncode("This is a <Test String>.")
        Label2.Text = encoded.ToString

        decode = encodedstr.UrlDecode(encoded)
        Label3.Text = decode

-------------------------------------------------
What am I overlooking???


 
Old October 7th, 2004, 08:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Decoding means the html is "live" so to speak, so that is the right response. It thinks that <Test String> is an element, and is rendered appropriately. Encode the string to get the othe response.

Brian
 
Old October 7th, 2004, 09:37 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Got it. Thanks

 
Old October 7th, 2004, 10:46 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

No problem.





Similar Threads
Thread Thread Starter Forum Replies Last Post
SAXON Ques dev.user06 XSLT 4 July 26th, 2006 10:44 AM
another ques regarding Javascript messagebox hoailing22 ASP.NET 1.0 and 1.1 Basics 6 June 7th, 2005 01:10 AM
Rephrase of my ques Regornil JSP Basics 1 July 25th, 2004 09:24 PM
Html Spacer Ques bekim BOOK: Beginning ASP.NET 1.0 0 July 2nd, 2004 07:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.