📄 background_gatherregextest.aspx
字号:
<%@ Page Language="C#" Inherits="SiteServer.BackgroundPages.BackgroundGatherRegexTest" %>
<%@ Register TagPrefix="bairong" Namespace="BaiRong.Controls" Assembly="BaiRong.Controls" %>
<html>
<head>
<!--#include file="../inc/html_head.inc"-->
<title>测试采集表达式</title>
<meta http-equiv="content-type" content="text/html;charset=gb2312"/>
</head>
<body>
<form id="MyForm" runat="server">
<div class="mframe"> <br>
<table width="95%" align="center" cellspacing="0" cellpadding="0">
<tr>
<td class="mframe-t-left"></td>
<td class="mframe-t-mid">
<span class="mframe-t-text">测试采集表达式</span>
</td>
<td class="mframe-t-right"></td>
</tr>
</table>
<table width="95%" align="center" cellspacing="0" cellpadding="0">
<tr>
<td class="mframe-m-left"></td>
<td class="mframe-m-mid">
<table cellpadding="3" width="95%" align="center" >
<tr align="left">
<td colspan="2"><asp:Label width="100%" id="myLabel" Style="text-align:center" runat="server"/></td>
</tr>
<tr><td width="120" align="right">
采集地址:
</td>
<td>
<asp:TextBox Columns="60" MaxLength="200" id="GatherUrl" runat="server"/>
<asp:RequiredFieldValidator
ControlToValidate="GatherUrl"
ErrorMessage="*"
Display="Dynamic"
runat="server"/>
<asp:RegularExpressionValidator
runat="server"
ControlToValidate="GatherUrl"
ValidationExpression="[^']+"
ErrorMessage="*"
Display="Dynamic" />
</td>
</tr>
<tr><td width="120" align="right">
网页编码:
</td>
<td>
<asp:DropDownList id="Charset" runat="server">
<asp:ListItem value="GB2312">简体中文(GB2312)</asp:ListItem>
<asp:ListItem value="Big5">繁体中文(Big5)</asp:ListItem>
<asp:ListItem value="UTF-8">Unicode(UTF-8)</asp:ListItem>
</asp:DropDownList>
</td></tr><tr>
<td width="120" align="right">
<bairong:help HelpText="采集表达式,由正则表达式组成" Text="采集表达式:" runat="server" ></bairong:help>
</td>
<td><asp:TextBox Columns="50" Rows="5" TextMode="MultiLine" id="RegexRule" runat="server"/>
<asp:RequiredFieldValidator
ControlToValidate="RegexRule"
ErrorMessage="*"
Display="Dynamic"
runat="server"/>
</td>
</tr>
<tr>
<td width="120" align="right">
<bairong:help HelpText="需要采集的内容类型" Text="采集内容类型:" runat="server" ></bairong:help>
</td>
<td>
<asp:RadioButtonList ID="GatherGroup" RepeatDirection="Horizontal" RepeatColumns="3" runat="server">
<asp:ListItem Text="内容链接" Value="url" Selected="true"></asp:ListItem>
<asp:ListItem Text="内容列表下一页" Value="url"></asp:ListItem>
<asp:ListItem Text="内容列表范围" Value="area"></asp:ListItem>
<asp:ListItem Text="内容所属栏目" Value="channel"></asp:ListItem>
<asp:ListItem Text="内容标题" Value="title"></asp:ListItem>
<asp:ListItem Text="内容内容" Value="content"></asp:ListItem>
<asp:ListItem Text="内容作者" Value="author"></asp:ListItem>
<asp:ListItem Text="内容来源" Value="source"></asp:ListItem>
<asp:ListItem Text="内容下一页" Value="url"></asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr><td height="30" align="center" colspan="2">
<asp:Button id="Submit" text="开始采集" onclick="Submit_OnClick" runat="server"/>
</td></tr>
<tr><td colspan="2" align="left">
<ASP:DataGrid id="MyDataGrid" runat="server"
Width="100%"
Align="center"
ShowHeader="true"
ShowFooter="false"
CellPadding="0"
AutoGenerateColumns="false"
DataKeyField="Content"
OnItemDataBound="MyDataGrid_ItemBound"
HeaderStyle-CssClass="summary-title"
ItemStyle-CssClass="tdbg"
CellSpacing="0" >
<HeaderStyle HorizontalAlign="center" Height="25" />
<ItemStyle Height="23"/>
<Columns>
<asp:TemplateColumn
HeaderText="采集内容">
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem,"Content")%>
</ItemTemplate>
<ItemStyle HorizontalAlign="left" />
</asp:TemplateColumn>
</Columns>
</ASP:DataGrid>
</td></tr>
</table>
</td>
<td class="mframe-m-right"></td>
</tr>
</table>
<table width="95%" align="center" cellspacing="0" cellpadding="0">
<tr>
<td class="mframe-b-left"></td>
<td class="mframe-b-mid"> </td>
<td class="mframe-b-right"></td>
</tr>
</table>
</div></form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -