Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
How to filter lines in textbox
Sabari Prabu
Apr 28 2015 1:44 AM
536
Reply
I have three radio buttons. When i press every button the text in textbox should get filtered according to that.
for example: if lastlog radio button is clicked only last 5 lines should appear
if lastfiveradio button is clicked only last 25 lines should appear
How can i do that?
if (lastlogradio.Checked == true)
{
StreamReader objstream = new StreamReader(listBox1.Items[listBox1.SelectedIndex].ToString());
resulttxtbox.Text = objstream.ReadToEnd();
}
else if (lastfiveradio.Checked == true)
{
StreamReader objstream = new StreamReader(listBox1.Items[listBox1.SelectedIndex].ToString());
resulttxtbox.Text = objstream.ReadToEnd();
}
else if (alllogsradio.Checked == true)
{
StreamReader objstream = new StreamReader(listBox1.Items[listBox1.SelectedIndex].ToString());
resulttxtbox.Text = objstream.ReadToEnd();
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Structured table for search option.
When i make listbox without extension i am facing exception