Articles in this section
Category / Section

How to update the loaded content in WinForms SyntaxEditor (EditControl) from external source?

1 min read

Update loaded content

In EditControl, you can update the loaded content from an external source. Refer to the following code examples.


this.editControl1.Text = string.Empty;
// Open a text file to extract
using (System.IO.StreamReader file = new System.IO.StreamReader(@"..\\..\\Files\\page.php"))
    string str = file.ReadToEnd();
    this.editControl1.Text = str;



Me.editControl1.Text = String.Empty
' Open a text file to extract
Using file As New System.IO.StreamReader("..\\..\\Files\\page.php")
 Dim str As String = file.ReadToEnd()
 Me.editControl1.Text = str
End Using



Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment