C
cthu
Hello
I would like some client side events to fire when controls are edited.
Right now I have:
For Each ctl In myForm.Controls
Select Case ctl.GetType().ToString
Case "System.Web.UI.WebControls.TextBox"
CType(ctl, TextBox).Attributes.Add("OnChange", "DirtyPage()")
Case "System.Web.UI.WebControls.RadioButton"
CType(ctl, RadioButton).Attributes.Add("OnChange", "DirtyPage()")
Case "System.Web.UI.WebControls.DropDownList"
CType(ctl, DropDownList).Attributes.Add("OnChange", "DirtyPage()")
End Select
Next ctl
This will add the attribute to the text box and drop downs, but not the
Radio buttons. I tried replacing "RadioButton" with "RadioButtonList" but
that didn't work.
Thanks!
I would like some client side events to fire when controls are edited.
Right now I have:
For Each ctl In myForm.Controls
Select Case ctl.GetType().ToString
Case "System.Web.UI.WebControls.TextBox"
CType(ctl, TextBox).Attributes.Add("OnChange", "DirtyPage()")
Case "System.Web.UI.WebControls.RadioButton"
CType(ctl, RadioButton).Attributes.Add("OnChange", "DirtyPage()")
Case "System.Web.UI.WebControls.DropDownList"
CType(ctl, DropDownList).Attributes.Add("OnChange", "DirtyPage()")
End Select
Next ctl
This will add the attribute to the text box and drop downs, but not the
Radio buttons. I tried replacing "RadioButton" with "RadioButtonList" but
that didn't work.
Thanks!