TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hardik Patel
NA
378
468.1k
store excel in folder on button event without save option?
Oct 23 2013 4:54 AM
how to generate excel from dataset and store it in folder without save option?
i am using below but it asked for the save option.
ds = new DataSet();
ds = sq.ExecuteDataSet("Filllresult1", param);
if ((ds != null) && (ds.Tables.Count != 0) && (ds.Tables[0].Rows.Count != 0))
{
HttpResponse response = HttpContext.Current.Response;
response.Clear();
//response.Charset = "";
response.ContentType = "application/vnd.ms-excel";
response.AddHeader("Content-Disposition", "attachment;filename=Smarks.xls");
//string filename = "Mark" + p;
//response.AddHeader("Content-Disposition", "C:\"" + fileName + "\"");
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
DataGrid dg = new DataGrid();
dg.DataSource = ds;
dg.DataBind();
dg.RenderControl(htw);
response.Write(sw.ToString());
response.End();
}
Reply
Answers (
1
)
force login in 2nd s/m and quit in 1st s/m for same user
Can anyone decrypt this string???