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