What is the performance of INNER JOIN vs WHERE?

ASP.NET Webform: inline code (<%= %> ) vs Server Control Performance?

  • Let's forget about state management, maintenance perspective, etc ... and focus on render performance only Which of render method has better performance ? <%= ... %> or Server Control (orĀ  Html Server Control/ Custom Control/ UserControl) ? e.g 1: <a href='<%=ResolvedUrl("~/Page1.aspx")'>Page1</a> vs <asp:HyperLink ID="lnk1" runat="server" NavigateUrl="~/Page1.aspx" /> e.g 2: using <% %> with foreach to render a DataTable vs using DataGrid In my opinion, <% %> will win not only in these 2 examples but also in most cases. As in http://ASP.NET MVC, we use inline code in Views to render HTML. What's your opinion ?

  • Answer:

    I always recommend that people stop relying on http://ASP.NET Web Forms controls for simple non-form HTML elements like links, labels, text, etc. The performance is better and you'll have an easier time to convert to http://ASP.NET MVC in the future.

Karthik Hariharan at Quora Visit the source

Was this solution helpful to you?

Other answers

This is actually an apples-to-oranges comparison. Render-time-wise, Server Controls will always render slower than pure HTML with inline code, because of all the extra work involved in creating the Server Control, such as creating and maintaining the viewstate, executing the events chain, using filters etc. However, Server Controls has the advantage of functionality available in the server side, as opposed to pure HTML elements. In general, if you don't need the server side functionality of the Server Controls, don't use them. But if, however, you'll want to make your link visible or non-visible in your server side code, or would like the built-in sort functionality of the GridView - then use them.

Memi Lavi

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.