Custom control event and master pages

Discussion in 'ASP .Net' started by =?Utf-8?B?TWFyayBHaWxrZXM=?=, Mar 2, 2007.

  1. I have designed and written a custom menu like server control. The control
    inherits from DataBoundControl and implements INamingContainer and
    IPostBackEventHandler interfaces. The control uses only html mark-up as it’s
    UI, i.e. tables, table rows and table cells, and no intrinsic html controls
    such as input or select. The control does not implement any client-side
    script and therefore redraws its updated UI on postback through the
    IPostBackEventHandler.RaisePostBackEvent handler method by adding controls to
    the control tree. Everything was working fine until I designated it’s page to
    be of type Master and in the server-side event handler for the Click event I
    redirected to a content page. Now, after the postback occurs and the content
    page is merged with the master page the
    IPostBackEventHandler.RaisePostBackEvent method of the control is no longer
    being called, i.e as if the postback event is not fired for the control. I
    know that in this scenario the master page is now a control within the
    content page. I think I may need to cause some sort of event bubbling from
    the master page but am not sure how to implement this. Is there a way I can
    detect in the Master page whether it is a page or a control and force the
    postback event to occur in the custom control?? Any help would be very much
    appreciated.
    Thanks in advance.

    Mark
     
    =?Utf-8?B?TWFyayBHaWxrZXM=?=, Mar 2, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonah Olsson
    Replies:
    1
    Views:
    762
    Scott Allen
    Apr 5, 2005
  2. Carl Gilbert
    Replies:
    1
    Views:
    836
    Carl Gilbert
    Jul 8, 2005
  3. MS News

    Themes, Pages, and Master Pages

    MS News, Feb 15, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    437
    MS News
    Feb 15, 2006
  4. Doug McCann
    Replies:
    1
    Views:
    1,399
    William Brogden
    Aug 5, 2004
  5. Replies:
    1
    Views:
    3,501
    PeterKellner
    May 16, 2006
  6. Rahul
    Replies:
    0
    Views:
    446
    Rahul
    Feb 6, 2007
  7. Mark

    Custom control's events in master pages

    Mark, Mar 2, 2007, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    273
  8. Jonah Olsson
    Replies:
    2
    Views:
    367
    Jonah Olsson
    Apr 5, 2005
Loading...