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
469.4k
how to set image in header in MS WORD when export data?
Jan 21 2014 4:25 AM
how to set image in header in MS WORD when export data from gridview in asp.net?
i am using below code but i want to set image in header in MS WORD.
Response.Clear();
Response.Buffer = true;
Response.AddHeader("content-disposition",
"attachment;filename=" + gdvReport.Caption + ".doc");
Response.Charset = "";
Response.ContentType = "application/vnd.ms-word ";
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
GridView1.AllowPaging = false;
GridView1.HeaderRow.BackColor = System.Drawing.Color.White;
gdvReport.HeaderRow.BackColor = System.Drawing.Color.White;
GridView1.HeaderStyle.ForeColor = System.Drawing.Color.Black;
gdvReport.HeaderStyle.ForeColor = System.Drawing.Color.Black;
//GridView1.DataBind();
gdvReport.AllowPaging = false;
// gdvReport.DataBind();
gdvReport.RenderControl(hw);
GridView1.RenderControl(hw);
Response.Output.Write(sw.ToString());
Response.Flush();
Response.End();
Reply
Answers (
0
)
any sort of tool required for quality analysis ?
how to install the wpi 4.6 in windows 7