2004/09/28 | 自定义Calendar控件星期显示的文字
类别(.Net) | 评论(3) | 阅读(537) | 发表于 13:48
<%@ 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>
0

评论Comments

日志分类
首页[102]
.Net[11]
VBScript[1]
JScript[51]
XML[3]
HTML&CSS[9]
ASP[8]
ActiveX[4]
Software[10]
Other[5]