read national characters from the form

  • Thread starter Vladimír Kolesnik
  • Start date
V

Vladimír Kolesnik

Hi there,
I receive parameters from html page via 'post' method in the form.

<form action="http://localhost/project1/Default.aspx" method=post
ID="Form1">
<input type=text name=UID value=UID id=ID>
<input type=text name=UserName value=userName id=UN>
<input type=submit value=Send ID="Submit1" NAME="Submit1">
</form>

When I want to read values from the Form in my aspx page by
Request.Form.Get("param");

the national characters missed. I tried to set CultureInfo without success.

Thread.CurrentThread.CurrentCulture = new CultureInfo("cs-CZ",false );



Does anyone has idea how to solve this problem?
 
G

Guest

try to set RequestEncoding and ResponseEncoding
in web.config to national or UTF-8
UTF-8 works best

Thread CultureInfo most affects date, numbers and currency convertion
 
V

Vladimír Kolesnik

The problem is solved.
The htm page where the Form was placed had:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"/>

So I had to put the same encoding to web.config's attribute RequestEncoding.
Thanks for advice.
 

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