Hi All,
Just writing a quick bit of code on a user account using a drop down list to identify the type of user they are. I use the following to set the ddl initally:
foreach (ListItem item in ddlUserType.Items)
{
if (UserTypeReference.FromId(Convert.ToInt32(item.Value)) == user.UserType)
{
item.Selected;
break;
}
}
I am then changing the selected value and pressing a button to perform an update on the user account. However, the SelectedItem always remains the one that i initally set. I am using the following line of code to try and set the user type property of my user object:
user.UserType = UserTypeReference.FromId(ddlUserType.SelectedIndex);
Does anyone know / can anyone see what i am doing wrong here?
Thanks In advance for any help.
...
Go to the complete details ...