Saturday, March 31, 2012

There can be only one page directive

I opened an asp page in VS.net 2002 and then saved it as an aspx page,
"mypage.aspx".

I was prompted if I wanted to create the class file for the page and clicked
yes.

Now when I try and open the page I get the error message :

"There can be only one 'page' directive."

I am sick of these problems. I have had a look in the folder and there is
only one "mypage.aspx.vb" file.

Whats happening ?A Page and a PageDirective are two different things. In your aspx page, make sure at the top their is one Page tag (directive).
Looks something like:
<@.Page ...>
and is at the top of the page.

0 comments:

Post a Comment