0
我有一个绑定到objectdatasource的gridview。它正在获取数据,数据在html标记中 - 我只是看不到它!Gridview Table不可见,html不会渲染
这里是Default.aspx的:
<%@页面语言= “C#” AutoEventWireup = “真” 的CodeBehind = “Default.aspx.cs” 继承= “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>
谢谢。你是对的。我刚刚删除了原始表单并重新创建了它,并且它工作正常。这是一些Visual Studio 2008的错误。感谢您的期待。 – nerdperson 2011-04-22 04:10:22