R
R.A.M.
Hi,
Please help. I have definied a GridView associated to DropDownList but
it's not visible. Here's the code:
<aspropDownList ID="Publishers" runat="server"
DataSourceID="PublishersSQL" DataTextField="Name"
DataValueField="Name" AutoPostBack="True" />
<asp:SqlDataSource ID="PublishersSQL" runat="server"
ConnectionString="<%$ ConnectionStrings:SQLServerConnectionString %>"
SelectCommand="SELECT Name FROM Publishers ORDER BY Name">
</asp:SqlDataSource>
<asp:GridView ID="Books" runat="server"
AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
DataSourceID="BooksSQL" GridLines="None">
<Columns>
<asp:CommandField ShowSelectButton="True" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="BooksSQL" runat="server"
ConnectionString="<%$ ConnectionStrings:SQLServerConnectionString %>"
SelectCommand="SELECT Books.Title, Books.Author, Books.ISBN FROM Books
INNER JOIN Publications ON Books.ISBN = Publications.ISBN WHERE
(Publications.PublisherName = @Publisher) ORDER BY Books.T">
<SelectParameters>
<asp:ControlParameter ControlID="Publishers"
Name="Publisher" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
Thank you
/RAM/
Please help. I have definied a GridView associated to DropDownList but
it's not visible. Here's the code:
<aspropDownList ID="Publishers" runat="server"
DataSourceID="PublishersSQL" DataTextField="Name"
DataValueField="Name" AutoPostBack="True" />
<asp:SqlDataSource ID="PublishersSQL" runat="server"
ConnectionString="<%$ ConnectionStrings:SQLServerConnectionString %>"
SelectCommand="SELECT Name FROM Publishers ORDER BY Name">
</asp:SqlDataSource>
<asp:GridView ID="Books" runat="server"
AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
DataSourceID="BooksSQL" GridLines="None">
<Columns>
<asp:CommandField ShowSelectButton="True" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="BooksSQL" runat="server"
ConnectionString="<%$ ConnectionStrings:SQLServerConnectionString %>"
SelectCommand="SELECT Books.Title, Books.Author, Books.ISBN FROM Books
INNER JOIN Publications ON Books.ISBN = Publications.ISBN WHERE
(Publications.PublisherName = @Publisher) ORDER BY Books.T">
<SelectParameters>
<asp:ControlParameter ControlID="Publishers"
Name="Publisher" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
Thank you
/RAM/