470,586 Members | 1,272 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,586 developers. It's quick & easy.

Just getting started

I am just getting started messing with ASP 2.0, and am working on creating a
quick data entry web hooked to a SQL database.

I am using stored procedures to get and push data.

I am having a problem isolating individual fields in a FormView. I am
trying to manually add some values to a Dropdownlist in the EditMode of the
Formview.

I have a serious of dropdownlists in the formview that are populated from
SqlDataSource objects, and the overall Formview is populated via a
SqlDataSource object as well. I need to be able to add a couple aditional
items to the list of items in the dropdownlists before the overall formview
is bound.

I currently get an error like "DropDownBlah has a SelectedValue which is
Invalid because it does not exist in the list of items." I have not been
able to figure out where to grab a reference to the dropdown and add the
additional options.

I have tried the following basic code, but it is not working.
**************
If UnitDetailForm.CurrentMode = FormViewMode.Edit Then
AssigneeDropDownList =
CType(UnitDetailForm.FindControl("ddUsers"), DropDownList)
AssigneeDropDownList.Items.Add(New ListItem("None", "None"))
End If
**************

Any tips would be appreaciated.
Mar 7 '06 #1
0 1087

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by tamdino | last post: by
84 posts views Thread by Bibby | last post: by
6 posts views Thread by Jack Duijf | last post: by
3 posts views Thread by Sheldon Rabin | last post: by
11 posts views Thread by sterling.mckay | last post: by
1 post views Thread by =?Utf-8?B?Q29kZVNsaW5nZXI=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.