Events not raised

Discussion in 'ASP .Net' started by Tumurbaatar S., Jul 18, 2005.

  1. There're 2 pages: a login page and a page where users redirect after login
    to.
    All my pages have "AutoEventWireup=false" (VS.NET requires it?). And my
    first (login) page's code has Page_Load event handler and this handler
    called
    automatically. No InitializeComponent() needed to assign event handler.
    But the second page's Page_Load is not called anyway. With IDE generated
    InitializeComponent(). Nor when I delete it. I reassigned all event handlers
    of both
    pages by clearing method names in Properties box, saving/rebuilding and
    assigning
    them again (in same toolbox). In this case, the 1st page does not generate
    InitializeComponent() handler, but the 2nd one generates it, where it
    contains
    code like this:

    this.Load += new System.EventHandler(this.Page_Load);

    But this does not work! Page_Load is not called (I tested with debugger)!

    Any ideas?
     
    Tumurbaatar S., Jul 18, 2005
    #1
    1. Advertisements

  2. Tumurbaatar S.

    Tom John Guest

    Are you sure you have the correct cod behind file associated with the
    ASPX page (as declared at the top of the HTML in the <% %> tags):

    <% ... Codebehind="MyPage.aspx.vb" Inherits="WebApplication1.MyPage"%>

    Hope this helps

    Tom
     
    Tom John, Jul 18, 2005
    #2
    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.