Hi Paul,
Look in your HTML sent to the client and see if a __doPostBack is getting generated for your control. Your code should be executing.
>I've got a custom ASP.NET control that needs to know when a postback event has occurred. Based on the MSDN docs, I thought all I'd need to do was to implement the IPostBackEventHandler interface, and add add a RaisePostBackEvent() method to my custom control. I added some dummy code to RaisePostBackEvent so I could get the debugger to stop in here. Then I added a button to the same form where this custom control is being used (which should do a postback when clicked). When I click on the button, a postback is occurring, but the debugger isn't stopping at RaisePostBackEvent(). Is there something else that needs to be done to capture this event in my custom control?
>
>My class definition looks like:
>
>
>using System.Web.UI.WebControls;
>
>public class ListBase : WebControl, IPostBackEventHandler
>
>
>RaisePostBackEvent() looks like:
>
>
>public void RaisePostBackEvent(string eventArgument)
>{
> string sample;
> // Debugger is set to stop on the next line.
> sample = "";
>}
>
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi