如题,请各位大大指教!!!!

解决方案 »

  1.   

    http://dev.csdn.net/develop/article/23/23735.shtm
    http://dotnet.aspx.cc/ShowDetail.aspx?id=EA6842AD-9FA7-4865-BCDD-60CA539BE7DD
    http://blog.csdn.net/lovebanyi/archive/2005/02/20/294580.aspx
    你看一看对你有帮助
      

  2.   

    下面是一个找所有td的,并对其所有background进行操作的代码,看一下吧,应该差不多的。 foreach(Control col in this.Controls)//搜索每一个控件,判断控件的背景地址
    {
    findallcontrol(col);
    } private void findallcontrol(Control col)
    {
    if(col is HtmlTableCell)
    {
    string background=((HtmlTableCell)col).Attributes["background"];
    if(background!="")
    ((HtmlTableCell)col).Attributes["background"]=path+background;
    } if(col.Controls.Count>0)
    {
    foreach(Control col1 in col.Controls)
    {
    findallcontrol(col1);
    }
    }

    }
      

  3.   

    regular expressionsusing System.Text.RegularExpressions;
    string s = @"<img src=c:/abc.jpg>
    <IMG src=""http://tiberi.us/images/hip.gif""></td></tr><tr><td><IMG SRC='http://tiberi.us/images/hip/microsoftphone.gif'> 
    ";
    Regex re = new Regex(@"<img[^>]*src\s*=\s*(""(?<src>[^""]+)""|'(?<src>[^']+)'|(?<src>[^\s>]+))[^>]*?>",RegexOptions.IgnoreCase);
    MatchCollection mc = re.Matches(s);
    String[] slist = new String[mc.Count];
    for (int i=0; i < mc.Count; i++)
    slist[i] = mc[i].Groups["src"].Value; foreach (String ss in slist)
    Console.WriteLine(ss);