DeleteMethod怎么传递参数到方法中?

boyzzy1995 2016-10-19 02:16:05
<asp:ObjectDataSource ID="odsUsers" runat="server" SelectMethod="GetAllNormalUsers"
TypeName="MyBookShop.BLL.UserManager" DeleteMethod="DeleteUserById" UpdateMethod="ModifyBasicInfo" OldValuesParameterFormatString="id"
>
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
</asp:ObjectDataSource>
我想传一个id当参数 请问怎么在 <DeleteParameters>中设置?
...全文
1769 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
boyzzy1995 2016-10-19
  • 打赏
  • 举报
回复
<asp:GridView ID="gvMain" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="Black" GridLines="Vertical" DataSourceID="odsUsers" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" Width="754px" AllowPaging="True" PageSize="8" OnRowDataBound="gvMain_RowDataBound" OnRowCommand="gvMain_RowCommand" EnableModelValidation="True" OnRowDeleting="gvMain_RowDeleting" OnSelectedIndexChanged="gvMain_SelectedIndexChanged" OnRowUpdating="gvMain_RowUpdating"> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" /> <asp:BoundField DataField="LoginId" HeaderText="LoginId" SortExpression="LoginId" /> <asp:BoundField DataField="LoginPwd" HeaderText="LoginPwd" SortExpression="LoginPwd" /> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> <asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" /> <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" /> <asp:BoundField DataField="Mail" HeaderText="Mail" SortExpression="Mail" /> </Columns> <FooterStyle BackColor="#CCCC99" /> <RowStyle BackColor="#F7F7DE" /> <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" /> <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" /> <AlternatingRowStyle BackColor="White" /> </asp:GridView>

17,740

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧