How to access referenced table from ASPX in-line code (datagridview control)

Posted by Grant on Stack Overflow See other posts from Stack Overflow or by Grant
Published on 2010-04-25T01:57:05Z Indexed on 2010/04/25 2:03 UTC
Read the original article Hit count: 199

Filed under:
|
|
|

Hi, i am trying to bind data to a datagridview control on an ASPX webpage and am using something like this..

<asp:TemplateField HeaderText="MyField">
    <ItemTemplate>
        <%# DataBinder.Eval(Container.DataItem, "MyField") %>
    </ItemTemplate>
</asp:TemplateField>

the problem i am having is that the data for the 'MyField' field is actually an integer that is a reference to a string value in another sql table.

Does anyone know how i can reformat my code line above to show the string value instead of the int value?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about inline-code