1
我宣佈我的用戶控件在用戶控件asp.net中聲明事件?
public event EventHandler<AddressEventArgs> SaveButtonClick;
protected void ButtonSave_Click(object sender, EventArgs e)
{
if (SaveButtonClick != null)
{
SaveButtonClick(this, new AddressEventArgs) ;
}
}
後,我已經添加了用戶控制到新的頁面時,我將如何捕獲 事件由用戶控制提高嗎?
感謝saeed。你可以給我一些[browsable]屬性的見解。 –
瀏覽的屬性只是意味着該屬性/事件應該在設計時環境進入。它們是屬性窗口,標記和代碼隱藏。 –