The problem is you are looking for c#, when you need to be looking up asp.net.

You need to learn about asp.net's intrinsic objects - http://msdn.microsoft.com/library/de...sicobjects.asp

And generally you do not need to exit an asp.net web application in that manner.