Until recently I thought that ASP.Net views are files (like .aspx or .cshtml) that can contain some .Net code inside themselves and are parsed with a view engine (like razor or aspx) into html files that are sent to a client's browser. Later I discovered that these views are actually converted into classes that derive from System.Web.Mvc.WebViewPage
class. Apart from this I noticed some people referred to views as classes themselves. So my questions are
- If views are parsed into a class, how does this class then render an html document?
- Is it fair to say that views in ASP.NET are classes themselves or they are more like some kind of scripts on which bases a view engine forms an actual class?