FW: [Mono-devel-list] Session and Application Variables in XSP
Gonzalo Paniagua Javier
gonzalo at ximian.com
Fri Oct 10 21:48:30 EDT 2003
El vie, 10-10-2003 a las 19:01, Cezar Nasui escribió:
> Hi Gonzalo,
>
> I further tested the Session and Applcation variables bug before adding it
> to bugzilla and I have good news and bad news.
> I'll start with the good news :
> Session and Application variables are both working.
Ah! This is another story, then :)
> The problem is if you declare variable ouside the Page_Load() method
> and try to give them a value inside the Page_Load it won't work, it's
> like ASP.NET sees the inside variable (with the same name) as a total
> new one.
> I'll try to explain better with an example.
>
> test.aspx
> ---
> <%@ Page Language="C#" %>
> <script runat="server">
>
> String str = "test";
> private void Page_Load(){
> str = "inside Page_Load";
> }
Ah! Well, I think this is actually a bug in MS. Both books I have on
ASP.NET says that the signature of Page_XXX methdos used for automatic
event wire up *must* match the signature of EventHandler delegate (ie:
object o, EventArgs args).
That's why in mono we check that the method matches that signature.
I've just tested under MS and they seem to «work» for: Page_Load () and
Page_Load (object, EventArgs), but the don't for Page_Load (object).
I don't know what's the rationale behind this, but I'll modify mono to
behave as MS in a few minutes.
Thanks!
-Gonzalo
More information about the Mono-devel-list
mailing list