Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
asp.net未定义从ajax post获取文本值_Asp.net_Ajax - Fatal编程技术网

asp.net未定义从ajax post获取文本值

asp.net未定义从ajax post获取文本值,asp.net,ajax,Asp.net,Ajax,我无法从ajax post获取值参数说明,该值未定义,但c_id和状态我可以。 这里的问题是从ajax post获取文本数据。 如何获取此说明参数? 谢谢 代码隐藏: protected void Page_Load(object sender, EventArgs e) { Update(); } private void Update() { string s = ""; int c_id=0,status=-1; c_id=Utils.GetDefautI

我无法从ajax post获取值参数说明,该值未定义,但c_id状态我可以。 这里的问题是从ajax post获取文本数据。 如何获取此说明参数? 谢谢

代码隐藏:

protected void Page_Load(object sender, EventArgs e)
{
    Update();
}
private void  Update()
{
    string s = "";
    int c_id=0,status=-1;
    c_id=Utils.GetDefautInteger(Request.QueryString["C_id"].ToString(), 0);
    status = Utils.GetDefautInteger(Request.QueryString["status"].ToString(), 0);
    s = (Request.QueryString["description"].ToString(); return;}

字符串s未定义

此处似乎有输入错误
s=(Request.QueryString[“description”].ToString();return;}

试一试

然后只需删除
返回
,并将
}
单独保留在最后一行。如下所示:

private void Update()
{
    string s = "";
    int c_id=0, status=-1; c_id=Utils.GetDefautInteger(Request.QueryString["C_id"].ToString(), 0);
    status = Utils.GetDefautInteger(Request.QueryString["status"].ToString(), 0);
    s = Request.QueryString["description"].ToString();
}
s = Request.QueryString["description"].ToString();
private void Update()
{
    string s = "";
    int c_id=0, status=-1; c_id=Utils.GetDefautInteger(Request.QueryString["C_id"].ToString(), 0);
    status = Utils.GetDefautInteger(Request.QueryString["status"].ToString(), 0);
    s = Request.QueryString["description"].ToString();
}