I thought i already assigned it?
string srch1 = "";
string srch2 = "";
if (cb1.SelectedItem.ToString() == "Book Title")
{
srch1 = "Book_Title";
}
else if (cb1.SelectedItem.ToString() == "Call Number")
{
srch1 = "Call_Number";
}
else if (cb1.SelectedItem.ToString() == "Accession_Number")
{
srch1 = "Accession_Number";
}
if (cb2.SelectedItem.ToString() == "Ascending Order")
{
srch2 = "ASC";
}
else
{
srch2 = "DESC";
}
As you can see, I already assigned it. So why the error?