aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

JQuery html or asp button click event in

Jun 26, 2012

In this article I will explain how to use html button click event or asp button click events in using JQuery.


In previous article I explained how to show session timeout message before session expires in JQuery. In one situation I got requirement like implement some functionality in html button click event for that I used JQuery button click events. Here I will explain how to implement button click functionality in JQuery for html and asp button controls for that first open visual studio create new application and design your aspx page like this 

<html xmlns="">
<title>html and button click event in</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
$(document).ready(function() {
//This function will raise when click on html button control
$("#btnHtml").click(function() {
showalert('HTML Button Clicked');
//This function will raise when click on asp button control
$("#<%=btnAsp.ClientID %>").click(function() {
showalert('Asp Button Clicked');
function showalert(btnText) {
<form id="form1" runat="server">
<input type="button" id="btnHtml" value="HTML Button" />
<asp:Button ID="btnAsp" Text="Asp Button" runat="server" />

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Najib Khan said...

Dear Sir,
when i click on asp button the show dialog but in after post back it hide automatically tell the reason and one i want to put text box in dialog box and button tell me the situation r better for me.


Najib Khan said...

Dear sir,
when i click on asp button show me dialog box after post back it is automatically hide tell me reason and another i want to put textboxes and buttons of asp in dialog box please guide me


Anonymous said...

good post keep it up.

Give your Valuable Comments

Other Related Posts

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.