Specified argument was out of the range of valid values. Parameter name: value?
What does this error mean?
Specified argument was out of the range of valid values. Parameter name:
It's being thrown here:
DDL_SubCategory.Enabled = True
DDL_SubCategory.DataSource = DS
DDL_SubCategory.DataTextField = "categoryName"
DDL_SubCategory.DataValueField = "categoryID"
DDL_SubCategory.Items.Insert(DS.Tables(0).Rows.Cou nt, New ListItem("-none-",
It's happening on the DDL_SubCategory.DataBind() line. There's no parameter
there, so I'm confused as to what is the problem.
After some googling, the answer seems to be to add this line before the
DDL_SubCategory.SelectedValue = Nothing
That works! But I don't know why. Can anyone explain?
|All times are GMT. The time now is 10:22 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.