if a text box contain contents of a file like code of a aspx file. now we want to edit that code which is displayed on that text box what "should be code behind edit button"?? and after "that file should be saved and overwrite in the same location from which it is opened previously".

Recommended Answers

All 4 Replies

Can you please rephrase the question.

It sounds like you want open a file and display it's contents in a text box, make changes to the text and then save it back to the same location. If that is correct, all you need to do in the save bottom is use a stream writer to convert the new text into a stream and save to a file.

yes u got right. can u plz send the code

Rather than using textbox you should go for Richtextbox control...
Load the file in Richtextbox using loadfile() and SaveFile() to save file

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.