J
Jeffrey Walton
Hi All,
In my body, I have similar to below. The query is good when I use it with
(for example) a DataView.
When I try to use the SqlDataSource as a standalone component, the label is
not populated with text from the result of Eval(). How does one retrieve the
fields? Or must the SqlDataSource only be used with DataViews, GridViews, etc?
Thanks,
Jeff
....
<asp:Label ID="Label" runat="server" Text='<%# Eval("Description") %>' />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStringsroductTableConnection %>"
SelectCommand="SELECT [ShortName], [Description] FROM [Products] WHERE
([ShortName] = @ShortName)">
<SelectParameters>
<asparameter DefaultValue="XXXXX" Name="ShortName" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
In my body, I have similar to below. The query is good when I use it with
(for example) a DataView.
When I try to use the SqlDataSource as a standalone component, the label is
not populated with text from the result of Eval(). How does one retrieve the
fields? Or must the SqlDataSource only be used with DataViews, GridViews, etc?
Thanks,
Jeff
....
<asp:Label ID="Label" runat="server" Text='<%# Eval("Description") %>' />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStringsroductTableConnection %>"
SelectCommand="SELECT [ShortName], [Description] FROM [Products] WHERE
([ShortName] = @ShortName)">
<SelectParameters>
<asparameter DefaultValue="XXXXX" Name="ShortName" Type="String" />
</SelectParameters>
</asp:SqlDataSource>