使用asp.net进行多关键字查询的例子
来源:互联网 发布:中国山脉和河流的数据 编辑:程序博客网 时间:2024/05/16 13:57
<%@ 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进行更新后的提示
- 转:关于C++中的类型转换
- C++ builder 遍历所有组件的 caption 属性,轻松实现界面多语言支持
- 转:C++中extern “C”含义深层探索
- Asp.net自动返回上次请求页面
- 每个开发人员现在应该下载的十种必备工具(for .Net developer)
- 使用asp.net进行多关键字查询的例子
- C/C++ 题目汇总
- 通过例子学习ABAP--ABAP编程语言 数据处理(一)
- 无线陆游
- 转:详细解说 STL 排序(Sort)
- spring ioc我的理解
- 转:“Hello world!”的N种写法
- JavaScript:全面解析Ajax跨站数据传输和iframe跨域名js调用
- 复数类的设计及其应用:复数类的设计