Results 1 to 8 of 8

Thread: [2005] Page Control Events

Threaded View

  1. #1

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Resolved [2005] Page Control Events

    I have a class that inherits from Page.
    In the OnLoad method i'm looping through all controls on the page (recursively) before i call base.OnLoad. If the control is a ImageButton (in this example) then i want to add an event handler for its clicked event.
    Code:
    if (Ctrl is ImageButton)
    {
        ((ImageButton)Ctrl).Click += new ImageClickEventHandler(ImageButtonClick);
    }
    This code definatly gets called for each control that is an ImageButton.

    My ImageButtonClick event is as below:
    Code:
    public void ImageButtonClick(object sender, ImageClickEventArgs e)
    {
        new GUIWebEvent(sender.ToString(), "Click").Raise();
    }
    This NEVER gets called. I've double checked this by inserting int x = 0;x = 1 / x; within the method, so i know it never gets called.

    Any ideas why? My only thought is that i'm doing it in the OnLoad method, but i'm pretty stuck as to how i can get this to work.
    Last edited by SLH; Nov 5th, 2008 at 08:25 AM.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width