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();
}
2 Replies
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.
Sabari PrabuPosted Apr 29, 2015, 9:38 AM
Rahul BansalPosted Apr 29, 2015, 3:20 AM