Skip to main content

Posts

Showing posts from October, 2012

Binding Linked List to GridView

Pre R equirements :    You need to know how to create a Linked list and basic of GridView component. If you don't know how to create a simple Linked List you may fallow my previous post regarding Linked List in ASP.Net.  To Bind the Linked List to GridView first you need to place GridView component on you  Web Page. Then on .aspx page  .. you need to add following code .. you may extend it as per your requirements. < asp : GridView ID ="GridView1" runat ="server" Width ="16px"             Height ="50px" ToolTip ="Unique Words and Freq"                   onselectedindexchanged ="GridView1_SelectedIndexChanged1">                 < columns >            ...

Binary Search Tree in ASP .Net

Binary Search Tree in ASP .Net To create Binary Search Tree(BST) in Asp.net application   first you need to create a Node class. Something like following : class Node {     public String data;     public int freq = 0;     public Node left, right;     public Node()     { }     public Node( String data)     {         this .data = data;         left = null ;         right = null ;     } } Next You need to create a class including different functions.Like class BinaryTreeImp {     Node root;     String outputfreq = "" ;     static int count = 0;     public BinaryTreeImp()     {      ...

Linked List in ASP.NET

Create a Linked link or Generic List in Asp.Net A Simple way to create a Linked List in ASP.Net C# by using List&ltT&gt = new List&ltT&gt(); Class. &ltT&gt Can be any data type or user defined class. Like, if you want to create a List of Sting or int datatype. List&ltString&gt LS= new List&ltString&gt(); or List&ltint&gtLI= new List&ltint&gt(); to add nodes in List: LS.Add("U"); LS.Add("M"); LS.Add("R"); or LI.Add(7); LI.Add(8); LI.Add(6); List will be shown like this : U->M->R or 7->8->6 If you want to add more than one variables in one Node then you need to create a class for that. For exp u want to store Name and Age of student in a node. Then you first create a user defined class for that. class Node { public String Name; public int Age = 0; public Node() { } public Node(String data, ag) { this.Name = data; this.Age=ag; } } He...