Buttons within DataView Control

T

TheDude5B

Hi,

I have a dataview control which lists items which have been allocated
to a certain web page. These Items can have a viewing Order, so if it
is set to 1 then it will be first in the list.

I have two buttons within the DataView control which Moves the item up
or Down the list depending on which is clicked.

I am using an ObjectDataSource to control the DataView so I was
thinking that I could use an UpdateCommand for this job, but the
problem I have is that how does my update control know weather to move
the item up or down the order list ?

So if I have the two buttons both set to CommandName="Update", then my
UpdateMethod="ChangeOrder", how can I pass in an argument which is
either "Up" or Down" dependning on which button is clicked?

I thought about the CommandArgument="Up" or CommandArgument="Down",
but I am not sure how to access this in the UpdateMethod="ChangeOrder"

can you help?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top