惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
小众软件
小众软件
月光博客
月光博客
D
DataBreaches.Net
L
LangChain Blog
美团技术团队
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
博客园 - 司徒正美
aimingoo的专栏
aimingoo的专栏
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Help Net Security
阮一峰的网络日志
阮一峰的网络日志
Y
Y Combinator Blog
I
InfoQ
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
J
Java Code Geeks
博客园 - 三生石上(FineUI控件)
腾讯CDC
Martin Fowler
Martin Fowler

博客园 - 小迪

A potentially dangerous Request.Form value was detected from the client - 小迪 图片翻页滚动效果(JavaScript) 在网上找到一个.net的打印类,打印Dataset的,不错,保存于止 .NET 1.1移植到.NET 2.0出现的一些小问题的解决 授权 多个Main函数的应用程序 base Server的Transfer和Response的Redirect 缓存 FreeTextBox .Net Reflection and Performance 比较动态调用代码 稍不留神产生代码垃圾 using的几种用法 C#中"is" vs "as" 设置文本框光标的位置 System.Environment.UserDomainName 为什么不返回 当前的 Domainname 49.7 天后就不正常工作了 文件太新了也有错误? .exe.config 类型文件自动更新的问题.
Highlight - 小迪 - 博客园
小迪 · 2006-04-21 · via 博客园 - 小迪

        <style type="text/css">
        .highlight 
{ FONT-WEIGHT: bold; BACKGROUND: blue; COLOR: white; TEXT-DECORATION: none }
        
</style>

        private void Page_Load(object sender, System.EventArgs e)
        
{
            
// Put user code to initialize the page here
            lblTxt.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."
        }


        
private void btnSubmit_Click(object sender, System.EventArgs e)
        
{
            lblTxt.Text 
= ToHighlight(txtKeywords.Text, lblTxt.Text);        
        }

        public string ToHighlight(string strSearch, string txtContent) 
        

            Regex RegExp 
= new Regex(strSearch.Replace(" ""|").Trim(), RegexOptions.IgnoreCase);
            
return RegExp.Replace(txtContent, new MatchEvaluator(ReplaceKeyWords));             
        }


        
public string ReplaceKeyWords(Match m) 
        
{
            
return "<span class=highlight>" + m.Value + "</span>"
        }