Formview insertitemtemplate won't populate dropdownlist in Insert Mode

  • Thread starter Thread starter jobs at webdos
  • Start date Start date
J

jobs at webdos

I have a formview that will either edit or insert records into a
database. when I call the page with a query string ?x= its goes to edit
mode and loads data from a datasource in the form and load data into
the dropdown (from another datasource) with no problem.

I'm using the same dropdownlist tag for both edit and insert, however
the dropdown only get populated in insert mode...

<asp:DropDownList ID="RouteCodeList" runat="server" SelectedValue='<%#
Bind("routeCode") %>' DataTextField="routeCode" DatasourceID=
"SQLRouteCodes">

</asp:DropDownList><br />



I've tried adding AppendDataBoundItems=true , and have tried replacing
the selectedvalue with ="", in insert mode it simply does not load the
entries.



Also, I've tried loading entries using findcontrol, but that gives me
an instance error.

Anybody, starting a formview in insert mode and populating a dropdown
beforehand? How?



Thanks.
 
Back
Top