Posts

Showing posts from 2008

CSV Reader in C#

Typically, Importing data (contact list) from microsoft outlook to our application is necessary in almost every data driven application. The following examples shows the easy way to implement this functionality in C#. This class can be used in internationalization. ie. it can read unicode character also. using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Collections; using System.Text; using System.IO; namespace CSVReader { public class CsvParser { public static DataTable Parse(string data, bool headers) { return Parse(new StringReader(data), headers); } public static DataTable Parse(string data) { return Parse(new StringReader(data)); } public static DataTable Parse(TextReader stream) { return Parse(stream, false);

Drag and drop rows in gridview.....

Many a time, developers are confusing when they want to drag and drop rows within grid or another grid in asp.net. I worked a lot on this issue and found a solution which i am going to describe here.