I have troubles with calendar control. When I tryed to run site with this control in Visual Studio i see the correct language - russian, but when i tryed to run deployed site using iis, i see english - names of months, days header.
i tryed to write in config files globalisation, ui culture, add charset win-1251, but no differences. i see only english words.
Have you set the EnableScriptGlobalization property to true in the scriptmanager?yes
Hi
You should specifily its Culture and UICulture. Furture more, you should set ScriptManager's EnableScriptGlobalization and EnableScriptLocalization property to true.
EnableScriptLocalization: http://www.asp.net/AJAX/Documentation/Live/mref/P_System_Web_UI_ScriptManager_EnableScriptLocalization.aspx
EnableScriptGlobalization: http://www.asp.net/AJAX/Documentation/Live/mref/P_System_Web_UI_ScriptManager_EnableScriptGlobalization.aspx
Here is the sample.
<%@. Page Language="C#" Culture="ru-RU" UICulture="ru"%><%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"></script><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="true" EnableScriptLocalization="true" > </asp:ScriptManager> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:Button ID="Button2" runat="server" Text="hide" OnClientClick="return hideCalendar()"/> <asp:Button ID="Button1" runat="server" Text="show" OnClientClick="return false;"/> <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1" PopupButtonID="Button1" > </ajaxToolkit:CalendarExtender> </form></body></html>
I hope this help.
Best regards,
Jonathan
No comments:
Post a Comment