Umlaut in the Params of an ASP.NET page

R

Reinier

Hi all,

When I try to get the parameter from an ASP.NET page, all characters with a
umlaut disappear. So when I request the following URL:
http://www.MyWebsite.com/MyPage.aspx?Name="Müller"

and I use the following C# code:

string Name = Request.Params.Get("Name");

then the variable Name results in Mller, the ü disappears.

In the MyPage.aspx I use:

<META http-equiv="Content-Type" content="text/plain; charset=iso-8859-1">

Can someone explain why the characters with a umlaut disappear and how I
can support this characters in the aspx webpage?

Thanks a lot!

Regards,

Reinier.
 
C

Craig Deelsnyder

Hi all,

When I try to get the parameter from an ASP.NET page, all characters
with a
umlaut disappear. So when I request the following URL:
http://www.MyWebsite.com/MyPage.aspx?Name="Müller"
Can someone explain why the characters with a umlaut disappear and how I
can support this characters in the aspx webpage?

Thanks a lot!

make sure you encode the URL before using it in a browser...the following
is what it looks like:

/WebForm1.aspx?name=M%c3%bcller

use Server.UrlEncode in the .NET code if needed there
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top