📄 default.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="NoBot_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>No Bot</title>
</head>
<body style="font-size: 12px; background-color: #F7F6F3;">
<form id="form1" runat="server">
<div style="text-align: center;">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<span style="font-size: 11pt; color: #990033"><strong>在线 成语词典</strong></span>
<br />
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate><ajaxToolkit:NoBot ID="NoBot1" CutoffWindowSeconds="10" CutoffMaximumInstances="2"
ResponseMinimumDelaySeconds="5" runat="server" OnGenerateChallengeAndResponse="NoBot1_GenerateChallengeAndResponse" />
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="Id"
DefaultMode="Insert" DataSourceID="ObjectDataSource1" Width="256px" BackColor="White"
BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" OnItemInserting="DetailsView1_ItemInserting">
<Fields>
<asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True"
SortExpression="Id" />
<asp:TemplateField HeaderText="名称" SortExpression="Name">
<InsertItemTemplate>
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
</InsertItemTemplate>
<ItemStyle Width="60px" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="解释" SortExpression="paraphrase">
<InsertItemTemplate>
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("paraphrase") %>'></asp:TextBox>
</InsertItemTemplate>
<ItemStyle Width="60px" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="起源" SortExpression="derivation">
<InsertItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Text='<%# Bind("derivation") %>'></asp:TextBox>
</InsertItemTemplate>
<ItemStyle Width="60px" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="示例" SortExpression="example">
<InsertItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" TextMode="MultiLine" Text='<%# Bind("example") %>'></asp:TextBox>
</InsertItemTemplate>
<ItemStyle Width="60px" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:CommandField ShowInsertButton="True" />
</Fields>
<CommandRowStyle Font-Size="Large" />
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<EditRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<RowStyle BackColor="White" ForeColor="#003399" />
<PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
<HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
</asp:DetailsView>
</ContentTemplate>
</asp:UpdatePanel>
<br />
</div>
请输入要查询的关键字:<asp:TextBox ID="keyword" runat="server"></asp:TextBox><asp:Button ID="search"
runat="server" Text="搜索"></asp:Button> <br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="" Font-Size="Large" ForeColor="red"></asp:Label>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Id" DataSourceID="ObjectDataSource1"
GridLines="Horizontal" PageSize="4" Width="430px" BackColor="White" BorderColor="#336666"
BorderStyle="Double" BorderWidth="3px">
<Columns>
<asp:BoundField DataField="Name" HeaderText="名称" SortExpression="Name">
<ItemStyle Width="60px" />
</asp:BoundField>
<asp:BoundField DataField="paraphrase" HeaderText="解释" SortExpression="paraphrase">
<ItemStyle Width="315px" />
</asp:BoundField>
</Columns>
<EmptyDataTemplate>
没有找到您要的成语。
</EmptyDataTemplate>
<FooterStyle BackColor="White" ForeColor="#333333" />
<RowStyle BackColor="White" ForeColor="#333333" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger EventName="Click" ControlID="search" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<div style="color: Red; position: absolute; top: 10px; left: 800px; background-color: #333333;">
<h3>
正在更新数据.....</h3>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<br />
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetPhrase"
TypeName="Phrase" DeleteMethod="DeletePhrase" InsertMethod="InsertPhrase">
<SelectParameters>
<asp:ControlParameter ControlID="keyword" DefaultValue="一" Name="name" PropertyName="Text" />
</SelectParameters>
<InsertParameters>
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="pronunciation" Type="String" />
<asp:Parameter Name="paraphrase" Type="String" />
<asp:Parameter Name="derivation" Type="String" />
<asp:Parameter Name="example" Type="String" />
</InsertParameters>
</asp:ObjectDataSource>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -