Hi,
I am confused and need your help. I have a grid view and a form view. I have create sqldatasource and bind it to both controls, then I wan to update a combo box in both control( stateid) here is my code that is working :
I am confused that I am refering to the same "DataSourceID="SqlDataSourceState"" in both controls(Gridview & formView). I thought I should have a unique control id ( in this case <asp:SqlDataSource ID="SqlDataSourceState" exists in both controls. ... this what confused me.) So my question, Am I allowed to have duplicate datasourceID when I am using Templates?
GridView control edit stateid
<EditItemTemplate>
<asp:DropDownList ID="ddlStateInGvRow" runat="server"
DataSourceID="SqlDataSourceState"
DataTextField="state"
DataValueField="stateid"
SelectedValue='<%# Bind("stateid") %>'>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlD ...
Go to the complete details ...