Have you given CancelControlId and TargetControlId properties in modal popup extender. You need to assign corresponding button id's to these properties
ClimerChinna
Posts
-
ModalPopupExtender popup Problem -
Interview question: What are the 5 classes you use most often?System.web.ui system.io system.data system.data.sqlclient system.configuration :)
-
Interview question: What are the 5 classes you use most often?system.web.ui system.io system.data system.configuration system.data.sql :)
-
Date Validation<table>
<tr>
<td>
Start Date:
</td>
<td>
<asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
End Date:
</td>
<td>
<asp:TextBox ID="txtEndDate" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Rollout Date:
</td>
<td>
<asp:TextBox ID="txtRolloutDate" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnsave" runat="server" Text="Save" OnClientClick="fnSave();" />
</td>
</tr>
</table>JAVASCRIPT: function fnSave() { debugger; var startdate=new Date(document.getElementById("txtStartDate").value); var enddate=new Date(document.getElementById("txtEndDate").value); var rolloutdate=new Date(document.getElementById("txtRolloutDate").value); var curdate = new Date(); if (!((startdate.getFullYear() > curdate.getFullYear() + 2) && (startdate.getFullYear() < curdate.getFullYear() - 2) && (((enddate - startdate) / (24 * 60 * 60 * 1000 * 365)) < 2) && (((enddate - rolloutdate) / (24 * 60 * 60 * 1000 * 365)) < 1))) { alert("please provide correct dates"); } }