I have this code:
int CityID= ((User)Session["LoggedInUser"]).CityID;
//When I debugg I get CityID = 7 here
ddlCity.Items.FindByValue(CityID).Selected = true;
And an error that I can not convert from int to string on the bottom line. How can I make it possibel?
FindByValue expects a string value so you have to convert CityID to a string.
Try this :