C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I start working on c# and I have a problem with compiling my c# programs.
Could someone help me with this please? This is my problem:
I have three files: the first one is employee.aspx; the second one is
employee.cs (codebehind) and the third one is CEmployee.cs. In the code
behind file, employee.cs, I use CEmployee Class. When I open the
employee.aspx file in the browser, it said that I could not load type
CEmployee class. Could you tell me what I should do? Thanks very much!
 
On top of your ASPX file, you should link to the appropriate code-behind.
In this example, change the content of the attribute "Inherits" into the
fully qualified name of your codebehind class.
<%@ Page language="c#" Codebehind="employee.cs" AutoEventWireup="false"
Inherits="YourNamespace.Employee" %>

And you must of course then compile your project to get it working.
You will have a DLL file created in your 'bin' subdirectory.
 
Back
Top