Home All Groups Group Topic Archive Search About

How to convert DetailsView ItemTemplate/Label to code?

Author
15 Oct 2007 5:18 PM
Pete
I need to convert DetailsView's ItemTemplate/Label lines from tagged
to VB code so I can loop over the 41 fields in the control.
In this example the middle 3 lines are the last ones I still need to
convert:

<asp:DetailsView ID="DetailsView1" runat="server"
    <Fields>
                <asp:TemplateField HeaderText="Field1ID"
InsertVisible="False">
                    <ItemTemplate>
                        <asp:Label ID="lblField1ID" Text='<%#
Eval("Field1ID") %>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
        </Fields>
</asp:DetailsView>

Help in the conversion of those 3 lines would sure be appreciated!

    -Pete

AddThis Social Bookmark Button