accent and Request.Form

F

franz

i have an html page that send datas from a form to an aspx page.

when, in aspx page, i take the value with Request.Form.Item("Nome") i
can't get the accents.

let's say, if i type the string "pietà", when i get it in the aspx
page i see "piet"

does anybody knows how can i fix this?

thanks
francesco
 
K

Ken Cox - Microsoft MVP

Does it make a difference if you use HtmlDecode?

label1.text = Server.HtmlDecode(Request.Form.Item("Nome"))

Ken
Microsoft MVP [ASP.NET]


i have an html page that send datas from a form to an aspx page.

when, in aspx page, i take the value with Request.Form.Item("Nome") i
can't get the accents.

let's say, if i type the string "pietà", when i get it in the aspx
page i see "piet"

does anybody knows how can i fix this?

thanks
francesco
 
J

Joerg Jooss

Thus wrote Franz,
i have an html page that send datas from a form to an aspx page.

when, in aspx page, i take the value with Request.Form.Item("Nome") i
can't get the accents.

let's say, if i type the string "pietà", when i get it in the aspx
page i see "piet"

does anybody knows how can i fix this?

The client is using the wrong request encoding. Insert
<meta id="Meta" runat="server" http-equiv="content-type" content="text/html;
charset=UTF-8" />
in the <head /> of your HTML form.

Cheers,
 
F

franz

thnaks for your help!
Joerg, i don't know why, but the code as you posted me does't look to
work.
To make it works i have to type this string.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

thanks
francesco
 
J

Joerg Jooss

Thus wrote Franz,
thnaks for your help!
Joerg, i don't know why, but the code as you posted me does't look to
work.
To make it works i have to type this string.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

I know why... I accidentally grabbed a server-side HTML Meta control from
one of my samples. It should have been exactly the text you've posted.

Cheers,
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top