Hi, I'm also a new mono user, and I'm actually trying to port an existing asp.net application to mono. I've encountered a problem with code blocks within html tags and cant find a way to run around it.
To better explain my problem I have this simple sample code: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Mono Tester</title> </head> <body > <form id="form1" runat="server" onload="form1_Load"> <%=strString%> <div id="H<%=intID%>"> Mono Tester<br /> <br /> <br /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></div> <input id="input<%=intID%>" value="<%=strString%>" type="text" /> </form> </body> </html> the code behind file looks like this: Partial Class _Default Inherits System.Web.UI.Page Protected strString As String Protected intId As Integer Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) strString = "Random data" intId = 1 Me.TextBox1.Text = strString End Sub End Class I have no problems running the application on windows, but on mono every code block inside a tag causes an error: Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error. Compiler Error Message: /tmp/root-temp-aspnet-0/da6ebdb7/App_Web_12e5d8ea_1.vb(191,1) : error VBNC30037: Symbol is not valid. /tmp/root-temp-aspnet-0/da6ebdb7/App_Web_12e5d8ea_1.vb(204,1) : error VBNC30037: Symbol is not valid. /tmp/root-temp-aspnet-0/da6ebdb7/App_Web_12e5d8ea_1.vb(212,1) : error VBNC30037: Symbol is not valid. Source Error: Line 189: #ExternalSource(/srv/www/htdocs/payswitch/PFCLIENT/Default.aspx, 11) Line 190: __output.Write(""&Microsoft.VisualBasic.ChrW(10)&" "&Microsoft.VisualBasic.ChrW(10)&" <div id=""H") Line 191: #End ExternalSource Line 192: Line 193: #ExternalSource(@@inner_string@@, 1) if I remove the code blocks located inside tags, the application runs ok, any other way produces this error. The problem is that in the actual application I'm working on this is is used heavily, so I would like to know if there's any way to work around this problem. Any suggestions or ideas are very welcome! Thanks in advance for your time and cooperation, Alberto León -- View this message in context: http://www.nabble.com/Help-with-code-blocks-inside-html-tags-in-.Aspx-files-tp17679428p17679428.html Sent from the Mono - VB mailing list archive at Nabble.com. _______________________________________________ Mono-vb mailing list [email protected] http://lists.ximian.com/mailman/listinfo/mono-vb
