Search

You searched for the word(s): userid:790634

Matching Posts

  • Re: How to register multiple events in a Composite Control efficiently?

    Allen, I just don't see how the the RaisePostBackEvent could ever fire before CreateChildControls so I am going to assume it is not possible because of Page and control event processing model, if I am misunderstanding this please explain. MSDN Says : The Page object calls the RaisePostBackEvent method when a postback occurs. This call occurs in the page life cycle after loading and change notification are complete but before prerendering occurs. Also in MSDN Docs : Page initialization During
    Posted to Custom Server Controls (Forum) by OutOfTouch on 4/14/2009
  • Re: How to register multiple events in a Composite Control efficiently?

    Allen, I tried a different approach and added a literal control to the panel that just contained an img tag similar to your example. The RaisePostBackEvent fires but not until after the CreateChildControls method is executed. I wish I could figure this out but I don't know what else to try especially when using the image button like I am. Thanks
    Posted to Custom Server Controls (Forum) by OutOfTouch on 4/5/2009
  • Re: How to register multiple events in a Composite Control efficiently?

    I read on another site that this is not working because the ImageButton already implements the IPostBackDataHandler, IPostBackEventHandler but there was no suggested solution. Does anybody know what would be a work around for this?
    Posted to Custom Server Controls (Forum) by OutOfTouch on 4/4/2009
  • Re: How to register multiple events in a Composite Control efficiently?

    I am trying to do something similar to this, this code is not tested: using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; /// &lt;summary&gt; /// Summary description for MyCompositeControl /// </summary> public class MyCompositeControl: CompositeControl, IPostBackEventHandler { private static readonly
    Posted to Custom Server Controls (Forum) by OutOfTouch on 4/3/2009
  • Re: How to register multiple events in a Composite Control efficiently?

    Hi Allen, Thanks for your help, I really appreciate it, orginally my code was creating the child controls to add to the panel in the OnLoad method after reading the following I moved it all to the CreateChildControls method : "You should create the child controls in the CreateChildControls method and not in OnInit or another life cycle phase. The server control architecture relies on calls to CreateChildControls whenever the Controls collection is needed, such as during data binding (if applicable
    Posted to Custom Server Controls (Forum) by OutOfTouch on 4/3/2009
  • Re: How to register multiple events in a Composite Control efficiently?

    Nope in my code I can not get it to work. I never see the RaisePostBackEvent fire. I have a custom control that inherits from CompositeControl and implements the IPostBackEventHandler interface in MyCustomCompositeControl. An image button is created and added to a panel control that panel is than added to MyCustomCompositeControl controls collection. So I am guessing that because MyCustomCompositeControl is the one implementing the IPostBackEventHandler interface instead of the image button it never
    Posted to Custom Server Controls (Forum) by OutOfTouch on 4/3/2009
  • Re: How to register multiple events in a Composite Control efficiently?

    Well, I tested this out and I notice no difference in the page being able to process the event when using IPostBackEventHandler and public void RaisePostBackEvent( string eventArgument) { OnClick( new EventArgs()); } Vs. not implementing the IPostBackEventHandler interface and not using the RaisePostbackMethod. There must be something I am missing, please help. I also wanted the event to be processed before the control was to run the CreateChildControls method which I can't seem to make happen
    Posted to Custom Server Controls (Forum) by OutOfTouch on 4/2/2009
  • How to register multiple events in a Composite Control efficiently?

    Hi, I am looking at two examples in the msdn docs. The first example I am looking is here : http://msdn.microsoft.com/en-us/library/aa719907(VS.71).aspx it states that by adding the event to the events property of the control it is more efficient. Also in the example they are implementing IPostBackEventHandler. In this second example found here, http://msdn.microsoft.com/en-us/library/3257x3ea.aspx They are are kind of doing basically the same thing but no implementation of IPostBackEventHandler
    Posted to Custom Server Controls (Forum) by OutOfTouch on 4/1/2009
  • Re: Properties added in ProviderPattern Config Section Class not availble to provider?

    Here is some example code from a custom config section class: private readonly ConfigurationProperty _applicationName = new ConfigurationProperty( "applicationName" , typeof ( string ), null ); //Constructor public SomeProviderConfigSection() { // Add section specific properties. Properties.Add(_applicationName); } And Here is some partial code from the Custom Provider: protected internal const string ApplicationNameKeyName = "applicationName" ; public override void Initialize
    Posted to Architecture (Forum) by OutOfTouch on 4/1/2009
  • Properties added in ProviderPattern Config Section Class not availble to provider?

    Hi, I am wondering how I can use a custom Provider config section to add properties to the ProviderSettingsCollection and be able to retrieve those properties in my custom provider. Currently I never see those properties in the NameValue collection in my custom provider even though the custom config section adds them with no errors. Thanks
    Posted to Architecture (Forum) by OutOfTouch on 3/31/2009
Page 1 of 22 (215 items) 1 2 3 4 5 Next > ... Last »