Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Fri, 2 Mar 2007 14:47:31 -0800,    group: microsoft.public.dotnet.framework.aspnet.buildingcontrols        back       


Custom control's events in master pages   
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
date: Fri, 2 Mar 2007 14:47:31 -0800   author:   Mark

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us