Imports (Master Page vs. Content Page vb)

S

Steven K

Hello,

Is there a way to declare imports so that they don't have to be declared
both in Master Page.vb and the Content Page.vb?
For example, I have the following in the Master Page.vb
Imports System
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data
Imports System.Data.OLEDB
Imports System.Web.Mail

But I have to also make the same declarations in my content file also.

thanks in advance, Steven
 
K

Karl

you can't make them file specific. however you can import for the entire
project:
Right click on project --> "Properties" --> "Imports" and add them to the
list.

I find that these project imports often hurt readability of your code, so I
would question whether i wanted to do that...

Is there a reason you are looking to do this? Short of typing them out all
the type? Create a macro :)

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,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top