【发布时间】:2017-06-29 13:22:40
【问题描述】:
int ob=0;
protected void Button1_Click(object sender, EventArgs e)
{
ob = Convert.ToInt32(Request.QueryString["value"].ToString());
if (RadioButton1.Checked == true)
{
ob = ob + 1;
}
else
{
ob = ob + 0;
}
Response.Redirect("result.aspx?value = " + ob);
}
异常:- System.NullReferenceException:'未设置对象引用 到一个对象的实例。'
System.Collections.Specialized.NameValueCollection.this[string].get 返回 null。
【问题讨论】:
标签: c# asp.net request.querystring