By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,978 Members | 1,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,978 IT Pros & Developers. It's quick & easy.

Imports (Master Page vs. Content Page vb)

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Steven K" <sk****@troop.com> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
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

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.