How to use Codebehind? -
05-30-2005
, 10:54 AM
Hi!
I want to split my working ASP.NET page into HTML-file and JSL-file.
To handle this on an easy way, I donwloadet the Visual Web Developer
2005 Express Edition Beta 2 and installed it.
After that, I created a new Web-Project with two files. In the
login.aspx is only the HTML-Code from my old file. And I changed the
first line to this:
***
<%@ Page Language="VJ#" CodeFile="login.jsl" Inherits="login"%>
***
In the login.jsl is now a class with the name login, which has the
complete VJ#-Code from the old file.
But if I try now to build a web site (Build -> Build Web Site...), I
get the following errors:
***
Error 1 C:\Dokumente und Einstellungen\Christian\Eigene Dateien\Visual
Studio 2005\WebSites\WebSite2\login.jsl(5): error VJS1183:
Redeclaration of type 'login' declared in another source file /
Error 2 Redeclaration of type 'login' declared in another source file
C:\Dokumente und Einstellungen\Christian\Eigene Dateien\Visual Studio
2005\WebSites\WebSite2\login.jsl 5
***
Please can anoyone help me to correct this problem?
Thanks and greetings,
christian. |