Home > Forum > Jquery > Display alert message using jquery in asp.net

Display alert message using jquery in asp.net

by Thamil   on Jul 07, 2013   Category: Jquery  |  Views: 4855    |  Points: 5   |  Gold 
  Reply

I want to understand How to create alert message with jquery, let me know if anybody knows.

-question posted on befalf of JITENDRA KUMAR

Bookmark and Share:
 
  User Reply  | Ask a question  |   Reply 
  Re :Display alert message using jquery in asp.net   
by Thamil
on Jul 7 2013 5:46AM
Points : 10
Gold 
Hello JITENDRA KUMAR ,

see the below sample code will help you how to display alert message using jquery.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm22.aspx.cs" Inherits="WebApplication1.WebForm22" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Disable Right Click using JQuery</title>
<script type="text/javascript" src="Javascript/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(document).bind("contextmenu",function(e){
alert('Right click disabled'); return false;
});
});
</script>

</head>
<body>
<form id="form1" runat="server">
<div> Test - Disable Right Click using JQuery
</div>
</form>
</body>
</html>


above jquery code will popup alert message when right click on the page. i hope this will help you.

Recent Post

Latest Posts