473,498 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Current namespace /class

How can i get my current Namespace & current class in my webform... I tried
alot but i get ASP.myformname_aspx...
Is there a way to get Current Namespace, class??
Nov 19 '05 #1
1 1217
Assuming you are inside a method in your webform, you can use:

Type type = this.GetType();
string nameSpace = type.Namespace;

HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 12 Feb 2005 02:50:35 +0200, "Islam Elkhayat"
<is******@yahoo.com> wrote:
How can i get my current Namespace & current class in my webform... I tried
alot but i get ASP.myformname_aspx...
Is there a way to get Current Namespace, class??


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2121
by: Glen | last post by:
Hi, Is there a way to resolve the current namespace in a static method, such as Main() from within a console app? In a public method from a class instance, you can use the "this" keyword in...
2
39116
by: Steve | last post by:
I have a general routine in a windows app to get an embedded resource using GetManifestResourceStream, Is it possible for when I call my routine to use some kind of reflection to get the current...
1
8576
by: Islam Elkhayat | last post by:
How can i get my current Namespace & current class in my webform... I tried alot but i get ASP.myformname_aspx... Is there a way to get Current Namespace, class??
3
2732
by: xzzy | last post by:
A. I need to access: System.Web.HttpContext.Current.Cache but get this error: "Object reference not set to an instance of the object" B. System.Web.HttpContext.Current.Cache is accessible...
1
1904
by: Mike Walters | last post by:
Reading the current Namespace.Class, Assemble at runtime I am trying to get the Assemble, Namespace and Class name of a form at runtime. I have several assembles and namespaces in my app, I...
4
5650
by: Greg Allen | last post by:
I have a web service and am trying to use WSE 2.0 to pass attachments. I have enabled both the checkboxes in the WSE properties page in VS. The problem occurs when I try to get the...
8
8839
by: news.microsoft.com | last post by:
How do I get the class name for a current instance. For example, if I want to know the Class Name for the current form, how do I get this programatically. Thanks
1
4971
by: Joseph Geretz | last post by:
I have a web service page which uses WSE 2.0 SP3 to return a file attachment on one of its method calls. All web service methods are functioning properly, except for this one method which uses WSE...
8
996
by: eric | last post by:
I have a 2.0 asp.net project. In a class contained within a seperate project, I am trying to reference HttpContext.Current.Session but Session is always null. I've tried implementing...
0
1606
by: Fredrik Lundh | last post by:
Robert Rawlins wrote: Name or namespace? You can access the class name from an instance via the __class__ attribute: .... def __repr__(self): .... return "<%s instance at %x>"...
0
6993
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
7162
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
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6881
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.