C
Cirene
I have a formview control.
When the user goes into insert mode I want to set the Calendar to today's
date.
How can I accomplish this? I know it's probably only 1 or 2 lines of code.
I tried this, but it doesn't work..
Protected Sub FormView1_ModeChanging(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.FormViewModeEventArgs) Handles
FormView1.ModeChanging
If e.NewMode = FormViewMode.Insert Then
Dim cal As Calendar =
CType(Me.FormView1.Row.FindControl("calDeadline"), Calendar)
cal.SelectedDate = Now.Date
End If
End Sub
Thanks!
When the user goes into insert mode I want to set the Calendar to today's
date.
How can I accomplish this? I know it's probably only 1 or 2 lines of code.
I tried this, but it doesn't work..
Protected Sub FormView1_ModeChanging(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.FormViewModeEventArgs) Handles
FormView1.ModeChanging
If e.NewMode = FormViewMode.Insert Then
Dim cal As Calendar =
CType(Me.FormView1.Row.FindControl("calDeadline"), Calendar)
cal.SelectedDate = Now.Date
End If
End Sub
Thanks!