实际上,我想使用gridview进行输出,但是遇到问题,这是我使用的示例代码。
<Columns>
<asp:TemplateField HeaderText="File Name">
<ItemTemplate>
<asp:Label ID="File" runat="server" Text='<%# Bind("File_Name") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Part Number">
<ItemTemplate>
<asp:Label ID="PN" runat="server" Text='<%# Bind("PN") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Serial Number">
<ItemTemplate>
<asp:Label ID="SN" runat="server" Text='<%# Bind("SN") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Upload Date">
<ItemTemplate>
<asp:Label ID="Email" runat="server" Text='<%# Bind("Upload_Date") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ship Date">
<ItemTemplate>
<asp:Label ID="Password" runat="server" Text='<%# Bind("Ship_Date") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Upload by">
<ItemTemplate>
<asp:Label ID="Password" runat="server" Text='<%# Bind("LoginID") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Action">
<ItemTemplate>
<asp:Linkbutton ID="btn_edit" runat="server" CssClass="btn btn-md btn-success" data-toggle="modal" data-target="#deleteComfirmation">Edit</asp:Linkbutton>
<asp:Linkbutton ID="btn_delete" runat="server" CssClass="btn btn-md btn-primary" data-toggle="modal" data-target="#deleteComfirmation">Delete</asp:Linkbutton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
预先感谢您的帮助。