home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

microsoft.net framework / classes

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2860
Discussions: 200,968, Posts: 2,379,683, Members: 246,333
Old May 1st, 2005, 02:17 AM   Digg it!   #1 (permalink)
Member
 
Join Date: Oct 2003
Posts: 263
microsoft.net framework / classes

Hi guys,

I am a network eng. and not to much of a programmer but I can code little things. I have a question with the .net framework. I know with C# and VB.net you can see the classes like for instance the websession or registry changes. I am not sure how to call the classes though. A method or constructor is a little past my knowledge. If someone could explain how would I call a class in the .net framework it would really help me out. For instance if i wanted to call system.web.sessionstate to create a web session, how would i do that? I see under Methods there is an add....

In my code if I just type system.web.sessionstate.add ("test","true") it will give me an compiling error.

Any help to get me started would be great.

Thank you
amtrac24 is offline   Reply With Quote
Old May 1st, 2005, 02:40 AM     #2 (permalink)
Perfetc Member
 
VHockey86's Avatar
 
Join Date: Jan 2003
Location: Maryland Suburbia
Posts: 4,334
Well... im not sure on .net specfically, but generally you create an object which is an instance of a class.... and when you create that object depending on your parameters it calls are certain constructor (just a special method inside the class, generally designated by the absense of a return type and the same name as the class).
VHockey86 is offline   Reply With Quote
Old May 5th, 2005, 10:01 PM     #3 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,552
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
First off SessionState is a namespace, not a class. You can't make a "SessionState" variable. That being said sessionState includes an HttpSessionState class which I am guessing is what you want to use.

In C# call the constructor as such:
HttpSessionState mySession = new HttpSessionState();

If you don't understand classes/constructors you are going to have trouble using them. Simple as that man.
jkrohn is offline   Reply With Quote
Old May 7th, 2005, 11:10 PM     #4 (permalink)
Unregistered
 
Join Date: Apr 2003
Posts: 423
AgentCrypto is offline   Reply With Quote
Old May 10th, 2005, 11:49 PM     #5 (permalink)
Member
 
Join Date: Feb 2004
Posts: 59
Quote:
Originally Posted by jkrohn
First off SessionState is a namespace, not a class. You can't make a "SessionState" variable. That being said sessionState includes an HttpSessionState class which I am guessing is what you want to use.

In C# call the constructor as such:
HttpSessionState mySession = new HttpSessionState();

If you don't understand classes/constructors you are going to have trouble using them. Simple as that man.

Just to add to it, anytime you want to use it afterwards, you'd refer to it as mySession.web.sessionstate.add ("test","true")
crobat is offline   Reply With Quote
Old May 14th, 2005, 02:51 AM     #6 (permalink)
Member
 
Join Date: Oct 2003
Posts: 263
I know I am not a programmer so I am still learning about classes. If you can, could you show me an example of lets say writing a registry node using the Microsoft.Win32.RegistryKey in .NET. If you could please show me everythign I would have to do in order to create the registry key. I think once I can see all the code and steps it should make more sense. I appreciate any help.
amtrac24 is offline   Reply With Quote
Old May 17th, 2005, 01:30 AM     #7 (permalink)
Member
 
Join Date: Feb 2004
Posts: 59
I'm sorry, but I don't know much about system programming. I'm more application development, and I don't know that much about C# or VB.
crobat is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft linked to Ourcolony.net yohon125 IMO Community 5 April 8th, 2005 07:26 PM
Microsoft to disable WPA over the Net! mpc General Tech Discussion 8 February 25th, 2005 03:03 PM
.net framework problem oolunchbox Applications and Operating Systems 0 September 24th, 2004 02:34 PM
.NET Framework 1.1 Service Pack 1 / iTunes halo18 Applications and Operating Systems 1 September 3rd, 2004 09:50 PM
microsoft .net environment error hokie64 Applications and Operating Systems 0 July 14th, 2004 01:37 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3028)
Forty-six years ago today (12)
The disrespect of Obama by Russian .. (46)
Laptop with wireless problem. (12)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Internet Lost (5)
windows vista security holes (16)
windows 7 problem (7)
Is the PSU I received dead? (13)
Point and Shoot Camera Suggestions. (6)
radeon x850xt platinum & shader.. (6)
HIS HD5770 graphic card question (15)
Recent Discussions
Skillsoft Network+ Study Software Que.. (10)
Browsers wont load websites (3)
Nvidia GTX 260 problem (2)
windows vista security holes (16)
Delete an OS (8)
help me pls laptop just stopped worki.. (0)
Open With ..... Win7 (3)
Help getting around port 80 for camer.. (4)
Laptop with wireless problem. (12)
Internet Lost (5)
virus blocking exe. files (1)
Point and Shoot Camera Suggestions. (6)
CPU fan stops spinning randomly (11)
Modern Warfare 2: Who Bought It? (65)
Is the PSU I received dead? (13)
Print spooler problem (16)
Kingston Bluetooth Dongle Driver (1)
Multiple Restarts Required at Boot (3)
webcam (0)
upgrade for hp a6101 (0)
tv not turn on-makes clicking sound (2)
EVGA 9800 gtx help with finding a goo.. (11)
Regular Build (11)
Help with onclick and buttons (0)
Virus advise (8)


All times are GMT -4. The time now is 04:43 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28