473,499 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session & Service keywords conflict....

I am a current ASP developer.

I have files: ServiceClass.asp & SessionClass.asp which are included in many
of my asp files. Then they call objService = New Service (by using the Class
Service from ServiceClass.asp file).

Is it true that ASP.NET does not allow you to use Service or Session words
as they are keywords in ASP.NET?
Mar 21 '06 #1
3 1168
No, it is not true. Neither is a VB.NET keyword. And there is no such thing
as an 'ASP.NET keyword' because you are always writing your code in some
language, so all the keywords are keywords of that language.

There is a Session property of the Page class. I don't know about Service,
I don't remember seeing one. In any case, you can still call classes
Session and Service, you may just end up doing a little more typing so the
compiler can differentiate them.

"Dhruba Bandopadhyay" <dh*****************@hotmail.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
I am a current ASP developer.

I have files: ServiceClass.asp & SessionClass.asp which are included in
many of my asp files. Then they call objService = New Service (by using
the Class Service from ServiceClass.asp file).

Is it true that ASP.NET does not allow you to use Service or Session words
as they are keywords in ASP.NET?

Mar 21 '06 #2

If there is a naming conflict, you have to use the fully qualified object
name sometimes.

Aka..if you code up a page.. and

you create a namespace/object called

MyApplication.EventArgs.MySomethingEventArgs (where MySomethingEventArgs is
the object name)(and MyApplication.EventArgs is the namespace)
and then you want to use the Microsoft .... System.EventArgs
System.EventArgs

You'll have to code your object as

MyApplication.EventArgs.MySomethingEventArgs abc = new
MyApplication.EventArgs.MySomethingEventArgs();

instead of the shorthand

MySomethingEventArgs abc = new MySomethingEventArgs();

....

this is why some people will just naturally avoid namespacing
conflicts...but its not Forbidden/unworkable.


"Marina Levit [MVP]" <so*****@nospam.com> wrote in message
news:%2*****************@TK2MSFTNGP12.phx.gbl...
No, it is not true. Neither is a VB.NET keyword. And there is no such thing as an 'ASP.NET keyword' because you are always writing your code in some
language, so all the keywords are keywords of that language.

There is a Session property of the Page class. I don't know about Service, I don't remember seeing one. In any case, you can still call classes
Session and Service, you may just end up doing a little more typing so the
compiler can differentiate them.

"Dhruba Bandopadhyay" <dh*****************@hotmail.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
I am a current ASP developer.

I have files: ServiceClass.asp & SessionClass.asp which are included in
many of my asp files. Then they call objService = New Service (by using
the Class Service from ServiceClass.asp file).

Is it true that ASP.NET does not allow you to use Service or Session words as they are keywords in ASP.NET?


Mar 21 '06 #3
Dhruba,

If you had used Service.asp or Session.asp you'd have a problem, but I
believe .NET will not give you any trouble with ServiceClass or SessionClass
those will be treated as a different object.

Regards,

--
S. Justin Gengo
Web Developer / Programmer

Free code library:
http://www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Dhruba Bandopadhyay" <dh*****************@hotmail.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
I am a current ASP developer.

I have files: ServiceClass.asp & SessionClass.asp which are included in
many of my asp files. Then they call objService = New Service (by using
the Class Service from ServiceClass.asp file).

Is it true that ASP.NET does not allow you to use Service or Session words
as they are keywords in ASP.NET?

Mar 21 '06 #4

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

Similar topics

4
2314
by: el_bandido | last post by:
Hello, I've tried the FAQ and some minutes in googl'ing but was not happy with what I got. Basically I'd like to get a _simple_ example on how I could create a web based (portable across all...
0
3539
by: Not Liking Dot Net Today | last post by:
During high usage periods I am getting Stack trace below: System.Web.HttpException: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State...
0
995
by: Not Liking Dot Net Today | last post by:
During high usage periods I am getting Stack trace below: System.Web.HttpException: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State...
5
2465
by: Raghu Raman | last post by:
HI, am using a simple project in asp.net using c#. if i put the break point in the application start & session start event , they are firing good .BUT WHEN i close my project while running on...
2
1817
by: dw | last post by:
Hi, everyone. I'm having difficulty understanding the difference of the keywords "friend" and "protected" vs. some of the other ways you can declare variables in ASP.NET ("dim", "public", and...
4
2289
by: clintonG | last post by:
Anybody know how to dynamically write the meta tags using code so they are formatted on a separate line in the HTML source? Preferred or optimal framework classes that may be used in this regard? ...
3
6496
by: =?Utf-8?B?bWdvcHBlcnQ=?= | last post by:
I'm having an issue with using web services in a web application marked with session cookieless attribuet set to "AutoDetect". My real life scenario is too complex to lay out but here's my...
11
3608
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each...
7
3375
by: Maximus Decimus | last post by:
HI all, I am using python v2.5 and I am an amateur working on python. I am extending python for my research work and would like some help and guidance w.r.t this matter from you experienced...
0
7132
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
7009
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
7178
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
7390
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
5475
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,...
1
4919
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...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
302
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.