to paint labels on an asp .net webpage, is it better to use inline code like:
<div><%$ Resources:TextResource, Name %></div>
or set it as a label property like:
<div><asp:Label ID="GuardarButton" runat="server" Text="<%$ Resources:TextResource, Name %>" /></div>
I’m asking because label will use viewstate and won’t have to read .resx file on every postback
6 of one half dozen of the other. One requires viewstate, which requires processing/deserialization. the other involves reading a cached resource.
If you are looking to eliminate viewstate/trim it down, use the resource file otherwise viewstate (assuming many controls on the page).
Otherwise, it doesn’t much matter.