title: Simplemodal closing when I use CustomValidator server side validation in ASP.Net
body: <p>I'am building an asp.net application that have a gridview inside an update pannel.</p>
  
  <p>In this grid, I added a command field that raise a server event to fill fields on my modal popup hiden div section, show the modal for the the user and wait.</p>
  
  <p>The user is editing the fields and click save.</p>
  
  <p>Linked to these fields I have several Validation control.  some are standard, same are custom.</p>
  
  <p>When my customValidator are using client side script, everything is goiing fine; if one field is invalide, the summary section is displayed and the modal for still visible.</p>
  
  <p>But ... (cause without a but I won't have to writte this question)</p>
  
  <p>When my CustomValidator is a server side validation, even if it fail, the modal form is closed and my save button even is raised.</p>
  
  <p>I use a CustomValidator because that validation need a real time database verification.</p>
  
  <p>my issue is : how may I make this server side validation keeping the modal popup open if it return false (e.isvalid = false) ?</p>
  
  <p>If this is not possible .. i tried to call the :  ScriptManager.RegisterStartupScript((Control)sender, sender.GetType(), Guid.NewGuid().ToString(), "$('#basic-modal-content-province').modal({appendTo:'form', persist:true});", true);</p>
  
  <p>but it did not work -> it say that $ is not defined</p>
  
  <p>I use <a href="http://www.ericmmartin.com/projects/simplemodal/" rel="nofollow">http://www.ericmmartin.com/projects/simplemodal/</a> </p>
  
  <p>I am totally new to JQuery and AJAX, thanks for your help</p>
  
  <p>Steph</p>