I want to understand where the Razor View Engine actually generates the HTML from the templates that we create in the view. For example see the following code snippet,
<ul id="products" >
<% foreach(var p in products) { %>
<li><%=p.Name%> ($<%=p.Price%>)</li>
<% } %>
</ul>
I wanted to understand if the processing to generate the resultant html will be done in the browser or the web server.
I want to understand where the Razor View Engine actually generates the HTML from the templates that we create in the view
It happens on the web server. Once the HTML is fully created on the web server, this HTML is sent to the client browser.
On the web server!
The browser (thus on client side) can only process Javascript. Razor is an engine such as aspx, Php and so on that helps in dynamically generate html from templated views.
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