read national characters from the form

  • Thread starter Thread starter Vladimír Kolesnik
  • Start date 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?
 
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
 
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.
 
Back
Top