I am using validation control in my web application for registraion form
I am having one Problem with My Coding When i Click submit button..
When validation summary show if it having errors..Its working Properly....
But when i refresh Page with errors Onclient click doesnot call...
automatically call to onclick event (server Side) even validation summary having
Error...
how to i solve it i put my code below
<
telerik:RadToolTip runat="server" ID="RadToolTip10"
Position="Center"
RelativeTo="Element"
ManualClose="true"
OnClientBeforeShow="CheckIfShow"
TargetControlId="btnSubmit" Skin="Web20"
Title="You have following Errors" Modal="true" MouseTrailing="true">
<table cellpadding="0" cellspacing="0" width="300"><tr><td></td><td>
<asp:ValidationSummary id="ValidationSummary1" runat="server"/></td></tr>
<tr><td></td><td align="right"><asp:Button ID="btnClose" runat="server" Text="Close" OnClientClick="HideTooltip()" />
</td></tr></table>
</telerik:RadToolTip>
<
asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClientClick="ShowTooltip();" OnClick="btnSubmit_Click" />
Java Script:function
ShowTooltip()
{
window.setTimeout(
function()
{
var tooltip = $find("<%=RadToolTip10.ClientID %>");
//API: show the tooltip
tooltip.show();
}, 10);
}
function CheckIfShow(sender, args)
{
var summaryElem = document.getElementById("<%=ValidationSummary1.ClientID %>");
//check if summary is visible
if (summaryElem.style.display == "none")
{
//API: if there are no errors, do not show the tooltip
args.set_cancel(
true);
}
}
function HideTooltip()
{
var tooltip = $find("<%=RadToolTip10.ClientID %>");
//API: hide the tooltip
tooltip.hide();
}
RegardsFriend