← Tutti gli articoli
ASP.NET AJAX Control Toolkit - Calendar Extender - EnableScriptGlobalization
23 March 2011 ·
Asp.Net · Article ·
946 visite
The ASP.NET AJAX Control Toolkit includes an amazing number of controls. The calendar extender it's usefull because the format date for each country it's different from each other.
In our aspx page we insert:
- the Asp.Net ScriptManager (with EnableScriptGlobalization set to true)
- a texbox (TextBox1)
- a CalendarExtender (associated to our textbox)
- <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="true">
- </asp:ScriptManager>
- <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
- <asp:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"
- Enabled="True" TargetControlID="TextBox1">
- </asp:CalendarExtender>
To be sure the date format it's in the correct country format we have to insert a globalization tag in the System.Web section of the Web.Config:
- < system.web >
- <!--// Web.config section under system.web-->
- <globalization culture="it-IT" uiCulture="it" />