string a="http://localhost/fk/info.aspx?id=1";
a=a.Substring(a.Length-1,1)

解决方案 »

  1.   

    int pos=a.IndexOf("?id=");
    a=a.Substring(pos+1,1);
      

  2.   

    sorry……没看清楚string a=@"http://localhost/fk/info.aspx?id=123";
    a=a.Substring(a.IndexOf("id=")+3);
      

  3.   

    请问substring是什么意思,很菜,真的不懂
      

  4.   

    从此实例检索子字符串。子字符串从指定的字符位置开始且具有指定的长度。
    public string Substring(
       int startIndex,
       int length
    );
    startIndex 
    子字符串的起始位置的索引。 
    length 
    子字符串中的字符数。 
    楼主还是多看看帮助吧
      

  5.   

    想取ID值吗?我看你那是传的参数呀!为什么不直接用Request取呢?
      

  6.   

    搂主就是想用地址传值吧,用request吧