Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > raising a Click or Command event on an ImageButton click control

Reply
Thread Tools

raising a Click or Command event on an ImageButton click control

 
 
James Tsao
Guest
Posts: n/a
 
      10-25-2004
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 ---
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why my ListBox Control in my Web Control is not Raising the SelectedIndexChanged Event ? msnews.microsoft.com ASP .Net 6 04-28-2005 05:44 PM
raising onclick event from nested imagebutton Mick ASP .Net 0 01-05-2005 01:45 PM
ImageButton control fails to capture click event when alternate textis displayed Benjamin Gavin ASP .Net Web Controls 3 09-28-2004 12:02 AM
ImageButton control fails to capture click event when alternate textis displayed Benjamin Gavin ASP .Net 3 09-28-2004 12:02 AM
Enter Key submition is not raising the command event Jitu ASP .Net 0 12-24-2003 09:19 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57