我有一个绑定到objectdatasource的gridview。它正在获取数据,数据在html标记中 - 我只是看不到它!
这是default.aspx:
<%@ Page Language =“C#”AutoEventWireup =“true”CodeBehind =“Default.aspx.cs”Inherits =“memorywell_2._Default”%>
Memorywell信息服务
<asp:ObjectDataSource ID="resumesource" runat="server" SelectMethod="FetchAllGigs" EnablePaging="false"
DataObjectTypeName="memorywell_2DataModel.Resume" TypeName="memorywell_2DataModel.Resume">
</asp:ObjectDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" DataSourceID="resumesource" AllowPaging="false" PageSize="10">
<EmptyDataTemplate>
No data for your query.</EmptyDataTemplate>
<Columns>
<asp:TemplateField>
<ItemTemplate>
Description: <%# Eval("Description") %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</form>
这是我浏览器中“查看页面源”的html:
Memorywell信息服务
<div>
<table cellspacing="0" rules="all" border="1" id="GridView1" style="border-collapse:collapse;">
<tr>
<th scope="col"> </th>
</tr><tr>
<td>
Description: (Contract) Maintain 4 websites including a national site that receives 80,000 hits per month. Develop new sites and custom modules in C# and MS SQL for DotNetNuke content management system. Developing new internationally targeted community site that includes custom C# modules for product reviews.
</td>
</tr>
</table>
</form>