D
darrel
I'm having this problem:
http://west-wind.com/weblog/posts/2068.aspx
On a postback, I'm trying to populate a drop-down list. I have this:
1 DDL_SubCategory.Enabled = true
2 DDL_SubCategory.DataSource = DS
3 DDL_SubCategory.DataTextField = "categoryName"
4 DDL_SubCategory.DataValueField = "categoryID"
5 DDL_SubCategory.DataBind
6 DDL_SubCategory.Items.Insert(ds.Tables(0).rows.Count, New
ListItem("-none-", 0))
It actually seems to populate the drop-down, but pukes on line 5 with this:
Specified argument was out of the range of valid values. Parameter name:
value
Looking at the link above, it appears to be some odd issue with the fact
that I'm doing this on a postback. But I can't quite decipher an answer on
that page.
I've been staring at this for about an hour...and will continue to do so,
but thought I'd toss this to the group in case there's maybe a common thing
I should be checking for.
-Darrel
http://west-wind.com/weblog/posts/2068.aspx
On a postback, I'm trying to populate a drop-down list. I have this:
1 DDL_SubCategory.Enabled = true
2 DDL_SubCategory.DataSource = DS
3 DDL_SubCategory.DataTextField = "categoryName"
4 DDL_SubCategory.DataValueField = "categoryID"
5 DDL_SubCategory.DataBind
6 DDL_SubCategory.Items.Insert(ds.Tables(0).rows.Count, New
ListItem("-none-", 0))
It actually seems to populate the drop-down, but pukes on line 5 with this:
Specified argument was out of the range of valid values. Parameter name:
value
Looking at the link above, it appears to be some odd issue with the fact
that I'm doing this on a postback. But I can't quite decipher an answer on
that page.
I've been staring at this for about an hour...and will continue to do so,
but thought I'd toss this to the group in case there's maybe a common thing
I should be checking for.
-Darrel