473,326 Members | 2,102 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,326 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 1979
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 =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.