Imports (Master Page vs. Content Page vb)

  • Thread starter Thread starter Steven K
  • Start date Start date
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
 
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
 
Back
Top