Skip to main content

Posts

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=…

Dynamic Drag’n Drop With jQuery And ASP.NET

In thi post i will show how to drag’n drop & saving the new positions to the database. Here is, how it is done by usingjQuery &jQuery UI: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default2" %><!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" src="Scripts/jquery-ui-1.7.2.custom.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#contentLeft ul").sortable({ opacity: 0.6, cursor: 'move', update: function() { var orde…

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 use Generic Delegate in C#

Action<T>:Encapsulates a method that takes a single parameter and does not return a value. Action<T1,T2>:Encapsulates a method that has two parameters and does not return a value. Action<T1,T2,T3>:Encapsulates a method that has three and does not return a value. Action<T1,T2,T3,T4>:Encapsulates a method that has four and does not return a value. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace GenericDelegate { class Program { static void Main(string[] args) { //Action<T> Action print = s => Console.WriteLine(s); string message = "Hello World"; print(message); //Action<T1,T2> Action add = (x, y) => Console.WriteLine(x+y); add(1, 2); } } }

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 display Image using Linq To Sql

Default.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._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></head><body><formid="form1"runat="server"><div><asp:GridViewID="grdCategories"runat="server"DataKeyNames="CategoryID"Width="600px"AutoGenerateColumns="false"><Columns><asp:BoundFieldDataField="CategoryID"HeaderText="CategoryID"/><asp:BoundFieldDataField="CategoryName"HeaderText="CategoryName"/><asp:TemplateField><ItemTemplate><asp:ImageID="Image1"runat="server"Image…