J
James Tsao
I've created a Custom UserControl that get's passed a handle to an
ImageButton Control.
Can I raise a Click or Command event on the ImageButton from my
UserControl?
//--- Begin Parent Page ---
public class MyPage: System.Web.UI.Page
{
protected ImageButton PictureFolderExplorerOpen;
private MyControl myControl;
private void Page_Load(object sender, System.EventArgs e)
{
myControl.ClickImage = PictureFolderExplorerOpen;
}
}
//--- End Parent Page ---
//--- Begin UserControl ---
public class MyControl : System.Web.UI.UserControl
{
public ImageButton ClickImage;
private void Page_Load(object sender, System.EventArgs e)
{
// FIRE Click/Command EVENT of ClickImage
}
}
//--- End UserControl ---
ImageButton Control.
Can I raise a Click or Command event on the ImageButton from my
UserControl?
//--- Begin Parent Page ---
public class MyPage: System.Web.UI.Page
{
protected ImageButton PictureFolderExplorerOpen;
private MyControl myControl;
private void Page_Load(object sender, System.EventArgs e)
{
myControl.ClickImage = PictureFolderExplorerOpen;
}
}
//--- End Parent Page ---
//--- Begin UserControl ---
public class MyControl : System.Web.UI.UserControl
{
public ImageButton ClickImage;
private void Page_Load(object sender, System.EventArgs e)
{
// FIRE Click/Command EVENT of ClickImage
}
}
//--- End UserControl ---