Posted on: 3/3/2014 3:50:21 AM | Views : 628

I have a required field validation control on a modal popup.  There is also a valdation group on the popup.  When I Hit insert button, the popup closes and the validation messsage is lost. I assume that I need to do another Show( ) to keep the window open, but  how will it know that the validation failed?

On the click of the button
if (Page.IsValid == false) { RequiredFieldValidator distvalid = (RequiredFieldValidator)FormView1.FindControl("distvalid"); TextBox tbDistance = (TextBox)FormView1.FindControl("tbDistance"); distvalid.ControlToValidate = tbDistance.ToString(); pnlAdd_ModalPopupExtender.Show(); } on:

Go to the complete details ...