我计划在我的按钮单击事件中触发所需的归档验证。
<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server"
ControlToValidate="RadDatePicker3" OnLoad="RequiredFieldValidator10_Load"
Display="Dynamic" ForeColor="Red">*</asp:RequiredFieldValidator>
protected void RequiredFieldValidator10_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
if (RadDatePicker4.DbSelectedDate == null || RadDatePicker3.DbSelectedDate == null)
{
RequiredFieldValidator10.ErrorMessage = "*";
RequiredFieldValidator11.ErrorMessage = "*";
}
}
}
在我的按钮上单击我想检查必填字段验证...有什么建议吗?
上面的代码对我不起作用。