私はすべてのゲームが単語と写真の中に持っているゲームのリストのためにこのxmlを持っています
<root>
  <game GameID="122" GameName="fer" IdCARDS="5">
    <CARD id="1" pic="~/pic/119.jpg" word="11" />
    <CARD id="3" pic="~/pic/121.jpg" word="22" />
    <CARD id="4" pic="~/pic/122.jpg" word="33" />
  </game>
</root>
カードの順序を変更して削除することができます。
 protected void DownButton_Click(object sender, ImageClickEventArgs e)
       {
          XmlDocument Document = XmlDataSource1.GetXmlDocument();
          string theGAMEId = Label2.Text;
          string cardID = (string)Session["ID2"];
          string cardIDAbove = Convert.ToString(Convert.ToInt16(cardID) + 1);
          string ThePicSource = Convert.ToString(Document.SelectSingleNode("//game[@GameID='" + theGAMEId + "']/CARD[@id='" + cardID + "']/@pic").InnerXml);
          string TheWordSource = Convert.ToString(Document.SelectSingleNode("//game[@GameID='" + theGAMEId + "']/CARD[@id='" + cardID + "']/@word").InnerXml);
          string ThePicAbove = Convert.ToString(Document.SelectSingleNode("//game[@GameID='" + theGAMEId + "']/CARD[@id='" + cardIDAbove + "']/@pic").InnerXml);
           string TheWordAbove = Convert.ToString(Document.SelectSingleNode("//game[@GameID='" + theGAMEId + "']/CARD[@id='" + cardIDAbove + "']/@word").InnerXml);
           Document.SelectSingleNode("//game[@GameID='" + theGAMEId + "']/CARD[@id='" + cardID + "']/@pic").InnerXml = ThePicAbove;
           Document.SelectSingleNode("//game[@GameID='" + theGAMEId + "']/CARD[@id='" + cardID + "']/@word").InnerXml = TheWordAbove;
           Document.SelectSingleNode("//game[@GameID='" + theGAMEId + "']/CARD[@id='" + cardIDAbove + "']/@pic").InnerXml = ThePicSource;
           Document.SelectSingleNode("//game[@GameID='" + theGAMEId + "']/CARD[@id='" + cardIDAbove + "']/@word").InnerXml = TheWordSource;
                    XmlDataSource1.Save();
                    GridView1.EditIndex = -1;
                    GridView1.DataBind();
                    Session["ID2"] = cardIDAbove;
                }
            }
あなたが削除した後に位置を変更したいときに問題が発生します(その後、IDがフォローされていません)
XMLで次のノードと前のノードを選択するにはどうすればよいですか?