Andrew:
If I copy your code exactly into vs.net:
using System;
using System.Web.UI;
namespace TestCS
{
public class Start : AdminPage
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
int x = 1;
}
}
public class AdminPage : Page
{
protected override void OnInit(EventArgs e)
{
int x = 1;
}
}
}
and debug it, I hit both OnInit...your AdminPage should probably also call
base.OnInit(e) but that won't solve your problem......have you tried the
simple example without all the stuff or did you just strip some stuff out
for our benefit?
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"AC [MVP MCMS]" <sw*********@gmail.com> wrote in message
news:OD**************@TK2MSFTNGP12.phx.gbl...
I feel like I'm missing something so simple...
I have a page (start.aspx) whose code behind is
public class Start : AdminPage
{
override protected void OnInit(EventArgs e)
{
base.OnInit(e);
int x=1;
}
}
And my AdminPage class looks like this:
public class AdminPage : System.Web.UI.Page
{
override protected void OnInit(EventArgs e)
{
int x=1;
}
}
No, it's not really this simple, but I'm removing my custom stuff to keep
it simple for this question. Anyway, I build and set a breakpoint in the
AdminPage.OnInit assignment and it never stops... but it does stop on the
Start OnInit if I do the same thing... ideas? I'm flat out lost.
--
-AC [MVP MCMS]
http://www.andrewconnell.com
http://www.andrewconnell.com/mvp