Is there a performance difference between using HtmlHelper or Partial for a given task?
For example, I write HtmlHelper "control" to create a link in the editor with the following signature:
public static HtmlString RecordNameLink( this HtmlHelper htmlHelper, string linkText, string editActionName, object editRouteValues, string deleteActionName = null, object deleteRouteValues = null)
In this case, the edit button will always be displayed, and the delete button will only be displayed if it is enabled. Alternatively, I could do this:
@Html.Partial("Controls/RecordNameLink", Model)
(Or pass a partial model)
But is there a reason for choosing one over the other, in particular, is performance better than the other? (although I am open to learn more about the differences in general)
Thanks.
source share