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" />
<cc1:ModalPopupExtender ID="MPE10" runat="server" BackgroundCssClass="modalBackground"
DropShadow="false" PopupControlID="Panel1" TargetControlID="lblconfirm">
</cc1:ModalPopupExtender>