Articles in this section
Category / Section

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

Update loaded content


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

C#

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;
}

 

VB

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

 

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/EditControlSample1870841073.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied