[Mono-list] Problem with color property in VB.NET aspx control

Adrien Dessemond adrien.dessemond at softhome.net
Sun Jun 24 13:51:39 EDT 2007


Hello,


> So I deleted the 'forecolor="Blue"' property and it worked. 
> I thought that by adding the <%@ import Namespace="System.Web"  missing?
> and <%@ import Namespace="System.Drawing.Color" %> 

Your statement <%@ import Namespace="System.Drawing.Color" %> 
should be rewritten like <%@ import Namespace="System.Drawing" %>  
I tested with the exact ASPX below and I get a nice 
blue "Welcome to My Page" (used Mono 1.2.4+xsp and xsp2):

<html>
  <body>
     <form runat="server">
         <asp:Label id="lblTitulo" style="Z-INDEX: 100; LEFT: 269px;
POSITION: absolute; TOP: 98px" runat="server" forecolor="Blue"
font-size="X-Large" font-bold="True">Welcome
         to My Page</asp:Label>
         <!-- Insert content here -->
     </form>
  </body>
</html>


(no ASP directives at all).

FYI, I just put in an aspx file in my /tmp then run xsp while in /tmp and 
opened the page with Firefox. If adjusting your import directive changes
nothing, could please try this and drop us a note about what it 
reports ?

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Reflection" %>
<html>
  <script runat="server">

  void PrintAssemblies()
  {
      Assembly[] asms = AppDomain.CurrentDomain.GetAssemblies();

      foreach(Assembly asm in asms)
         Response.Write(String.Format("{0} <b>{1}</b><br/>", asm.FullName, asm.Location));
  }

  </script>
  <body>
     <form runat="server">
         <asp:Label id="lblTitulo" runat="server" font-size="X-Large" font-bold="True">Welcome to My Page</asp:Label>
         <!-- Insert content here -->

         <br/>
         Loaded assemblies :
         <br/>
         <% PrintAssemblies(); %>

     </form>
  </body>
</html>


Kind regards,

Adrien



More information about the Mono-list mailing list