Aspdotnet-Suresh

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

jQuery Show Alert Message using Asp.net

Nov 16, 2012
Introduction

Here I will explain how to show or display alert message using jQuery in asp.net.

Description:
  
In previous articles I explained many articles relating to jQuery. Now I will explain how to show or display alert message using
jQuery in asp.net

By using jQuery Plugin We can implement this functionality for that we need to write the code like this

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>jQuery Show Simple Alert Message Example</title>
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function () {
$('#btnClick').click(function () {
alert('Alter with jQuery Button Clicked');
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="btnClick" type="button" value="Click" />
</div>
</form>
</body>
</html>
If you observe above code in header section I added one script file by using that we can interact with jQuery and we have a chance to implement required things. Here I written code like show alert message when we click on button. 

Live Demo

To see live demo click on below button it will show alert message 

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

Get the latest Asp.net, C#.net, 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

1 comments :

gnosys said...

Another tip, if you use instead of (input type="button") you will also need to set the clientIDMode to static in order to call it by the same name/id in jquery.

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

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