c# - Gridview bind to label from database and extra text -


i binding label this:

<asp:label id="label3" runat="server" font-size="8pt" text='<%# bind("field")%>'></asp:label> 

but want add text next "field", label reads "field, more text" trying this, doesn't work.

<asp:label id="label3" runat="server" font-size="8pt" text='<%# bind("roleid") + "more text"%>'></asp:label> 

i have tried:

<asp:label id="label3" runat="server" font-size="8pt" text='<%# string.format(bind("roleid") + "more text"%>'></asp:label> 

try this...

text='<%# eval("roleid").tostring() + "more text"%>'> 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -