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
Raghav Kumar
NA
10
932
Web form Notepad
Mar 3 2015 10:45 AM
Hi guys... I am trainee in .net. I am currently trying to make web form notepad. For the save option I have used the save button on open and new page using the code as bellow but I am facing problem as the file is downloaded and the file with is saved are different. The downloaded file as shown in browser does not contain any content and the saved file contain the document. So I want to make the save file and downloaded file same. Can anyone solve my problem.
Thank you in Advance...
Code for save button....
protected void SaveButton_Click(object sender, EventArgs e)
{
Response.ContentType = "text/plain";
Response.AppendHeader("Content-Disposition", "attachment; filename=document.txt");
StreamWriter sw = new StreamWriter("C:\\Users\\admin\\Desktop\\Downloads\\documents.txt");
sw.Write(TextBox1.Text);
sw.Close();
Response.End();
}
Reply
Answers (
1
)
what are the default events of gridview control
Paste Special in html text editor?