0

因此,每次单击按钮时都会加载一个新页面。但是 URl 用这个 URL 传递了 BOQId

protected string GetURLForEditingBoqPricelist()
{
    return ResolveUrl(@"~/Boq.aspx?BOQ_Id=" + this.boqId.ToString());
}

加载 BOQ 页面并存储 BoqID 所以..

http://localhost:28889/Project/Boq.aspx?BOQ_Id=124

然后在 BOQ.aspx 页面中,我怎样才能获得 BOQid 值,只需在 cs 中创建一个新的 int 并使其等于 ?? 有任何想法吗?谢谢

4

2 回答 2

2
int id;
Int32.TryParse(Request.QueryString["BOQ_Id"], out id);
于 2013-02-07T13:29:34.637 回答
1

你可以使用,int BOQid = Convert.ToInt32(Request.QueryString["BOQ_Id"]);

于 2013-02-07T13:27:39.293 回答