一个按钮怎样让点击后施行两个函数
<asp:Button runat= "server " ID= "btnSearch " CssClass= "submit " Text= "搜索 " OnClick= "btnSearch_Click();GridView1_SelectedIndexChanged " /> 这样好像不行...有什么方法吗?
------解决方案--------------------在btnSearch_Click()处理过程中执行GridView1_SelectedIndexChanged
------解决方案--------------------把btnSearch_Click()、GridView1_SelectedIndexChanged两个函数的代码合并成一个函数,或者在btnSearch_Click()函数中调用另一个函数GridView1_SelectedIndexChanged
------解决方案--------------------一个函数调用另一个,我只会这个
------解决方案--------------------可以这样:
function AAA(){
btnSearch_Click();
GridView1_SelectedIndexChanged();
}
<asp:Button runat= "server " ID= "btnSearch " CssClass= "submit " Text= "搜索 " OnClick= "AAA() " />