I'm working in Visual Studio Express 2008. I have a RichTextBox control. The following code compiles, but the text file doesn't actually appear in the control:
|
Thanks
|
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suthish NairPosted Feb 7, 2011, 1:56 PM
Just click only once on checkbox, its ajax enabled and wait for sometime.
It will indicate with a green label as accepted answer.
Suthish NairPosted Feb 7, 2011, 5:29 AM
Query Resolved?
Suthish NairPosted Feb 6, 2011, 10:54 AM
Suthish NairPosted Feb 6, 2011, 5:53 AM
Jaish MathewsPosted Feb 6, 2011, 5:42 AM
I think it's loading, but you are not able to see it as of richtextbox control size. Do below 2 steps.
openFileDialog1.DefaultExt = ".txt";
openFileDialog1.Filter = "Text Files|*.txt";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
try
{
richTextBox1.LoadFile(openFileDialog1.FileName,RichTextBoxStreamType.PlainText);
}
catch (ArgumentException) { }
}