首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

这样为什么替换不了?解决方法

2012-01-15 
这样为什么替换不了??C# codeusing System.Text.RegularExpressionsprotected void Button2_Click(object

这样为什么替换不了??

C# code
 
using System.Text.RegularExpressions;

        protected void Button2_Click(object sender, EventArgs e)
        {
            string xx = this.TextBox1.Text.Trim();
            Regex.Replace("xx", "%Code%?", "4", RegexOptions.IgnoreCase);
            Regex.Replace("xx", "%Rname%", "3", RegexOptions.IgnoreCase);
            Regex.Replace("xx", "%Linkman%", "2", RegexOptions.IgnoreCase);
            Regex.Replace("xx", "%Email%", "1", RegexOptions.IgnoreCase);
            Response.Write(xx);
        }



[解决办法]
。。什么意思?
XX没有被重新赋值啊,XX的值又没有发生改变肯定没有效果三!

热点排行