Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.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
使用jquery代码触发Asp.net按钮事件_Jquery_Asp.net - Fatal编程技术网

使用jquery代码触发Asp.net按钮事件

使用jquery代码触发Asp.net按钮事件,jquery,asp.net,Jquery,Asp.net,在上面的代码中,jquery代码工作正常,但未触发事件 尝试删除返回false(和/或将其替换为返回true)。因为如果返回false则浏览器将取消按钮单击事件,请删除返回false语句 Return false将立即返回,而不是转到服务器 protected void Button1_Click(object sender, EventArgs e) { Label1.Text = "Rajesh Gonugunta"; } 按钮是否放置在UpdatePan

在上面的代码中,jquery代码工作正常,但未触发事件


尝试删除
返回false
(和/或将其替换为
返回true
)。因为如果返回
false
则浏览器将取消按钮单击事件,请删除
返回false语句

Return false将立即返回,而不是转到服务器

protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = "Rajesh Gonugunta";
    }


按钮是否放置在UpdatePanel中?
protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = "Rajesh Gonugunta";
    }
$("#Div_1").show();
$("#Div_2").hide();

$('#Button1').click(function () {

    $("#Div_1").hide();
    $("#Div_2").show();
});
protected void Button1_Click(object sender, EventArgs e)
{
    Label1.Text = "Rajesh Gonugunta";
}