suppose i have a create form and with button save data in database and i want to show that save successfully in div tag using JavaScript but when i click button then at a time on event work but not 2 event onclick and onClientClick ..
<here>
<asp:Button runat="server" CssClass="myButton" Text="Registration" ID="btnRegistration" OnClick="btnRegistration_Click " OnClientClick="return YourJavaScriptFunction();" Height="65px" Width="184px" ClientIDMode="Predictable"></asp:Button>
and
<script type="text/javascript">
function YourJavaScriptFunction() {
$("#message").slideDown("slow");
// this will prevent the postback, equivalent to: event.preventDefault();
return false;
}
</script>
I want that first data saved then work onClientClick event in one asp:button