Skip to main content

Posts

Showing posts with the label Jquery

How To change the color of gridview row on mouseover using JQUERY

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="_Default" %><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headid="Head1"runat="server"><title></title><scriptsrc="Scripts/jquery-1.3.2.js"type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#<%=GridView1.ClientID%> tr").filter(function() { return $('td', this).length && !('table', this).length }).hover ( function() { $(this).css("background-color", "red") }, function() { $(this).css("background-…

How To Create TextBox Dynamically using Jquery t and Read Control Value In Code Behind

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title><scriptsrc="Scripts/jquery-1.3.2.js"type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#btnOfficial").click(function() { var hdValue = $("#theValue"); var num = ($("#theValue").val() - 1) + 2; hdValue.val(num); var newDiv = $(document.createElement('div')).attr("id", 'my' + num + 'Div'); newDiv.after().html('<input type=…

How To Use Jquery Google Chart In asp.net

In this post i will show how to add Jquery Google Chart in asp.net. Click Here to download Jquery Google Chart Plugin<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Chart.aspx.cs" Inherits="Chart" %><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title>jQuery Google Chart Demo</title><scriptsrc="jquery-1.3.2.min.js"type="text/javascript"></script> <script src="jgcharts.pack.js" type="text/javascript"></script> <link href="Style/style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> $(document).ready(function() { $("#btnCreate").click(function() { …

How To Add Jquery Plugin Tablesorter in Gridview

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title><scriptsrc="Scripts/jquery-1.3.2.js"type="text/javascript"></script> <script src="Scripts/Jquery.tablesorter.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#grdStudent").tablesorter(); } ); </script></head><body><formid="form1"runat="server"><div><asp:GridViewID="grdStudent"runat="server"UseAccessibleHeader="true…

Cascading Dropdownlist using JQuery and WebService

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title><scriptsrc="Scripts/jquery-1.2.6.js"type="text/javascript"></script> <script type="text/javascript"> $().ready(function() { $.ajax({ type: "POST", url: "WebService.asmx/GetStates", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { BindStateddl(msg.d) } }); //Fetch related city …

How to consume WCF service using JQuery

Create an ASP.NET Web Application (WCF service)Add a new item, aspx page (Default.aspx)You now have an WCF-service with .svc as extension, and that service implements an Interface. It's in the interface we'll set the attributes needed to return JSONCreate a class, Student as below. The attributes "DataContract" and "DataMember" must be defined for the class and the properties that would be returned through the WCF service [DataContract] publicclass Student { [DataMember] publicint StudentId { get; set; } [DataMember] publicstring StudentName { get; set; } [DataMember] publicint Marks1 { get; set; } [DataMember] publicint Marks2 { get; set; } [DataMember] publicstring EmailAddress { get; set; } } Now add a reference to System.ServiceModel.Web this is for WebGet AttributeAdd the WebGet-attribute as specified below. The BodyStyle Bare means "Both requests and responses are not wrapped" - we really want nothing more than a true JSON-respo…