Asp.net(vb.net)的Calendar只顯示日,一,二,三...11/24

王朝c#·作者佚名  2006-12-17
窄屏简体版  字體: |||超大  

Asp.net(vb.net)的Calendar只顯示日,一,二,三...11/24

Asp.net(vb.net)的Calendar只顯示日,一,二,三...11/24 查了一些相關的做法,網頁在顯示時總會出現'實例為只讀',下面的做法總算是OK啦^__^

<asp:Calendar id='Calendar1' runat='server' Height='152px' Width='184px' Font-Names='新細明體' Font-Size='9pt'

DayNameFormat='Full'>

<TodayDayStyle BackColor='#80FF80'></TodayDayStyle>

<DayStyle BackColor='#EEF6FF'></DayStyle>

<DayHeaderStyle BackColor='#D5E5F8'></DayHeaderStyle>

<TitleStyle Font-Bold='True' ForeColor='White' BackColor='#8CA5CE'></TitleStyle>

<WeekendDayStyle BackColor='#D5E5F8'></WeekendDayStyle>

</asp:Calendar>

Imports System

Imports System.Globalization

Imports System.Threading

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'在這裡放置使用者程式碼以初始化網頁

Dim arrDayNames() As String = {'日', '一', '二', '三', '四', '五', '六'}

Dim culture As CultureInfo = New CultureInfo('zh-TW')

culture.DateTimeFormat.AbbreviatedDayNames = arrDayNames

Me.Calendar1.DayNameFormat = DayNameFormat.Short

Thread.CurrentThread.CurrentCulture = culture

End Sub

參考來源:http://www.cnblogs.com/wangsaokui/archive/2004/09/11/10229.html

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航