62,074
社区成员
发帖
与我相关
我的任务
分享
<runtime>&n...")中检测到有潜在危险的 Request.Form 值。
<httpRuntime requestValidationMode="2.0"/>
ValidateRequest="false"
<system.web>
<pages validaterequest=”false”/>
<httpRuntime requestValidationMode="2.0"/><!--这个节点你看是不是配置在这里,不是就换个地方-->
</system.web>
string com = "Insert into ST_news(ST_n_title,ST_n_author,ST_n_key,ST_n_content,ST_n_iscmd,ST_c_id,BlogID) values('" + this.txtSubject.Text + "','" + this.Session["UserName"].ToString() + "','" + this.TextBox1.Text + "','" + this.article_context.Text.ToString() + "','" + cbox + "','" + this.DropDownList1.SelectedValue + "','" + ID + "')";
//调用公共类中的ExceSQL方法,返回一个布尔值
bool add = mydata.ExceSQL(com);
if (add)
{
Response.Write("<script language=javascript>alert('文章添加成功!');location='NewsManage.aspx'</script>");
}
else
{
Response.Write("<script language=javascript>alert('文章添加失败!');location='javascript:history.go(-1)'</script>");
}
encodeURIComponent("表单内容").replace(/\%20/gi,"+")