[Mono-aspnet-list] "Cannot find the specified file" in aspx.cs file.

Nemus nemus at grayhatlabs.com
Tue Nov 17 22:16:00 EST 2009


I have a newbie question about running a mono asp ubuntu 9.04 apache2 server
I have two files  Default.aspx  Default.aspx.cs 
and it seams as if the  Default.aspx  cannot use or see the Default.aspx.cs
file

The Error I am geting is "Cannot find the specified file" when I try to call 
OnClick="button1Clicked" in Default.aspx which is located in Default.aspx.cs

// start Default.aspx
<%@ Page Language="C#" Inherits="Test.Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head runat="server">
        <title>Default</title>
</head>
<body>
        <form id="form1" runat="server">
                <asp:Button id="button1" runat="server" Text="Click me!" 
OnClick="button1Clicked" />
        </form>

<% Response.Write("It works like charm!"); %>

</body>
</html>

//end Default.aspx

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.4200
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Web;
using System.Web.UI;


namespace Test
{


        public partial class Default : System.Web.UI.Page
        {

                public virtual void button1Clicked (object sender, EventArgs
args)
                {
                                     button1.Text = "You clicked me";
                }
        }
}

// start Default.aspx.cs

-- 
View this message in context: http://old.nabble.com/%22Cannot-find-the-specified-file%22-in-aspx.cs-file.-tp26332841p26332841.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.



More information about the Mono-aspnet-list mailing list