Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/292.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
C# 使用javascript在asp.net中触发事件_C#_Javascript_Asp.net_Class - Fatal编程技术网

C# 使用javascript在asp.net中触发事件

C# 使用javascript在asp.net中触发事件,c#,javascript,asp.net,class,C#,Javascript,Asp.net,Class,我使用javascript创建了两个按钮;是和否。我需要在单击按钮时触发事件 i、 e…onclick=getvalue() 公共无效设置按钮(字符串消息按钮类){ this.msgbox_Yes_按钮=“”; } 公共无效设置按钮(字符串消息按钮类){ this.msgbox_No_button=“”; } 我不明白你的问题,只是一个建议 删除倒数第二个分号: "<input type=\"button\" value=\"Yes\" class=\"" + msg_button_cla

我使用javascript创建了两个按钮;是和否。我需要在单击按钮时触发事件

i、 e…onclick=getvalue()

公共无效设置按钮(字符串消息按钮类){
this.msgbox_Yes_按钮=“”;
}
公共无效设置按钮(字符串消息按钮类){
this.msgbox_No_button=“”;
}

我不明白你的问题,只是一个建议

删除倒数第二个分号:

"<input type=\"button\" value=\"Yes\" class=\"" + msg_button_class + "\" onClick=\"getvalue()\">"; 
”;
"<input type=\"button\" value=\"Yes\" class=\"" + msg_button_class + "\" onClick=\"getvalue()\">";