[Mono-list] MS ASP .NET Bug
Pedro Santos
psantos@oninetspeed.pt
Thu, 15 Jul 2004 09:49:48 +0100
Hello, hello!
=20
I just found a bug in ASP .NET, I am at work and can't test this in =
Mono, so I wonder if it would happen in Mono too. The bug is simple, =
supose we have the following in an aspx:
<script runat=3D"server">
void ProcessClick( object sender, EventArgs args )
{
string sql =3D @"<script language=3D'javascript'>";
sql +=3D @"alert('";
sql +=3D nome.Value;
sql +=3D "');";
sql +=3D @"</script>"; // Here is the PROBLEM!
this.RegisterClientScriptBlock( "JJ", sql );
}
</script>
The parser will only "copy" to the class definition the code from =
<script runat=3Dserver> to <script>. The problem is that he thinks that =
the "</script>" literal is the tag end... So in the class definition we =
will have only:
=20
void ProcessClick( object sender, EventArgs args )
{
string sql =3D @"<script language=3D'javascript'>";
sql +=3D @"alert('";
sql +=3D nome.Value;
sql +=3D "');";
sql +=3D @"
=20
Witch produces a compiler error. Would this happen in Mono? If not, =
should it happen?=20