W
WTH
I'm obviously missing something fundamental here.
I have an ASP.Net web page written in C#.
On this page is a list box that is populated with strings when the page is loaded.
There is a button on this page.
If I make a selection in the listbox, and then push the button, my button handler code cannot find any selected items in the list
box and the list box shows visually that it has no selected items.
Obviously this is some sort of 'when you write apps in web pages you must do this' kind of thing.
Anyone have a solution for this?
*** HERE IS THE CODE TO LOOK FOR THE SELECTED ITEMS WHEN BUTTON IS PUSHED ***
//Never evaluates as true
for( int i = 0; i < m_oListSensors.Items.Count; i++ )
{
string l_strSensorIP = "";
if( m_oListSensors.Items.Selected == true )
{
l_strSensorIP = m_oListSensors.Items.ToString();
}
}
*******
WTH
I have an ASP.Net web page written in C#.
On this page is a list box that is populated with strings when the page is loaded.
There is a button on this page.
If I make a selection in the listbox, and then push the button, my button handler code cannot find any selected items in the list
box and the list box shows visually that it has no selected items.
Obviously this is some sort of 'when you write apps in web pages you must do this' kind of thing.
Anyone have a solution for this?
*** HERE IS THE CODE TO LOOK FOR THE SELECTED ITEMS WHEN BUTTON IS PUSHED ***
//Never evaluates as true
for( int i = 0; i < m_oListSensors.Items.Count; i++ )
{
string l_strSensorIP = "";
if( m_oListSensors.Items.Selected == true )
{
l_strSensorIP = m_oListSensors.Items.ToString();
}
}
*******
WTH