ObjectDataSource 从 GridView 更新/删除参数
<asp:ObjectDataSource ID="MMBRSODS" runat="server"
OldValuesParameterFormatString="original_{0}"
TypeName="Flow_WEB_Nemerle.SQLModule"
SelectMethod="GetMembers"
UpdateMethod="UpdateMember"
DeleteMethod="DeleteMember">
<UpdateParameters>
<asp:Parameter Name="UserName" Type="String" />
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Name="UserName" Type="String" />
</DeleteParameters>
</asp:ObjectDataSource>
Select 方法返回字符串数组。但是我需要如何显示所选节点以进行编辑删除方法获取此字符串(用户名)?
对于这样的方法:
[DataObjectMethod(DataObjectMethodType.Delete, true)]
static public DeleteMember(...
<asp:ObjectDataSource ID="MMBRSODS" runat="server"
OldValuesParameterFormatString="original_{0}"
TypeName="Flow_WEB_Nemerle.SQLModule"
SelectMethod="GetMembers"
UpdateMethod="UpdateMember"
DeleteMethod="DeleteMember">
<UpdateParameters>
<asp:Parameter Name="UserName" Type="String" />
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Name="UserName" Type="String" />
</DeleteParameters>
</asp:ObjectDataSource>
Select method returns array of strings . But How I need to appear selected node for edit delete methods get this string (userName) ?
for methods like :
[DataObjectMethod(DataObjectMethodType.Delete, true)]
static public DeleteMember(...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您要根据什么来绑定原始列表?假设您正在绑定一个列表;您始终可以执行以下操作来执行此类操作:
因此,提供默认值允许您仍然使用更新,参数依赖于此默认值并将其提供给后端...您使用什么控件来显示数据?
HTH。
What are you binding the original list against? Let's say you are binding a list; you can always do the following to do that type of operation:
So supplying the default value allows you to still use the update, the param relies on this default and supplies it to the backend... what control are you using to show the data?
HTH.