protected void btnSaveSite_Click(object sender, EventArgs e)
{
if (ListSelectedCar.Items.Count > 0)
{
listSelectedCar.SelectedIndex = 0;
}
addNewInventory addNewInventoryObject = new addNewInventory();
DataTable dt = addNewInventory.Update_Inventory( id, listSelectedCar.SelectedItem.Text)
I have two List Boxes ,one of them(ListBox1) List all the available cars and other List box (ListBox2) holds the Car that Customer Selects.If List box 2 holds value there is no problem
but as I try to save the Inventory without value in ListBox2 I get Null Referance error .