Events not raised

T

Tumurbaatar S.

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?
 
T

Tom John

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?

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top