Hi,
I have the following code in my page. Postback was not occured eventhough the code "return true" in OnClientClick.
I have tried the solution given in the following link. But it doesn't works for me.
Kindly give me a solution.
| <script type="text/javascript"> |
| function Validate() { |
| var lblEmp = document.getElementById('<%= lblEmp.ClientID %>'); |
| if (Condition){ |
| lblEmp.style.display = 'block'; |
| return false; |
| } |
| else{ |
| lblEmp.style.display = 'none'; |
| return true; |
| } |
| } |
| </script> |
| <asp:Button ID="btnSave" runat="server" Width="100px" CssClass="button" |
| Text="Save" OnClick="btnSave_Click" OnClientClick="return Validate();" /> |
Thanks & Regards,
Katte