function validateForm2()
{
if(document.getElementById('<%=SpellTextBox1.ClientID%>').value.length>50)
{
$find('<%=MPE10.ClientID%>').hide();
alert("Please edit title it is more than 50 characters.");
return false;
}
else if(document.getElementById('<%=SpellTextBox2.ClientID%>').value.length>500)
{
$find('<%=MPE10.ClientID%>').hide();
alert("Please edit Description it is more than 500 characters.");
return false;
}
else
{
$find('<%=MPE10.ClientID%>').show();
return false;
}}
<asp:Button ID="Btn_EventContinue" runat="server" CausesValidation="true" OnClick="Btn_EventContinue_Click"
OnClientClick="return validateForm2()" Text="Continue" ValidationGroup="Event"
TabIndex="9" />
<td align="center" valign="middle">
<asp:Panel ID="Panel1" runat="server" BorderColor="Black" BackColor="#D6FF7F" CssClass="ModalWindow"
Height="100" Width="300">
<table align="center" width="100%">
<tr>
<%--<td>
</td>--%>
</tr>
<tr>
<td>
<asp:Label ID="lblconfirm" Font-Size="8" Font-Names="Verdana" runat="server" Font-Bold="true"
Text="&nbsp;&nbsp;&nbsp;Do you Want to add another event?"></asp:Label>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<table class="style11" width="100%">
<tr>
<td align="right">
<asp:Button ID="btnconfirmyes" Width="60px" runat="server" OnClick="Btn_ConfirmYes_Click"
Text="Yes" />
</td>
<td align="left">
<asp:Button ID="btnconfirmno" Width="60px" runat="server" OnClick="Btn_ConfirmNo_Click"
Text="No" />
</td>
</tr>
</table>
</td>
</tr>
<cc1:ModalPopupExtender ID="MPE10" runat="server" BackgroundCssClass="modalBackground"
DropShadow="false" PopupControlID="Panel1" TargetControlID="lblconfirm">
</cc1:ModalPopupExtender>
</table>
</asp:Panel>
</td>