从地址栏中获取值

来源:互联网 发布:php软件开发 编辑:程序博客网 时间:2024/05/03 15:20

//跳转页面到添加试题答案

if(QuestionList.SelectIndex>-1)

{

      Response.Redirect("~/Admins/AddAnswer.aspx?QuestionID="+QuestionList.SelectedValue);

 

//从页面地址栏中获取试题的ID

private void Page_Load(object sender,System.EventArgs e)

{

     if(Request.Params["QuestionID"]!=null)

        {

             nQuestionID=Int32.Parse(Request.Params["QuestionID"].ToString());

        }

}