I have to remove the empty li from the output.
My Output is like this.
Audit Process Optimization:
My function is like this-
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.
Jignesh TrivediPosted Oct 18, 2013, 12:31 AM
agree with kailash...just timing the content list box item.
int count = listBox2.Items.Count;
for (int i = count - 1; i >= 0; i--)
{
if (listBox2.Items[i].ToString().Trim() == "")
listBox2.Items.RemoveAt(i);
}
hope this will help you.
Posted Oct 18, 2013, 12:12 AM
try bellow code
int count = listBox2.Items.Count;
for (int i = count - 1; i >= 0; i--)
{
if (listBox2.Items[i].ToString() == " ")
listBox2.Items.RemoveAt(i);
}