Problem with ServerSideValidationExtender.

May 2, 2011 at 5:55 PM


I having declare ,my code Page in UTF8.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">

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

<META HTTP-EQUIV="Content-Language" CONTENT="pl">

<% Response.Charset= "UTF-8"; %>

<html xmlns="" encoding="UTF-8>

in code behind:

protected void Page_Load(object sender, EventArgs e)
    Response.ContentEncoding = System.Text.Encoding.UTF8;
    Request.ContentEncoding = System.Text.Encoding.UTF8;

in web.config:

   <globalization requestEncoding="UTF-8" responseEncoding="UTF-8" /> and adding to ScriptMenager EnableScriptGlobalization and EnableScriptLocalization:

 <asp:ScriptManager ID="ScriptManager1" runat="server"  EnableScriptGlobalization="true" EnableScriptLocalization="true"   >

And i dont know why I get error message  in ASCII code.

I show example:

[RegexValidator(@"^(?:[0-9a-zA-ZąćęłńóśźżĄĆĘŁŃÓŚŹŻ]{3,30})$",Ruleset = "RuleSetA",MessageTemplate="ółźćśźę@$&.")]

show message result is:

ółźćśźę@$&.-errormessage resultat

 I did not get answer on another forums and it didnt write on google why is that.

Pls help.