อัตรา DayNumberText ของ ASP.NET

การระบุและการใช้งาน

อัตรา DayNumberText ใช้เพื่อของค่าตัวแปรของวันที่แสดงเป็นตัวอักษร

ตัวอย่าง

ตัวอย่างด้านล่างนี้แสดงว่าจะเอา DayNumberText จากวันที่ที่เลือกในปฏิทิน:

<script runat="server">
Sub DaySelect(obj As Object, e As DayRenderEventArgs)
  If e.Day.IsSelected Then
  Label1.Text = e.Day.DayNumberText
  End If
End Sub
</script>
<form runat="server">
<asp:Calendar id="cal1" runat="server"
OnDayRender="DaySelect" />
วันที่ที่เลือกคือ:
<asp:Label id="Label1" runat="server"/>
</form>

ตัวอย่าง

เลือก DayNumberText จากวันที่ที่เลือกในคอนโทรล Calendar