locked
Events from UserControl to Page RRS feed

  • Question

  • User-94466089 posted

    I've made a UserControl for Paging and I want to be able to include it in a page and then set some selectparameters in a ObjectDataSource when clicking a button in the UserControl...How to declare eventhandlers for this..?

    Thursday, July 17, 2008 7:16 AM

All replies

  • User-294030300 posted

    Hey,

    Check this out:  http://aspalliance.com/1461  This is one way you can get the two to work together... 

    Thursday, July 17, 2008 7:46 AM
  • User-94466089 posted

    Don't get it...why so many classes?

    Thursday, July 17, 2008 11:57 AM
  • User-294030300 posted

    I was going for a more reusable approach; at the least, you can expose some things from the user control base class, but you can only use that class definition if you are using web application project; with the web site project template, you have to use my approach...

    Just giving you another idea; more classes isn't bad... sometimes more classes provides a more reusable approach that's better, and sometimes its the other way around.  It all depends on the situation.  I don't completely grasp yours,so if you give me more info, I can help further.

    Thursday, July 17, 2008 1:34 PM
  • User-94466089 posted

    I figured it out by using this in the userControl; 

    public delegate void OnPaging();
    public event OnPaging lnkHandler;
     
    Thursday, July 17, 2008 2:18 PM