现在有多个Button,请问如何获取点击了哪个Button?我采用了sender:Button btn = (Button)sender ,但出现了错误
"Vaable to cast object of type 'Asp.manage_asxp'to type 'System.Web.UI.WebControls.Button'"
还有没有获取Button的方法啊,令bth的定义在Page_PreRender()里面写的会不会有影响?
"Vaable to cast object of type 'Asp.manage_asxp'to type 'System.Web.UI.WebControls.Button'"
还有没有获取Button的方法啊,令bth的定义在Page_PreRender()里面写的会不会有影响?
if (btn != null)
{
......
}
里面的sender 怎么可能会是button新群 DotNet Programmer 群号 112850311
本群新开,欢迎dotnet程序员加入,我们致力于营造一个好的学习交流氛围,不管你是高手还是菜鸟,只要你虚心好学,我们都诚挚的欢迎您。