Deleting An item from a List Box from a Database
<p>Hi Im trying to delete an item from the listbox which the user selects here you can find my code and a screenshot tnx.</p>

<p>Code:</p>

<pre><code>public void deleteEvent(ListBox list_event)
{
    int i = list_event.SelectedIndex;

    ds.Tables["tblEvents"].Rows[i].Delete();
    da.Update(ds.Tables["tblEvents"]);
}
</code></pre>

<p>Im getting Object reference not set to an instance of an object Exception.</p>

<p>ScreenShot: 
<img src="http://i.stack.imgur.com/1cRTj.jpg" alt="enter image description here"></p>
