为DetailsView自动生成绑定列/字段

时间:2022-03-16 16:15:46

In Visual Studio I have set up a DetailsView and an ObjectDataSource which connects with my BLL.

在Visual Studio中,我已经设置了一个DetailsView和一个与我的BLL连接的ObjectDataSource。

<asp:DetailsView runat="server" ID="UserProfileview" DataSourceID="UserData" AutoGenerateRows="False">

<asp:ObjectDataSource ID="UserData" runat="server" TypeName="UoM.Business.Core.UserAccount" SelectMethod="Read">
<SelectParameters>
    <asp:QueryStringParameter QueryStringField="id" Direction="input" Type="Int32" Name="Id" DefaultValue="" />
</SelectParameters>

I am not sure how so Visual Studio can automatically show me all the columns/fields so I can start modifying it instead of typing in each column manually.

我不确定Visual Studio如何自动向我显示所有列/字段,因此我可以开始修改它而不是手动键入每列。

Any ideas?

1 个解决方案

#1


1  

If you set AutoGenerateRows="False" then the tags for your bound columns have to be added manually.

如果设置AutoGenerateRows =“False”,则必须手动添加绑定列的标记。

#1


1  

If you set AutoGenerateRows="False" then the tags for your bound columns have to be added manually.

如果设置AutoGenerateRows =“False”,则必须手动添加绑定列的标记。