我的数据库中有一个帐户表(名字、姓氏、地址等),我需要在我的asp.net页面上显示它,但我还需要启用编辑。
我试过使用GridView,DetailsView等,但它们似乎都不能编辑?我确信我做错了什么。
我使用的是linqdatasource,它连接到我的存储库。
<asp:LinqDataSource ID="AccountDataSource" runat="server"
ContextTypeName="Model.Core.Domain.DBDataContext"
Select="new (Summary, Department, JobTitle)" TableName="Accounts"
Where="AccountId == @AccountId" EnableUpdate="True" >
<WhereParameters>
<asp:SessionParameter Name="AccountId" SessionField="accountId" Type="Int32" />
</WhereParameters>
任何想法。谢谢
发布于 2010-01-10 16:53:59
您必须显式启用数据源上的更新、插入和删除:
<asp:LinqDataSource ID="AccountDataSource" runat="server"
EnableUpdate="true"
EnableInsert="true"
EnableDelete="true"
...https://stackoverflow.com/questions/2035198
复制相似问题