this.Label_Link.Text = "<a href='?CurrentPage=1'>1</a>&nbsp;<a href='?CurrentPage=2'>2</a>&nbsp;<a href='?
改成下面的形式,for里面怎么写呀?
CurrentPage=3'>3</a>&nbsp;<a href='?CurrentPage=4'>4</a>&nbsp;";
        for (int i = 1; i < SumPage/PageSize+1; i++)
        {
            this.Label_Link.Text +="<a herf='?CurrentPage='+'i'+>i</a>";//这个是错的,我想改这里,但不知怎么改
        }

解决方案 »

  1.   

            for (int i = 1; i < SumPage/PageSize+1; i++) 
            { 
                this.Label_Link.Text +=" <a herf='?CurrentPage="+'i.ToString()+"'+>"+i.ToString()+" </a>";//这个是错的,我想改这里,但不知怎么改 
            }好像看你的代码后一个i要变成i+1 吧
      

  2.   


                for (int i = 1; i < SumPage/PageSize+1; i++)
                {
                    this.Label_Link.Text  += " <a herf='?CurrentPage=" + i.ToString() + "'>" + i.ToString() + " </a>";//这个是错的,我想改这里,但不知怎么改 
                }上一个回帖错了.
      

  3.   

    把herf 修改为 href ,我拼错了.
      

  4.   

    for (int i = 1; i < SumPage/PageSize+1; i++)
                {
                    this.Label_Link.Text  += " <a href='?CurrentPage=" + i.ToString() + "'>" + i.ToString() + " </a> ";
                 }