使用asp.net进行多关键字查询的例子
来源:互联网 发布:淘宝店铺免费推广软件 编辑:程序博客网 时间:2024/05/17 02:49
<%@ Page Language="C#" Debug="False" Strict="True" Explicit="True" Buffer="True"%>
<%@ Import Namespace="System" %>
<html>
<head>
<title></title>
</head>
<style type="text/CSS">
.highlight {}{text-decoration:none; font-weight:bold; color:white; background:blue;}
</style>
<body bgcolor="#FFFFFF" topmargin="0" onLoad="document.forms[0].keywords.focus();">
<script language="C#" runat="server">
void Page_Load(Object Source, EventArgs E)
{
LabelTxt.Text = "Give the proper respect to hand-coding.You should both respect and loathe handwritten code. You should
respect it because there are often special cases integrated into code that are overlooked with a cursory inspection. When
replacing code you’ve written by hand, you need to make sure you have the special cases accounted for. You should loathe
hand-code because engineering time is extremely valuable, and to waste it on repetitive tasks is nearly criminal. The goal
of your generator should always be to optimize the organization’s most valuable assets.the creativity and enthusiasm of
the engineering team.";
}
public string Highlight(string Search_Str, string InputTxt)
{
Regex RegExp = new Regex(Search_Str.Replace(" ", "|").Trim(), RegexOptions.IgnoreCase);
return RegExp.Replace(InputTxt, new MatchEvaluator(ReplaceKeyWords));
RegExp = null;
}
public string ReplaceKeyWords(Match m)
{
return "<span class=highlight>" m.Value "</span>";
}
public void ButtonClick(Object sernder,System.EventArgs e )
{
LabelTxt.Text = Highlight(keywords.Text, LabelTxt.Text);
}
</script>
<H3></H3><BR>
<form runat="server" method="post">
<asp:TextBox id="keywords" runat="server"/>
<asp:Button id="button" Text="Submit" runat="server" OnClick="ButtonClick"/><br><br>
<asp:Label id="LabelTxt" runat="server"/>
</form>
</body>
</html>
- 使用asp.net进行多关键字查询的例子
- 使用asp.net进行多关键字查询的例子
- 使用asp.net进行多关键字查询的例子
- 使用asp.net进行多关键字查询的例子
- 使用EditText进行关键字查询
- ASP.NET MVC3 实例(三) 使用 Controller 进行数据的的查询
- ASP.NET MVC3 实例(三) 使用 Controller 进行数据的的查询
- ASP.NET MVC3 实例(三) 使用 Controller 进行数据的的查询
- Asp.Net查询MSSQL数据库的一个例子
- 使用jdbc连接ORACLE数据库进行查询的一个例子
- ASP.NET大数据量查询分页例子
- ASP.NET大数据量查询分页例子
- asp.net 利用多表联合查询进行汇总统计
- 在ASP.NET MVC中使用PagedList之2--将查询关键字传入后端
- asp.net学习之textbox控件使用的小例子
- ASP.NET项目怎样进行管理?(VSS的使用)
- ASP.NET项目怎样进行管理?(VSS的使用)
- asp.net ajax 使用updatepanel进行更新后的提示
- 利用WebClient获取远程数据(仅做备份)
- 通过代码给IIS增加主机头
- 根据自定义字符串来缓存(部分)页面
- Repeater读取数据并分页
- ASP.Net使用缓存技术提高效率
- 使用asp.net进行多关键字查询的例子
- IBatisNet系列-执行存储过程
- .NET正则表达式使用高级技巧之反向引用
- 实现.NET应用程序的自动更新
- ASP.NET无限分类
- .NET下正则表达式应用的四个示例
- Asp.net前后台值的调用
- .NET正则表达式使用高级技巧之组的概念
- 通过系统配置来提高ASP.NET应用程序的稳定性(续)