Here is my code within my ASP.net project. I am trying to store some values into my object with my web form, but it pops up an error message saying: Cannot implicitly convert type ‘short’ to ‘string’.
textbox.Text = Convert.ToInt16(object.number);
lstbox.SelectedValue = Convert.ToInt16(object.ID);
Within my object class, I have declared my variables to int. Please let me know what is wrong.
The
TextandSelectedValueproperties are strings. Why would you convert the values toshortin the first place?