[Mono-aspnet-list] Code Problem

nedry brett.e.ernst at gmail.com
Mon Sep 26 04:46:48 EDT 2011


mostafaxx wrote:
> 
> nedry could you please tell us how could you tell that i'm defining a
> nested class inside the actual page class ????
> 

An .aspx page is, itself, compiled into a class. Notice in your first
example where you have a Page_Load method but no explicit class declaration
around it? The method becomes a member of the class generated by the aspx
engine. By adding another class declaration inside the page, you're actually
creating a nested class that is never instantiated or called.

I believe if you just remove the auto event wireup and connect the event in
an OnInit override, without creating a new class, it should work properly.

--
View this message in context: http://mono.1490590.n4.nabble.com/Code-Problem-tp3839138p3843116.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.


More information about the Mono-aspnet-list mailing list