codebehind error

  • Thread starter Thread starter ani
  • Start date Start date
A

ani

When I try to open the web form page, I get a designer
error which says:


'the file could not be loaded into the web forms designer.
Please correct the following error and then try loading it
again:

The @Page or @Control directive contains a src=attribute,
which is not supported in Visual Studio.

Make sure all of the classes used in the page are built or
referenced in the project. '


How can I stop this . Also when I create a new web form
the page directive appears with the codebehind attribute
and the inherits attribute. Do I have to change them. I
also see a .aspx.vb file when the new aspx page is
created. Can I use this for codebehind. How do I
compile .aspx.vb file. I know the command, but it always
generates error. What is this aspx file and how do I use
it. Please help!

Thanks..
 
The "recommended" model uses the inherited page, and NOT the "src"
attribute.

Using this attribute is not recommended, and you will get the error you are
experiencing.

The best way of developing is to leave what it inserts for you (e.g. the
codebehind= and inherits= attributes).

Develop your "codebehind" in the .aspx.vb page

When you compile your application, it will automatically compile the VB
classes for you into a single DLL. Then you don't need to deploy the VB
files, only the AS?X and DLL files.
 
Back
Top