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);
}
exception: - System.NullReferenceException:'未设置对象引用 到一个对象的实例。'
System.Collections.Specialized.NameValueCollection.this [字符串]。获得 返回null。
答案 0 :(得分:0)
server {
listen 80;
#listen [::]:80 ipv6only=on;
server_name mysite2.com;
client_max_body_size 100m;
access_log /var/log/nginx/mysite2.access.log;
error_log /var/log/nginx/mysite2.error.log;
root /home/deploy/www/mysite2/public;
location / {
proxy_pass https://127.0.0.1:8181;
proxy_set_header Host $host;
}
}
返回null。所以当你在null上调用ToString()时会出现异常。