当前位置: 代码迷 >> ASP.NET >> 这样为什么替换不了?解决方法
  详细解决方案

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

热度:7629   发布时间:2013-02-25 00:00:00.0
这样为什么替换不了??
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的值又没有发生改变肯定没有效果三!
  相关解决方案