Posted on: 5/16/2014 10:28:11 AM | Views : 501

Hi All, suppose I have a web form call MyForm.aspx with a paragraph, two textboxes, and a submit button. I want to allow the user to replace a string in the paragraph with a string of his choice by copying a string in the paragraph and pasting it in one of the textboxes. Then he can enter the replacement string into the other textbox and click the submit button to replace the text in the paragrapgh. I have tried the following without success:
protected void btnSubmit_Click(object sender, EventArgs e) { bool foundString = false; string url = Server.MapPath("ReplacementString.aspx"); StreamWriter myWriter = new StreamWriter(url, false); StreamReader myReader = new StreamReader(url, false); string myLine = myReader.ReadToEnd(); myReader.Close(); while (myLine != null || foundString == false) { ...

Go to the complete details ...