Class defined in relative folder not showing up

  • Thread starter Maziar Aflatoun
  • Start date
M

Maziar Aflatoun

Hi everyone,

My web application runs in / however, my administration resides in /admin
folder. Inside my /admin I have a Login.aspx which is used to authenticate
users who use the administration section. I right clicked the /admin in
Visual Studio and Added a new Class (AuthenticateUser). However, in my
Login.aspx I can not use use that class. It gives me the following error
message.

c:\...\admin\Login.aspx.cs(29): The type or namespace name
'AuthenticateUser' could not be found (are you missing a using directive or
an assembly reference?)


Folder structure
/
.../admin -> files Login.aspx and Authenticate.cs

Thank you
Maziar A.
 
K

Karl

This might be overly obvious, but the only thing that comes to my mind is
that your namespaces don't match...
Authenticate.cs will have a namespace of "PROJECT_NAME.Admin" , if you
copied and pasted login.aspx from the root to the admin folder, it's
namespace will just be PROJECT_NAME

Karl
 

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,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top