Class name for an aspx page and ASP namespace

  • Thread starter Thread starter sergio.leon.leon
  • Start date Start date
S

sergio.leon.leon

Hello:

Sorry for my english, I am learning it.

If I am not mistaken when I create an aspx page or a user control, the
associated class name is like
<Folder1> _ <FolderN> _ <FileName>. Sometimes, I have to move the path
of the aspx page or change her name and I do not like that the class
name is talking about a wrong path. So, I always change the name of
these classes for a simply <FileName> (without <Folder1>_<FolderN>).

Can be this a problem in a future? Is there a rule about it?

On the other hand, the namespace ASP is for me a little mystery, I see
that apparently contains:


- The class of the page itself.
- The classes of the user controls registered with the directive
Register.
- The classes of the user controls referenced with the
directive Reference.
- The classes of the linked pages with the directive Reference.
- The class of the master page when a it is a content page.


Do you know where can I find information on this namespace?

Right now the only utility that I can see is with CType
because if the type of class is not in this namespace, I can’t make a
CType (<UserControl Instance>, ASP. <TypeName of the UserControl>).

Thanks.
 
As long as you change both the class name and the class name in the @ Page
directive, there is no issue. If it helps you organize things, then it is a
good change.

As for the ASP namespace. A namespace, in a tagged page, is merely a token
to make it easier to group elements. With ASP:, it is a namespace to
indicate you are working with a control in the system.web namespace (either
HTML or ASP.NET controls). There is not a huge amount of magic about this,
it merely helps the engine find the control. The choice of name ASP was
soemthing MS decided; they could have just as easily chosen ASPNET.

--
Gregory A. Beamer
MVP: MCP: +I, SE, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think Outside the Box! |
********************************************
Hello:

Sorry for my english, I am learning it.

If I am not mistaken when I create an aspx page or a user control, the
associated class name is like
<Folder1> _ <FolderN> _ <FileName>. Sometimes, I have to move the path
of the aspx page or change her name and I do not like that the class
name is talking about a wrong path. So, I always change the name of
these classes for a simply <FileName> (without <Folder1>_<FolderN>).

Can be this a problem in a future? Is there a rule about it?

On the other hand, the namespace ASP is for me a little mystery, I see
that apparently contains:


- The class of the page itself.
- The classes of the user controls registered with the directive
Register.
- The classes of the user controls referenced with the
directive Reference.
- The classes of the linked pages with the directive Reference.
- The class of the master page when a it is a content page.


Do you know where can I find information on this namespace?

Right now the only utility that I can see is with CType
because if the type of class is not in this namespace, I can’t make a
CType (<UserControl Instance>, ASP. <TypeName of the UserControl>).

Thanks.
 
Back
Top