Jump to content

ASP.NET GridView with Dropdown List Error


K_Drive

Recommended Posts

I am working through Scott Mitchell's ASP.Net in 24 hours book.I am completing the last project, which is a photo album app.I have a GridView that retrieves a list of uploaded photo image rows specific to the logged in user. The GridView is for editing and deleting rows.The photo Category ID field in the Gridview is a dropdown list. It is also user-specific. These categories were created by users in another web page.When a user uploads a photo image, he/she can select a "none" option for the Category.The ItemTemplate and EditItemTemplate in the dropdown both have the "none" choice added to them in this GridView.I am getting this error:'pictureReadOnlyCategories' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: value(The ID in the ItemTemplate for the dropdown list is the one listed above in the error: "pictureReadOnlyCategories".)I went through the book's instructions a couple of times and I am following them. Is there some step in this process that I am missing?Here is the link a screenshot of my code and the Design View that I posted in Flickr:http://www.flickr.com/photos/41863933@N07/4913581226/Thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...