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
sanjay gupta
NA
248
0
Downloading Problem
Oct 21 2009 2:56 AM
Sir/Mam In my project i m using download link. On the click of that link it download the files but it gives the source code of that page. It is working fine at the local but when we upload to the server it gives the source code of that page. Plz help me i m sending the coding on Download link try { string str = GridView1.SelectedRow.Cells[5].Text; Response.ContentType = "Application/ms-world"; Response.AddHeader("content-disposition", "attachment;filename=" + str); FileStream sourcefile = new FileStream(@"E:\tec\admin\applicationform\" + str, FileMode.Open); long filesize = sourcefile.Length; byte[] getcontent = new byte[(int)filesize]; sourcefile.Read(getcontent, 0, (int)sourcefile.Length); sourcefile.Close(); Response.BinaryWrite(getcontent); } catch (Exception ex) { }
Reply
Answers (
1
)
how to get last login time when a user login into my login page?
converting usd to inr on paypal site in asp.net