ASP.NET - Custom validator control in updatepanel

Asked By Anandh Ramanujam on 06-Mar-12 07:31 AM
hi,

CustomValidator control is not working in updatepanel...

Can anybody explain me why ??

Thanks
kalpana aparnathi replied to Anandh Ramanujam on 06-Mar-12 07:47 AM
hi,

 please remove ValidateEmptyText, used a RequiredValidator and set EnableClientValidation to false for both control.

Regards,
kalpana aparnathi replied to Anandh Ramanujam on 06-Mar-12 07:49 AM
hi,

Use link for your solution:click here

Regards,
Somesh Yadav replied to Anandh Ramanujam on 06-Mar-12 08:06 AM

just add triggers block to the first update panel...where the textbox and customvalidatoe is incorporated...just like below...

<Triggers>
          <asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />
</Triggers>

Triggers will let know the corresponding updatepanel to postback when that particular control specified in triggers is fired.

Hope this solves your problem.