Author: muybn | Posted on: 4/10/2009 2:59:47 AM | Views : 442

I have a CreateUserWizard whose values are written to a database then later displayed for editing with a .Net 3.5 ListView. One of the fields in the CUW is a dropdown list for the state they reside in, but I'm not making it a requirement. An error occurs, however, when a person tries to edit his/her profile through the page with the ListView: "SelectedValue does not exist in the list of items." This obviously occurs because it doesn't like the -1 position of "Select A State": <asp:ListItem Text="--State--" Value="-1" /> This is my present code-behind which assigns the DDL's value to the profile (which writes to the database): p.State = DirectCast(Util.FindChild(cuw, "ddlState"), DropDownList).SelectedValue
Short of the state being a user requirement, w ...

Go to the complete details ...