3
<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(...

1 Answer 1

2

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:

MMBRSODS.UpdateParameters["UserName"].DefaultValue = list.SelectedValue;
MMBRSODS.Update();

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.

Sign up to request clarification or add additional context in comments.

1 Comment

OK, so for gridview, tap into updating event, cancel it (because you are handling the update manually), pass in the user name to the default value, and invoke update. Do something similar with delete.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.