L
Luc
Hi,
the gridview is connected to sqldatasource1.
is it possible to connect one label into that gridview to one field in
sqldatasource1 and another label in the same gridview to another
sqldatasource2?
I did this, but i don't know how to link label 'fromtable2' to 'fieldtb2' in
sqldatasource2.
I couldn't find propety "datasourceID" for label (or textbox). Dropdownlist
has that property.
Thanks for help
Luc
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:myconn %>"
SelectCommand="SELECT fieldtb2 FROM [table2] ></asp:SqlDataSource>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server"
DataSourceID="SqlDataSource1" DataKeyNames="field1" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Label id="fromtable1" runat="server" Text='<%#
eval("fieldtb1") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Label id="fromtable2" runat="server" Text='<%#
eval("fieldtb2") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</gridview>
the gridview is connected to sqldatasource1.
is it possible to connect one label into that gridview to one field in
sqldatasource1 and another label in the same gridview to another
sqldatasource2?
I did this, but i don't know how to link label 'fromtable2' to 'fieldtb2' in
sqldatasource2.
I couldn't find propety "datasourceID" for label (or textbox). Dropdownlist
has that property.
Thanks for help
Luc
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString= said:</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:myconn %>"
SelectCommand="SELECT fieldtb2 FROM [table2] ></asp:SqlDataSource>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server"
DataSourceID="SqlDataSource1" DataKeyNames="field1" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Label id="fromtable1" runat="server" Text='<%#
eval("fieldtb1") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Label id="fromtable2" runat="server" Text='<%#
eval("fieldtb2") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</gridview>