problems listenening to events on a custom server control from another custom server control

 Hi all,

I am having problems listening to events on one of custom server controls(AddBookmark) from another custom server control(BookmarkList). The listener or the BookmarkList control has a property that can be set to the AddBookmark control (string at design but the reference is obtained at run-time). I am able to get a reference to the AddBookmark control and add a listener to it on the BookmarkList control on the OnPrender of BookmarkList. But the problem is that when the events on AddBookmark gets fired, the listener added from the BookmarkList is no longer present and the listener on BookmarkList never gets raised. If i add a listener to AddBookmark control events on the Page, it works fine. But not the listener on Bookmakrs List. Has anybody come across this before or have suggestions on how to go about fixing or troubleshooting it? Any help in this regard would be appreciated. Both controls do implement INamingContainer.

 

Thank You,

Vish

 

0
vish
1/29/2008 5:22:44 AM
asp.net.web-forms 93655 articles. 5 followers. Follow

0 Replies
1377 Views

Similar Articles

[PageSpeed] 14

Reply:

Similar Artilces:

Custom Server Control Vs Web Parts, Any need for Custom Server Control
Hello I've just posted a similar question on why you need server controls when you can pre-compile usercontrols and redistribute them. http://forums.asp.net/p/1397433/3010100.aspx#3010100 I've seen lots of (usercontrol vs web part) but not much on web part vs custom server control. According to the MSDN site you can put web parts onto a normal asp.net page outside of a web part zone and they behave just like custom server controls. So, if you are creating a bunch of controls for redistribution to customer asp.net sites and/or SharePoint sites why don't you just create Web Par...

Usercontrol vs Custom Server Controls, Any need for Custom Server Controls
Hello I'm new to ASP.Net so this is probably a stupid question but, is there any need to create customer server controls now that you can pre-compile usercontrols into a dll and thus easily share between applications? This blog post from David Ebb describes how to do it and the restrictions he note don't seem that bad (other than being able to embed resources such as images in the dll). http://blogs.msdn.com/davidebb/archive/2005/10/30/487160.aspx His article desribes the techniques for ASP.Net 2.0 and he suggests that there will be further improvements in .Net 3.5 in this ar...

Custom Web Control inside another Custom Web Control
Hi I created a custom web control (CusWebNew) that displays some textboxes by adding them to the ControlCollection of the webcontrol. I also created a custom webcontrol (CustWebButton) that inherts from Button control, and overrided the OnClick function. When I use CustWebButton on a regular web form, it seems to function correctly. However, when I added to be part of the ControlCollection of CustWebNew, it stops to work.   Any ideas why? Thanks Hey, What do you mean by stops to work?  Explain what you are trying to do with it and what it doesn't do.Brian"Trust in the...

Web Server Control Containing another Web Server Control?
I'm building a web server control that needs to include functionality from 3rd party web server control, ASPNetMenu. My web server control needs to render ASPNetMenu at runtime to create a menu. I'd like to do this so that my control's parent ASPX page does not need to register ASPNetMenu or make any configuration changes as this should be done through my web server control. Does anybody have any suggestions on how to do this? Mike - Cache entire web sites at the client and server and keep cache current. Cache just got easier! There are two articles that you would want to be int...

Server Web User Control or Web Custom Control
Ok, I made a DataGrid I like, stuck it in a Web Control Lib, and then to my toolbar. Now I want to take my nice little control and add it to a greater control, maybe place some buttons around it etc. I could always inherit from it in a new custom control and dynamically add the buttons, but I thought about using a Web User Control. I thought I could easily create a Web User Control, drop on my grid and the buttons on a form, and expose some properties and events, but once I got into it, I got a feeling that this isn't what a Web User Control is for. When designing a control li...

Custom Server Control Made of Custom Controls?
I'm giving myself a crash course in custom server controls, and I have a quick general question. Can I have a custom server control that is composed of other server controls I created. I'm pretty sure the answer is yes, but I want to be positive. Yes http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcondevelopingcompositecontrols.asp Shows how to combine existing controls into a new control using class composition. -ron Thanks! ASP.NET so rocks! Making page components extensible objects is such a great idea! I love it....

Custom event for Custom server control
  Hi All, I have a custom server control (Multi selection drop downlist). This control contains AspxEditButton control(which is like textbox with button), check box list control and panel.I have to display all selected values in AspxEditButton at control is leaving that panel. How can i create LostFocus event for panel . Please anyone help meRegards, Anu All I can think of, is that there is a javascript "onblur" you could look into, maybe you could use some AJAX techniques to make that JavaScript event fire a server side ev...

Custom Events in Custom Server Control
 Hi There I've created a custom server control. I have extended it by adding my own event which fires in one of the aggregated control's event handlers. My probelms is that I would like to be able to specify the event handler for the event from the aspx file as a tag attribute.Does anyone know how to link the attribute of a customer server control tag in the aspx file to a custom event in the class source for the control?   I've done this several times with Custom Controls.  All I do is declare the event in the CustomControl's class public...

handling events for controls in custom server control
Hi,     I am having a problem in using server controls in ASP.Net, with C#.  I am trying to create a server control which contains 2 other server controls that I created (Called MyImageButton).  MyImageButton extends the standard ImageButton with some other properties & methods that I needed.  It therefore also has the 'OnClick' event.  From the original server control, I would like to handle the Click event for these 2 image buttons in the same server control.  Basically, this server control will show 2 images, ascending and descendin...

Web Custom Control within a Web Custom Control
I was wondering if this can be done and how. I've created a simple custom control that displays a header which is my first custom control. So I'm just a baby when it comes to this.. Within the header I currently have a property for breadcrumbs which is a string. What I would like to do is have the breadcrumb property  be a Link Button List. I did find a custom control of a Link Button List which is exactly what I wanted. My question is how can/do  I include this into my custom control? Can it done? How? Please help? I'm at a lose here.   Susan You should be able to do ...

how to have both server controls and html controls rendered in a custom control?
I have a custom control in which there is an html text box.when you click on it , a div containing a table is appeared and according to what you select in that table a text is set to the text box. It works fine but the problem is: as the text box is an html element it doesn't have viewstate and when a post back occures in the page its value disappeares.I tried a hidden field to keep its value.again there is another problem : I put this custom control in a usercontrol and put the usercontrol in a multiview and by clicking on a button this view is selected and by clicking another bu...

Register Events on Control inside Custom Server Control
 I have some dynamically generated LinkButtons inside my custom server control. I never know how many there are going to end up being. I need to bind a 'Command' event to these. I understand that this nieeds to be done in the controls 'OnInit' event. I need to also add items to my server control dynamically in a pages codebehind, which will, in turn, dynamically create more linkbuttons. I'm having trouble keeping both these functionalities in one, as the OnInit event of the server control occurs before the page_Init event of my ASP.Net page.Here's the code of my ...

Bindable Childrens Controls Form Custom Server Control
Hi all!i have recently created a custom web server control that emit a tab panel it goes like this:<MyCtrl:TabPanel id="mytabs" runat="server"><MyCtrl:TabControl LabelName="Tab1" runat="server"><asp:TextBox id="myTextBox" runat="server"></asp:TextBox></MyCtrl:TabControl><MyCtrl:TabControl LabelName="Tab2" runat="server"><asp:repeater id="list" runat="server">     <ItemTemplate>           <%# Eval("FirstName") %>     </ItemTemplate&g...

How do you expose the event of a child server control from within a custom control?
I am trying to create a custom control that has a server control (dropdownlist) as a child.  I need to be able to expose the selectedindexchanged event from the dropdownlist at the page level.  How do you do this?  Here is a quick abbreviated example I wrote to show what I am trying to do:  My Custom Control1 Public Class MyCustomControl 2 Inherits Control 3 ' Variables 4 Protected WithEvents ddlServerControl As New DropDownList 5 ' Methods 6 Private Sub MyCustomControl_Load(ByVal sender As Object, ByVal e As System...

Web resources about - problems listenening to events on a custom server control from another custom server control - asp.net.web-forms

Russ Trotter (@russtrotter) on Twitter
Sign in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Russ Trotter @ russtrotter ...

Music Snobs Anonymous: Song du Jour
Music Snobs Anonymous Using my doctorate to take Music Snobbery to a new level Contact at our Music Snobs Anonymous page on Facebook or at h ...

Eastern Crates - music from the former enemy
Blog about my collection of rare and obscure jazz/funk/rock/pop/easy-listenening records from the former communist countries of eastern europe ...

Google Analytics Training
Google analytics training in Scotland. Google analytics courses from ICTADVISOR based in Fife Scotland who are a website marketing company

From the Autobahn to I-94
Twenty years ago, two groups of young, mostly black Midwesterners influenced in parts by disco, Philly Soul, and European synth-pop ...

Deep Inside: Redshape 'Square'
As a ritual item, masks are a universal human fascination. These objects may be simple, yet they possess a transformative potential that's as ...

Pure CSS Parallax Websites
This article demonstrates how to CSS transforms and perspective to create a performant parallax scrolling website that doesn't require JavaScript. ...

Midlands Women's Aid - services
Midlands Women's Aid Our services

Resources last updated: 12/3/2015 4:53:56 PM