Which is better Span that runat server or default asp lable ?

Posted by Space Cracker on Stack Overflow See other posts from Stack Overflow or by Space Cracker
Published on 2010-12-26T05:43:05Z Indexed on 2010/12/26 5:54 UTC
Read the original article Hit count: 195

Filed under:
|
|
|

I have a simple asp.net web page that contain a table with about 5 TR and each row have 2 TD .. in the page load I get user data ( 5 property ) and view them in this page the following are first 2 rows :

 <table>
    <tr>
        <td>
            FullName
        </td>
        <td>
            <span id="fullNameSpan" runat="server"></span>
        </td>
   </tr>
   <tr>
        <td>
            Username
        </td>
        <td>
            <span id="userNameSpan" runat="server"></span>
        </td>
   </tr>
</table>

I always used <asp:Label to set value by code but i always notice that label converted in runtime to span so i decided to user span by making him runat=server to be accessed by code, so
Which is better to use asp:label or span with runat=server ??

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about Performance