/* Event used for export style in the form of csv format*/ protected void btnExport_Click(object sender, EventArgs e) { StoreFront ObjStoreFront = new StoreFront(); DataSet ds = new DataSet(); ds = ObjStoreFront.GetStyleExport(); if (ds.Tables[0].Rows.Count > 0) { DataTable dt = new DataTable(); dt = ds.Tables[0]; Response.ContentType = "Application/x-msexcel"; Response.AddHeader("content-disposition", "attachment;filename=Style.csv"); Response.Write(ToCSV(dt)); Response.End(); } }