|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dropdown List with ParametersI have a dropdown list within a Formview on a web form (using ASP.NET, vb)
that uses parameters to filter the list that is displayed (After a client name is chosen in another dropdown list, this dropdown list filters the contact names based on the company ID). When I try to bind this dropdown list to the value that I want to store, I get an error saying that it must be a data-bound control -- which it is. If I don't explicitly bind the dropdown list and only have the datavaluefield selected, the value is not included on an insert. If I take off the parameters, it stores the value fine. Can I not store/insert values with a dropdown list that uses parameters?
http://www.webswapp.com/codesamples/aspnet20/dependentlists/default.aspx
Show quote Hide quote "TJHerman" wrote:
> I have a dropdown list within a Formview on a web form (using ASP.NET, vb) > that uses parameters to filter the list that is displayed (After a client > name is chosen in another dropdown list, this dropdown list filters the > contact names based on the company ID). > > When I try to bind this dropdown list to the value that I want to store, I > get an error saying that it must be a data-bound control -- which it is. If I > don't explicitly bind the dropdown list and only have the datavaluefield > selected, the value is not included on an insert. If I take off the > parameters, it stores the value fine. > > Can I not store/insert values with a dropdown list that uses parameters? Thank you -- I'll check this out.
Show quoteHide quote "Phillip Williams" wrote: > http://www.webswapp.com/codesamples/aspnet20/dependentlists/default.aspx > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "TJHerman" wrote: > > > I have a dropdown list within a Formview on a web form (using ASP.NET, vb) > > that uses parameters to filter the list that is displayed (After a client > > name is chosen in another dropdown list, this dropdown list filters the > > contact names based on the company ID). > > > > When I try to bind this dropdown list to the value that I want to store, I > > get an error saying that it must be a data-bound control -- which it is. If I > > don't explicitly bind the dropdown list and only have the datavaluefield > > selected, the value is not included on an insert. If I take off the > > parameters, it stores the value fine. > > > > Can I not store/insert values with a dropdown list that uses parameters?
Gridview extra header row with command button and paging
validation message only show in val summary when ShowSummary=true when no js to execute on client Formview Question Client ID of User Control in Page templates Event from one WebControl triggering an event in another Web control HttpContext.Current.Session problem XML Dropdownlist- Custom DataTextField radiobuttons - no list Sorting DataView problem Wizard Control |
|||||||||||||||||||||||