hi, sir
i am getting this error during runtime
'System.NullReferenceException: Object reference not set to an instance of an object.'
share code for same
public void SearchCount()
{
con.Open();
string cnt1 = " select count(*) from Mst_Property where Add_City='"+ddlLocation.SelectedItem.Text+"' and Add_Locality='"+ddlSubLoaction.SelectedItem.Text+"' and Prop_Stauts_ID='"+ddlProperty_Status.SelectedValue+"' and Prop_Type_Id='"+ddlProperty_type.SelectedValue+"' and BedRoom='"+ddlBedRooms.SelectedItem.Text+"'and BathRoom='"+ddlBathrooms.SelectedItem.Text+"' and Price between '"+ddlPriceMin.SelectedItem.Text+"' and '"+ddlPriceMin.SelectedItem.Text+"' ";
SqlCommand cmd = new SqlCommand(cnt1, con);
cmd.CommandType = CommandType.Text;
//cmd.ExecuteNonQuery();
int returnvalue = (int)cmd.ExecuteScalar();
lblcnt1.Text = returnvalue.ToString() +;
con.Close();
}