473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Namespace alias using inline code?

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
4 1981
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jon Maz | last post by:
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...
8
by: Petter Reinholdtsen | last post by:
I ran into a problem on HP-UX 11.00 the other day, where it refused to compile a program using 'using namespace std;' at the top. The reason seem to be that the compiler refuses to accept 'using...
5
by: Mike Oliszewski | last post by:
Given the following c# code: namespace Company2 { public class SomeFunctions { public void FunctionA() { // Do Something. }
8
by: James Bradley | last post by:
Hi Folks, I am coming up to speed with C# and I have run into an interesting issue. I have an old VB COM library that I need to access with a ProgId == 'xyz' I also have a C# class that is...
4
by: Kevin Newman | last post by:
The primary problem I've had with php is the lack of namespaces, which makes OOP very difficult to organize, since you end up with large number of classes cluttering up the same namespace - which...
4
by: David A | last post by:
I'm trying to "isolate" some unmanaged calls to DLLs in a separate namespace so I can have all the unmanaged calls to DLL functions in a separate module and then these can be called from any other...
3
by: Schizoid Man | last post by:
Hi, I'm a novice whose just about migrating to C++ after cutting my teeth on C for a few years. To start with I'm using Microsoft's out-of-the-box Visual C++ Express Edition compiler and I...
3
by: toton | last post by:
Hi, Is it possible to have a class level namespace opening instead of file level . Something like this, I have a long namespace like namespace com { namespace my_company{ namespace...
11
by: Chris Thomasson | last post by:
I was thinking of how I was going to create a robust versioning system in Standard C++ for my library and was wondering exactly what the point of a namespace alias is? The seem like a rather...
10
by: Francois Malgreve | last post by:
Hello everybody, I have a pretty straightforward question regarding namespace. Is there anyone who knows why the following code does not compile on the line Type t =...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.