Hi,
do********@hotm ail.com wrote:
Both of these items are included. I'm guessing it has something to do
with the fact that the files were originally in a website solution and
now that they are added to a web project, they are some how not tied
into the project properly.
In ASP.NET 2.0, the controls are added to the code-behind by using an
additional CS file named "ClassName.desi gner.cs", which contains a
partial class. In Website projects, this file is created automatically.
When you moved the files to the web application project, it might very
well be that the link has been broken.
You have two solutions: Add a new Web Form to your web app project and
copy the file (ASPX and CS) into the corresponding new files. This will
restore the link to the designer.cs file.
Another way is to simply declare the controls yourself in the code behind:
// For example
protected Button bnClickMe;
It is sufficient to declare them, they will be automatically
instantiated by the framework. Note that they must be declared protected .
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch