There can be only one 'page' directive

P

Poppy

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 ?
 
K

Ken Schaefer

I haven't seen this error personally, but, in each .aspx file there can only
be one line that starts:

<%@ Page ... %>

where you set things like the page language, caching directives etc. Perhaps
open the file in Notepad and check to see if you have more than one such
line.

Cheers
Ken

: 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 ?
:
:
 

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

Top