473,768 Members | 8,565 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom control event and master pages

I have designed and written a custom menu like server control. The control
inherits from DataBoundContro l and implements INamingContaine r and
IPostBackEventH andler 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
IPostBackEventH andler.RaisePos tBackEvent 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
IPostBackEventH andler.RaisePos tBackEvent 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

Mar 2 '07 #1
0 1656

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
963
by: Plamen Hristov | last post by:
hi, i played a little bit with vs 2005 b1 and I tryied to run the following scenario: a page (using master page - just for info) and a custom web control in it which has only 1 buton. the questions is how I can notify the page when the buton of the web control is pusshed. it works with Session but it takes 2 round trips in order to update info on the page
4
2394
by: fishek | last post by:
I have a Master Page with a property defined in codebehind like this: private string profile; public string Profile { get { return profile; } } I can set the property value in the master page fine (normally page_load or page_preinit), i.e.:
13
6232
by: Michael | last post by:
I have setup a public variable in the Master Page "code-behind-file". Now I would like to set that value from the UserControl, but I can't seem to find a way to do this. Does anyone have any ideas? I'm basically trying to set it up so that I can keep the User infor (userid, ect) in the Masterpage so that other pages can access it. Thanks for any ideas. Michael
5
1419
by: Annie | last post by:
hello guys, I have a scenario that I am confused about ... I have a number of pages which are using a Master page ... Then I have seperate Footer user control that can reside in master page or could be kept in the content pages (still not confirmed and looking for any suggestion)
3
2362
by: William Youngman | last post by:
I am on a team that is developing a proposal generation web application and we are using a custom base page (ProGenBase.cs) located in the app_code directory and all of the app's web pages inherit from this custom page. Additionally I have a main menu tab control that is located in a master page and certain tabs are displayed dependant on the users authentication level. I am using boolean properties in the master page to control the visible...
3
2151
by: DaeMoohn | last post by:
Hello. This is my first post here. I'm rather new to asp.net, although I have solid knowledges in other programming areas. So, to be short. I have an Ajax enabled asp.net website to develop(using Enterprise Library, but that's not the problem). I created a master page, some content pages, and a custom control. I want to add the custom control in one of the content pages. The idea is the following: I assume I don't know the tables' structure...
1
1444
by: Rushi | last post by:
Hi All, I want to publish one Event from my Header User Control using Master pAge . And want to attach/detach this event from individual pages. Details: I have one User Control Header.ascx. This control have one Save Button. And this control haivng one Raise Event for this save button. I am using this UC in master page.
2
1714
by: Stratum | last post by:
It's an old question, and I apologize for raising it again. I use ImageButton objects on my ASP.Net master page to navigate to content pages. For each button, I have two images. One image shows black print on a white background, and the other image shows the same printing in white on a red background to indicate the content page which is presently loaded. When I navigate between pages, I want the
1
1225
by: Michael Nemtsev [MVP] | last post by:
Hello gerry, Everything ok with your code - it works fine and I see controls in designer - i just rebuld project and everything okey-dokey As I understand u are using VS 2008. Try to install the VS 2008 hotfix - it was shiped this february. google to find it ---
0
9407
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10175
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10017
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9961
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8840
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5283
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5425
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3534
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.