codebehind error

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..
 
B

Boban Dragojlovic

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top