One of the things I've noticed, but have never formally asked until now: What is the difference between the classes in the System.Net namespace and the System.Web namespace? Why do they both exist? They seem to have different implementations of the same classes/concepts (Cookie, Mail, HttpWebRequest, for example). Are they designed to be used for slightly different purposes? Or is one a legacy namespace?
Defines the methods, properties, and events that are common to all application objects in an ASP.NET application. This class is the base class for applications that are defined by the user in the Global.
System. Web namespace is an important base for Web Form user interface and web services. Use of Built-in Objects like Request and Response are very common and widely used. We directly write them without creating objects as they are built-in objects.
UI Namespace. Provides classes and interfaces that enable you to create ASP.NET server controls and ASP.NET Web pages for the user interface of your ASP.NET Web applications.
It follows the natural segregation between client and server apps. System.Web is (almost) exclusively used by .NET apps that implement a server. Like an ASP.NET app. It is notable for being missing in the Client framework profile. System.Net contains classes useful to a client app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With