Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2010  |  syntax: VB.NET  |  size: 1.10 KB  |  hits: 126  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Public Class _Default
  2.     Inherits System.Web.UI.Page
  3.  
  4.     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  5.         Dim test As String = String.Empty
  6.         If IsPostBack Then
  7.             test = "PostBack"
  8.         Else
  9.             test = "not a post back event"
  10.         End If
  11.     End Sub
  12.  
  13.     Protected Sub btnDoSomething_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnDoSomething.Click
  14.         Dim dCalendar As DateTime = Calendar1.SelectedDate
  15.         lblInfo.Text = dCalendar.ToString() & " Changed by Button"
  16.     End Sub
  17.  
  18.     Protected Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As EventArgs) Handles Calendar1.SelectionChanged
  19.         Dim dCalendar As DateTime = Calendar1.SelectedDate
  20.         lblInfo.Text = dCalendar.ToString()
  21.     End Sub
  22.  
  23.     Protected Sub Calendar1_VisibleMonthChanged(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MonthChangedEventArgs) Handles Calendar1.VisibleMonthChanged
  24.         Dim dMonth As Date = e.NewDate
  25.         lblInfo.Text = dMonth.Month
  26.     End Sub
  27. End Class