1
Answer

please help in accessing the dropdownlist in codebehind

Photo of mansoor altaf

mansoor altaf

13y
1.7k
1
hi.
i am updating my table by placing datailsview in the webpage and giving it a datasource, i have introduced a dropdownlist in the middle of bounded control and want it to be filled according to my given instruction, but the dropdownlist is not accessible via ID in codebehind.


like e.g
<asp:TemplateField>
  <ItemTemplate>
  <asp:DropDownList ID="drpdownlist"  DataSourceID="deptsource" Width="150px" DataTextField="deptname" DataValueField="deptid" runat="server">
  </asp:DropDownList>
  </ItemTemplate>
  </asp:TemplateField>


thx in advance.
mansoor

Answers (1)