[Mono-devel-list] Starting problems with ASP.NET

Gonzalo Paniagua Javier gonzalo at ximian.com
Wed Mar 10 10:40:25 EST 2004


El mié, 10-03-2004 a las 07:36, Bec-Penya, Luis {IT-O~Terrassa}
escribió:
> I have just install mono and xsp on Linux RedHat 9.0. All the examples
> from http://localhost/mono/index.aspx works perfectly well, but when I
> copy & paste a little example from other place ( www ) doesn’t work. I
> know that I’m doing something wrong… Can you help me?
> 
>  
> 
> If I try with this archive  “Button.aspx” it doesn’t work. Why?
> 
>  
> 
> <script  runat="server">
> Sub button1(Source As Object, e As EventArgs)
>    p1.InnerHtml="You clicked the blue button!"
> End Sub
> Sub button2(Source As Object, e As EventArgs)
>    p1.InnerHtml="You clicked the pink button!"
> End Sub
> </script>

Because this is VB.NET. As mbas, the mono VB.NET compiler is not yet
complete, we are using the C# compiler as the default. Change those
lines to be like this:
<script  runat="server">
void button1 (object source, EventArgs e)
{
	p1.InnerHtml="You clicked the blue button!"
}

void button2(object source, EventArgs e)
{
	p1.InnerHtml="You clicked the pink button!"
}
</script>

and it will work.

-Gonzalo





More information about the Mono-devel-list mailing list