Thursday, February 9, 2017

Hash table in C#



In C# hash table is the collection of key or values, which is used to map a key to value. We can use any non-null object as a key; we can retrieve the items from hash table by providing key.
The common function used in hash table is given below:

Add – used to add a pair of value to Hashtable
Syntax
HashTable.Add (Key, Value)
Hashtable h;
h.Add(“1”, “Sachin”);
  
ContainsKey – used to checked a specified key exist or not.
Syntax
bool HashTable.ContainsKey (key)
h.contains(“1”);

ContainsValue - used to checked a specified value exist or not.
Syntax 
bool HashTable.Containsvalue (value)
h.containsvalue(“Sachin”);

Remove – used to delete specified key or values.
Syntax 
HashTable.Remove(key)
h.remove(“1”)

Wednesday, February 1, 2017

Create a clone of asp controls in asp .net C# on button click

Create a clone of asp controls in asp .net C# on button click

I have faced a real time issue at my website, on button click the page creates duplicate control at my website. After searching, I found  that I have missed closing tag of div, so any html tag if you missed occur duplicate control generation problem.


Solution  : Missed any html closing tag.