[英]Get EventClicked from UserControl in aspx
嘿,我想獲得在usercontrol上單擊過的按鈕的名稱,我嘗試過這樣做,但是我得到的只是null:
UserControl uc =(UserControl)Page.FindControl(“ ImportTXP”);
如果在事件處理程序中,則發送者將是引發事件的按鈕:
string name = ((Button)sender).Name;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.