J
J055
Hi
I have a method with the following signature:
public bool UpdateSetAccounts(int[] items) { }
How do I pass a collection of selected values in a ListBox to this
ObjectDataSource UpdateMethod?
I can pass the ListItemCollection in a ControlParameter, e.g.
<UpdateParameters>
<asp:ControlParameter ControlID="lbxAssignees" Type="object"
PropertyName="Items" Name="items" />
</UpdateParameters>
Not sure how to deal with it in the Updating event, e.g.
protected void odsSetAccounts_Updating(object sender,
ObjectDataSourceMethodEventArgs e)
{
ListItemCollection items = (ListItemCollection)e.InputParameters[0];
// what happens next?
}
I must be missing something obvious in the documentation. Handling multiple
selected values in ListBoxes, CheckboxLists, etc must be fairly standard. Is
there a recommended way of using these with ObjectDataSource controls?
Thanks
Andrew
I have a method with the following signature:
public bool UpdateSetAccounts(int[] items) { }
How do I pass a collection of selected values in a ListBox to this
ObjectDataSource UpdateMethod?
I can pass the ListItemCollection in a ControlParameter, e.g.
<UpdateParameters>
<asp:ControlParameter ControlID="lbxAssignees" Type="object"
PropertyName="Items" Name="items" />
</UpdateParameters>
Not sure how to deal with it in the Updating event, e.g.
protected void odsSetAccounts_Updating(object sender,
ObjectDataSourceMethodEventArgs e)
{
ListItemCollection items = (ListItemCollection)e.InputParameters[0];
// what happens next?
}
I must be missing something obvious in the documentation. Handling multiple
selected values in ListBoxes, CheckboxLists, etc must be fairly standard. Is
there a recommended way of using these with ObjectDataSource controls?
Thanks
Andrew