Tuesday, December 6, 2011

Export DataSet to XML File

create xml file from a datasetThis code snippet show how to export DataSet to xml file.Here we have taken data from database and fill dataset.We have taken a aspx page and a button there,after clicking the button a xml file will be created at specified location. public void CreateXml() { DataSet ds = new DataSet(); SqlDataAdapter da...

Monday, December 5, 2011

Insert XML data into SQL Server 2008

protected void Button1_Click(object sender, EventArgs e) { string EmpCode = null; string City = null; string State = null; string Country = null; string str = null; SqlConnection con = new SqlConnection("Data Source=localhost;Initial Catalog=Test;Integrated Security=True"); ...

Sunday, March 27, 2011

Create PDF from DataTable in Asp.net

In this article ,i am explaining you how to create pdf file from datatable.i am passing a datatable in this function and code to convert this in pdf file.I am using iTextSharp you can download it from internet. it is free.you need to create a simple asp.net page and get data from database.Then pass it to ExportToPDF method.We can set PDF page margins,...