[Mono-list] Compilation errors ...

Azher Amin azher at niit.edu.pk
Thu Aug 9 14:29:38 EDT 2007


Hi Martin,

Thnx for quick reply. I compiled again using the following but again 
errors, detail below. Plz suggest.

Another thing is that I have this piece of code. I have the mod mono and 
its working fine. However Login.aspx.cs which is referred in this code 
is not in compiled form, so while copying to linux do we need to compile 
the code or should the mono will compile it at run time ?? .. Further 
this code shows not output justa white blank page ....

Regards
-Azher

---------------------- Login.aspx --------------
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" 
AutoEventWireup="true"
    CodeFile="Login.aspx.cs" Inherits="Login" Theme = "ThemeDesign" 
Title="Southern Tree - Financial Management" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" 
runat="Server">

    <form id="form1" runat="server" >
        <asp:Login ID="Login1" runat="server" TitleText="My Account" 
DestinationPageUrl="~/WebPages/Client/MainPage.aspx" Log
inButtonText="log in" OnLoggedIn="Login1_LoggedIn">
            <CheckBoxStyle ForeColor="Black" Font-Size="Small" 
Font-Bold="True" />
            <LabelStyle ForeColor="Black" Font-Size="Small" 
Font-Bold="True" />
            <LoginButtonStyle BackColor="#FF7721" BorderStyle="Outset" 
BorderWidth="3px" Font-Bold="True"
                Font-Size="Small" ForeColor="White" />
            <FailureTextStyle Font-Size="Small" Font-Bold="True" />
            <TitleTextStyle Font-Bold="True" ForeColor="#FF7721" />
        </asp:Login>
        &nbsp;&nbsp;
        </form>

</asp:Content>

------------------------- compile from console -------
[root at host]# mcs Login.aspx.cs -r:System.Web.dll -r:System.Data.dll 
-r:System.Web.dll

Login.aspx.cs(9,7): error CS0234: The type or namespace name `WebParts' 
does not exist in the namespace `System.Web.UI.WebControls'. Are you 
missing an assembly reference?
Login.aspx.cs(9,1): error CS0246: The type or namespace name 
`WebControls.WebParts' could not be found. Are you missing a using 
directive or an assembly reference?
Login.aspx.cs(9,7): error CS0234: The type or namespace name `WebParts' 
does not exist in the namespace `System.Web.UI.WebControls'. Are you 
missing an assembly reference?
Login.aspx.cs(9,1): error CS0246: The type or namespace name 
`WebControls.WebParts' could not be found. Are you missing a using 
directive or an assembly reference?
Compilation failed: 4 error(s), 0 warnings
[root at host]#

-------------------------------

Martin Trejo wrote:
> Did you include the reference to System.Web assembly when compiling?
>
> 2007/8/9, Azher Amin <azher at niit.edu.pk <mailto:azher at niit.edu.pk>>:
>
>     Hi gurus,
>
>     I am trying to compile a .Net aspx using mono, however I am
>     getting the
>     following error, plz suggest the possible solutions.
>     I am using mono 1.2.4
>
>     Regards
>     -Azher Amin
>
>
>     Login.aspx.cs (13,30): error CS0234: The type or namespace name
>     `UI' does
>     not exist in the namespace `System.Web'. Are you missing an assembly
>     reference?
>     Compilation failed: 1 error(s), 0 warnings
>
>     Code:
>     ====
>     using System;
>     using System.Data;
>     using System.Configuration;
>     using System.Collections;
>     using System.Web;
>     using System.Web.Security;
>     using System.Web.UI;
>     using System.Web.UI.WebControls;
>     using System.Web.UI.WebControls.WebParts ;
>     using System.Web.UI.HtmlControls;
>     using System.Data.SqlClient;
>
>     public partial class Login : System.Web.UI.Page
>     {
>         protected void Page_Load(object sender, EventArgs e)
>         {
>
>
>
>     --
>     This message has been scanned for viruses and
>     dangerous content by MailScanner, and is
>     believed to be clean.
>
>     _______________________________________________
>     Mono-list maillist  -   Mono-list at lists.ximian.com
>     <mailto:Mono-list at lists.ximian.com>
>     http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
>
> -- 
> Saludos,
>
> Martín Trejo Chávez
> http://chilli-coder.blogspot.com
> -- 
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean. 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Mono-list mailing list