D
David C
I have a FormView that I want to set some defaults in some of the TextBox
and DropDown controls. I have tried code below but it is not working. I was
assuming that I could do this in the ModeChanged event of the FormView. Any
help is appreciated.
-David
Protected Sub fvTask_ModeChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles fvTask.ModeChanged
If fvTask.CurrentMode = FormViewMode.Insert Then
Dim tx As TextBox = fvTask.FindControl("txtTaskDate")
tx.Text = DateTime.Today.ToShortDateString
End If
End Sub
and DropDown controls. I have tried code below but it is not working. I was
assuming that I could do this in the ModeChanged event of the FormView. Any
help is appreciated.
-David
Protected Sub fvTask_ModeChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles fvTask.ModeChanged
If fvTask.CurrentMode = FormViewMode.Insert Then
Dim tx As TextBox = fvTask.FindControl("txtTaskDate")
tx.Text = DateTime.Today.ToShortDateString
End If
End Sub