Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Custom control event and master pages

Reply
Thread Tools

Custom control event and master pages

 
 
=?Utf-8?B?TWFyayBHaWxrZXM=?=
Guest
Posts: n/a
 
      03-02-2007
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

 
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
Custom control's events in master pages Mark ASP .Net Building Controls 0 03-02-2007 10:47 PM
Cross Page Post Back When Using Mixture of Master Pages and Non-Master Pages Jason@webbit.com ASP .Net 1 05-16-2006 02:00 PM
Capturing event from other custom control within another custom control Jonah Olsson ASP .Net 1 04-05-2005 01:39 PM
Capturing event from other custom control within another custom control Jonah Olsson ASP .Net Web Controls 2 04-05-2005 12:56 PM
seeking servlet "Master" keep getting "Master/servlet/Master" not found. Tomcat 5.0.25 Doug McCann Java 1 08-05-2004 09:16 PM



Advertisments