Complete ASPX HTML Code:- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %> <!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 id="Head1" runat="server"> <title></title> <style type="text/css"> .error { border: 1px solid red; } .errorstyle { font-size: 16px; line-height: 22px; } .errorstyle ul li { margin-left: 5px; color: #ff0000; } </style> </head> <body> <form id="form1" ..

Read more

Complete ASPX Code:- %@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!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 id="Head1" runat="server"> <title></title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script> <script src="Scripts/jquery.Jcrop.js" type="text/javascript"></script> <link href="CSS/jquery.Jcrop.css" rel="stylesheet" /> <script language="javascript" type="text/javascript"> $(document).ready(function () { $('#<%=imgToCrop.ClientID%>').Jcrop({ onSelect: getAreaToCrop }); }); function getAreaToCrop(c) { $('#XCoordinate').val(parseInt(c.x)); $('#YCoordinate').val(parseInt(c.y)); $('#Width').val(parseInt(c.w)); $('#Height').val(parseInt(c.h)); } </script> </head> ..

Read more

First Method:- <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Disable right click on web page using jQuery</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript"> $(function () { $(this).on("contextmenu", function () { return false; }); }); </script> </head> <body> <form id="form1" runat="server"> <div> This is dummy text<br /> This is dummy text<br /> This is dummy text<br /> This is dummy text<br ..

Read more

Disable Right Click on All Images <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Disable right click on images on asp.net web page using jQuery</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript"> $(function () { $('img').on("contextmenu", function () { return false; }); }); </script> </head> <body> <form id="form1" runat="server"> <div> <img src="http://c.saavncdn.com/801/Kick-Hindi-2014-500×500.jpg" /> <br /> This is dummy text<br /> This is ..

Read more

jQuery AJAX JSON example in Asp.net to insert data into sql server database without postback Table Schema:- CREATE TABLE BookDetails( [BookId] [int] IDENTITY(1,1) NOT NULL, [BookName] [varchar](100) NULL, [Author] [varchar](100) NULL, [BookTypeId] [int] NULL, [Price] [decimal](18, 2) NULL, CONSTRAINT [PK_BookDetails] PRIMARY KEY CLUSTERED ( [BookId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = ..

Read more

Complete ASPX Code:- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <style type="text/css"> .clsTxt { width: 200px; min-height: 25px; max-height: 200px; resize: none; } </style> <script> function resizeTextBox(txt) { txt.style.height = "1px"; txt.style.height = (1 + txt.scrollHeight) + "px"; } </script> </head> <body> <form id="form1" runat="server"> <div> <table> <tr> <td>Description: ..

Read more

ASPX Complete Code:- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title>Reset all fields using jQuery</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript"> function resetAllControls() { $("#form1").find('input:text, input:password, input:file, select, textarea').val(''); $("#form1").find('input:radio, input:checkbox').prop('checked', false).prop('selected', false); }; </script> </head> <body> <form id="form1" runat="server"> <div> <fieldset style="width: 370px"> <legend>Application form</legend> <div> <table cellspacing="2"> <tr> <td>Full Name ..

Read more

ASPX Code:- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <style type="text/css"> .messagealert { width: 100%; position: fixed; top:0px; z-index: 100000; padding: 0; font-size: 15px; } </style> <script type="text/javascript"> function ShowMessage(message, messagetype) { var cssclass; switch (messagetype) ..

Read more