Usercontrol Page_Load not firing.

Discussion in 'ASP .Net' started by Sosh, Jun 9, 2005.

  1. Sosh

    Sosh Guest

    Hi,

    Could anybody suggest a reason why the Page_Load method is not happening
    in a dynamically loaded user control? (All of the content from the ascx
    is being displayed though).

    Thanks
     
    Sosh, Jun 9, 2005
    #1
    1. Advertisements

  2. Sosh

    Guest Guest

    Is the Event wired up?

    Go to designer of the ascx, in the property pane select the control, click
    the actions tab (lightning thumb) and see if Load has a method defined.

    Good luck!

    Jason Lind
     
    Guest, Jun 9, 2005
    #2
    1. Advertisements

  3. Sosh

    Sosh Guest

    Yes:

    private void InitializeComponent()
    {
    this.Load += new System.EventHandler
    (this.Page_Load);
    }

    I don't use the designer though - seems more trouble than it's worth to
    me.
     
    Sosh, Jun 9, 2005
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.