复制代码 代码如下:
 
public partial class Error : System.Web.UI.Page 
{ 
string myUrl; 
int myPos; 
int myUrlLen ; 
string id; 
protected void Page_Load(object sender, EventArgs e) 
{ 
myUrl = Request.Url.ToString(); 
myPos = myUrl.LastIndexOf("http://www.vevb.com/")+1; 
myUrlLen = myUrl.Length; 
if (myPos == myUrlLen) 
{ 
myUrl=myUrl.Remove(myPos - 1); 
myPos = myUrl.LastIndexOf("http://www.vevb.com/") + 1; 
myUrlLen = myUrl.Length; 
} 
id = myUrl.Substring(myPos, myUrlLen - myPos); 
//到这里ID取出来了,其他操作就简单了 
//下面是根据ID读取数据库的信息,我就省略了。。。。 
} 
} 
新闻热点
疑难解答
图片精选