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

Namespace alias using inline code?

P: n/a
Hi,

Simple one. The C# code behind for a .aspx page can have a 'namespace
alias', as here:

using AdsBusiness = Wrox.WebModules.AdsManager.Business;

Question: can you do this with inline code too, and if so, what's the
syntax?

Thanks,

JON

Nov 22 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
If you are not using CodeBehind I don't think this can be done. Because all
of your imports are at the top of the page of your aspx page.

"Jon Maz" wrote:
Hi,

Simple one. The C# code behind for a .aspx page can have a 'namespace
alias', as here:

using AdsBusiness = Wrox.WebModules.AdsManager.Business;

Question: can you do this with inline code too, and if so, what's the
syntax?

Thanks,

JON

Nov 22 '05 #2

P: n/a
If you are not using CodeBehind I don't think this can be done. Because all
of your imports are at the top of the page of your aspx page.

"Jon Maz" wrote:
Hi,

Simple one. The C# code behind for a .aspx page can have a 'namespace
alias', as here:

using AdsBusiness = Wrox.WebModules.AdsManager.Business;

Question: can you do this with inline code too, and if so, what's the
syntax?

Thanks,

JON

Nov 22 '05 #3

P: n/a
I was hoping there was some way of doing it...

<%@ Import Namespace="Bob=System.Configuration" %>

or something like that....

But if it can't be done, it can't be done....

:-(
Nov 22 '05 #4

P: n/a
I was hoping there was some way of doing it...

<%@ Import Namespace="Bob=System.Configuration" %>

or something like that....

But if it can't be done, it can't be done....

:-(
Nov 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.