J
John Morgan via .NET 247
From: John Morgan
Hi
I have a table which is used to populate a menu with a certain order.
What is the best way in c#.net to swap two table entries.
Lets say its a very simple table
Id, MenuItem, MenuOrder
-----------------------
1 Help 0
2 Contact 1
This would display help then contact.
I want a function to swap the menu order numbers so that the result of the change would be
Id, MenuItem, MenuOrder
-----------------------
1 Help 1
2 Contact 0
The reason being I am building an admin screen for the site admins to alter the menu orders etc.
Ive done this before in asp using re.MoveNext, re.MovePrevious (you could pass in an id and get the id and contents of the next or previous rows).
What is the .net equivant of this?
Up to now I have the data retrieved to a dataset and wish to perform the operations using this
Also I know the current rows id and order number. So basically I want to find the same details in the row just before or after this
Hi
I have a table which is used to populate a menu with a certain order.
What is the best way in c#.net to swap two table entries.
Lets say its a very simple table
Id, MenuItem, MenuOrder
-----------------------
1 Help 0
2 Contact 1
This would display help then contact.
I want a function to swap the menu order numbers so that the result of the change would be
Id, MenuItem, MenuOrder
-----------------------
1 Help 1
2 Contact 0
The reason being I am building an admin screen for the site admins to alter the menu orders etc.
Ive done this before in asp using re.MoveNext, re.MovePrevious (you could pass in an id and get the id and contents of the next or previous rows).
What is the .net equivant of this?
Up to now I have the data retrieved to a dataset and wish to perform the operations using this
Also I know the current rows id and order number. So basically I want to find the same details in the row just before or after this