加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
FindBookName.aspx 4.62 KB
一键复制 编辑 原始数据 按行查看 历史
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FindBookName.aspx.cs" Inherits="FindBookName" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
.auto-style1 {
font-size: xx-large;
}
.auto-style2 {
font-size: large;
}
.auto-style3 {
text-align: center;
height: 740px;
width: 1381px;
background-color: #FFFFFF;
}
.auto-style4 {
font-size: x-large;
}
#form1 {
text-align: center;
background-color: #CCFFCC;
height: 736px;
width: 1382px;
}
</style>
</head>
<body style="background-color: #FFFFFF" >
<form id="form1" runat="server">
<div class="auto-style3" style="background-image: url('/Images/background.jpg')">
<span class="auto-style1">
<br />
按书名查找<br />
</span>
<br class="auto-style1" />
<br />
<span class="auto-style4">请输入书名:</span><asp:TextBox ID="txtName" runat="server" CssClass="auto-style2" Height="32px"></asp:TextBox>
<br />
<br />
<br />
<asp:GridView ID="gvCategory" runat="server" AutoGenerateColumns="False" DataKeyNames="Book_Id" DataSourceID="sdsCategory" CellPadding="4" ForeColor="#333333" GridLines="None" style="text-align: center" Height="135px" Width="1128px">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:BoundField DataField="Book_Id" HeaderText="Book_Id" ReadOnly="True" SortExpression="Book_Id" />
<asp:BoundField DataField="Book_Name" HeaderText="Book_Name" SortExpression="Book_Name" />
<asp:BoundField DataField="Book_Class_Id" HeaderText="Book_Class_Id" SortExpression="Book_Class_Id" />
<asp:BoundField DataField="Book_Author" HeaderText="Book_Author" SortExpression="Book_Author" />
<asp:BoundField DataField="Book_Press" HeaderText="Book_Press" SortExpression="Book_Press" />
<asp:BoundField DataField="Book_Price" HeaderText="Book_Price" SortExpression="Book_Price" />
<asp:BoundField DataField="Book_Number" HeaderText="Book_Number" SortExpression="Book_Number" />
<asp:BoundField DataField="Book_RestNumber" HeaderText="Book_RestNumber" SortExpression="Book_RestNumber" />
<asp:BoundField DataField="Book_Date" HeaderText="Book_Date" SortExpression="Book_Date" />
</Columns>
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
<br />
<br />
<asp:Button ID="btnFind" runat="server" Text="查找" CssClass="auto-style2" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="btnReturn" runat="server" OnClick="btnReturn_Click" Text="返回" CssClass="auto-style2" />
<br />
<br />
<br />
<br />
<asp:Label ID="lblMsg" runat="server"></asp:Label>
<asp:SqlDataSource ID="sdsCategory" runat="server" ConnectionString="<%$ ConnectionStrings:BookShopConnectionString %>" OnSelected="sdsCategory_Selected" SelectCommand="SELECT * FROM [BookInfo] WHERE ([Book_Name] LIKE '%' + @Book_Name + '%')" OnSelecting="sdsCategory_Selecting">
<SelectParameters>
<asp:ControlParameter ControlID="txtName" Name="Book_Name" PropertyName="Text" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</form>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化