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
Nishanthan Ganeshan
NA
16
10.5k
GridView to Excel Export
Jun 21 2013 11:32 AM
Im always getting error when i open my file "the file extension is invalid"
HttpResponse r = Response;
//clean up the response.object
r.Clear();
r.Buffer = true;
r.Charset = "UTF-8";
//set the response mime type for excel
r.ContentType = "application/vnd.ms-excel";
string attachment = "attachment; filename=Report" + ".xls";
r.AddHeader("content-disposition", attachment);
r.ContentEncoding = new System.Text.UTF8Encoding();
r.Write(content);
r.End();
Anyone whats the problem ?
Reply
Answers (
4
)
hoe to unzip a file
Unable to get the CRUD operation from the tutorial