加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
FindBookAuthor.aspx 3.20 KB
一键复制 编辑 原始数据 按行查看 历史
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FindBookAuthor.aspx.cs" Inherits="FindBookAuthor" %>
<!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;
color: #003300;
}
.auto-style2 {
font-size: x-large;
}
</style>
</head>
<body style="background-image: url('/Images/background.jpg')">
<form id="form1" runat="server">
<div align="center" style="background-color: #CCFFCC;background-image: url('/Images/background.jpg')">
<br />
<h1 class="auto-style1">按作者名称查找</h1>
<br />
<br />
<span class="auto-style2">请输入作者名称:<asp:TextBox ID="TextBox1" runat="server" Height="28px" Width="223px"></asp:TextBox>
</span>
<br />
<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Book_Id" DataSourceID="SqlDataSource1">
<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>
</asp:GridView>
&nbsp;
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="查找" style="font-size: large" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="返回" style="font-size: large" />
<br />
<br />
<br />
<br />
<asp:Label ID="lblMsg" runat="server"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BookShopConnectionString %>" OnSelected="SqlDataSource1_Selected" SelectCommand="SELECT * FROM [BookInfo] WHERE ([Book_Author] LIKE '%' + @Book_Author + '%')">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="Book_Author" PropertyName="Text" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</form>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化