I have a dropdown that I create dynamically:
foreach(XmlNode item in doc.SelectNodes("//Monits/Monit")) {
User newuser = new User();
newuser.Id = item.SelectSingleNode("Id").InnerText;
newuser.UserName = item.SelectSingleNode("UserName").InnerText;
newuser.Email = item.SelectSingleNode("Email").InnerText;
usersddl.Items.Add(newuser.UserName);
}
I want to know if there is a way to save the user id in a hidden field according to the changed item in my ddl. For example, I select the name Robbie from the drop-down list, and its identifier will be stored in the hidden value of the field value. I don’t have the code anymore because I don’t know where to start ... Help someone?
source
share