Hi Karthik ,
Thank you so much for your reply.I don't need when button click event fires.I need when Textbox focus move.so i added Onblur in that i gave js,but in js that test method not accepted.whether i have to add any namespace or its built in function.
Here below i put my code for example.
<td>
<asp:TextBox ID="date" runat="server" Height="18px" Width="150px" MaxLength="10"
CssClass="txtbx"
ontextchanged="date_TextChanged" onblur="Validate() "></asp:TextBox>
<asp:CalendarExtender ID="date_CalendarExtender" runat="server" Enabled="True"
TargetControlID="date" Format="dd/MM/yyyy" PopupButtonID="ImageButton1"
DaysModeTitleFormat="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy" OnClientDateSelectionChanged="CheckForPastDate">
</asp:CalendarExtender>
<asp:RequiredFieldValidator ID="San1" runat="server"
ControlToValidate="date" ErrorMessage=" Date is Required"
SetFocusOnError="True" ValidationGroup="f" Display="None"></asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender ID="San1_ValidatorCalloutExtender" runat="server"
Enabled="True" TargetControlID="San1" PopupPosition="Left">
</asp:ValidatorCalloutExtender>
<br />
</td>
In the above code i used two js.one for calender extender(OnClientDateSelectionChanged="CheckForPastDate") to do not allow future date.next one is this(onblur="Validate()") validate event.I need solution when move focus in the textbox this event have to fire if i give wrong format.
Note:-
I used Validation Group also for buuton click event.
Regards
tg
Tg, if this helps please login to Mark As Answer. | Alert Moderator