扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
|
<form id="form1" runat="server"> <div> <h2>You are Viewing Order Detail Information for Orders that Have Included Shipments of the Selected Product</h2> <asp:SqlDataSource ID="productListingDataSource" Runat="server" ConnectionString= "<%$ ConnectionStrings:NWConnectionString %>" SelectCommand="SELECT [ProductID], [ProductName] FROM [Products]"> </asp:SqlDataSource> <asp:DropDownList ID="productSelector" Runat="server" DataSourceID="productListingDataSource" DataTextField="ProductName" DataValueField="ProductID" AutoPostBack="True"> </asp:DropDownList> <asp:SqlDataSource ID="orderDetailsForProduct" Runat="server" SelectCommand="SELECT [OrderID], [ProductID], [UnitPrice], [Quantity] FROM [Order Details] WHERE ([ProductID] = @ProductID)" ConnectionString= "<%$ ConnectionStrings:NWConnectionString%>" DataSourceMode="DataReader"> <SelectParameters> <asp:ControlParameter Name="ProductID" Type="Int32" ControlID="productSelector" PropertyName="SelectedValue"></asp:ControlParameter> </SelectParameters> </asp:SqlDataSource><asp:GridView ID="orderDetailsGridView" Runat="server" DataSourceID="orderDetailsForProduct" AutoGenerateColumns="False" DataKeyNames="OrderID" BorderWidth="1px" BackColor="LightGoldenrodYellow" GridLines="None" CellPadding="2" BorderColor="Tan" ForeColor="Black"> <FooterStyle BackColor="Tan"></FooterStyle> <PagerStyle ForeColor="DarkSlateBlue" HorizontalAlign="Center" BackColor="PaleGoldenrod"> </PagerStyle> <HeaderStyle Font-Bold="True" BackColor="Tan"></HeaderStyle> <AlternatingRowStyle BackColor="PaleGoldenrod"></AlternatingRowStyle> <Columns> <asp:BoundField ReadOnly="True" HeaderText="Order ID" InsertVisible="False" DataField="OrderID" SortExpression="OrderID"> <ItemStyle HorizontalAlign="Center"></ItemStyle> </asp:BoundField> <asp:BoundField HeaderText="Quantity" DataField="Quantity" SortExpression="Quantity" DataFormatString="{0:d}"> <ItemStyle HorizontalAlign="Right"></ItemStyle> </asp:BoundField> <asp:BoundField HeaderText="Unit Price" DataField="UnitPrice" SortExpression="UnitPrice" DataFormatString="{0:c}"> <ItemStyle HorizontalAlign="Right"></ItemStyle> </asp:BoundField> </Columns> <SelectedRowStyle ForeColor="GhostWhite" BackColor="DarkSlateBlue"></SelectedRowStyle> </asp:GridView> </div> </form> |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者