|
|
自定义Calendar控件星期显示的文字 |
|
|
<%@ Import Namespace="System.Globalization" %> <%@ Import Namespace="System.Threading" %> <script language="C#" runat="server"> void page_load(Object sender, EventArgs e){ Thread t=Thread.CurrentThread; CultureInfo o = t.CurrentCulture; CultureInfo n=(CultureInfo)o.Clone(); n.DateTimeFormat.DayNames=new string[]{"日","一","二","三","四","五","六"}; n.DateTimeFormat.FirstDayOfWeek=DayOfWeek.Sunday; t.CurrentCulture=n; } </script> <html> <head>
</head> <body> <form runat="server"> <asp:Calendar id="calendar1" runat="server" ShowDayHeader="True" DayNameFormat="Full" Font-Size="9" Width="200" Font-Name="Verdana"/> <asp:label ID="lb1" /> </form> </body> </html>
缺缺 发表于 2004-9-28 [所属栏目: .Net | 返回首页]
|
|
|