我想通過選擇gridview的行來更新和刪除記錄。此代碼用於添加員工詳細信息。如何從asp.net中的xml文件中使用gridview刪除和更新記錄
protected void Button_Add_Employee_Click(object sender, EventArgs e)
{
XmlDocument xmlEmloyeeDoc = new XmlDocument();
xmlEmloyeeDoc.Load(Server.MapPath("~/Employees.xml"));
XmlElement ParentElement = xmlEmloyeeDoc.CreateElement("Employee");
XmlElement ID = xmlEmloyeeDoc.CreateElement("ID");
ID.InnerText = TextBox_Id.Text;
XmlElement Name = xmlEmloyeeDoc.CreateElement("Name");
Name.InnerText = TextBox_Name.Text;
XmlElement Designation = xmlEmloyeeDoc.CreateElement("Designation");
Designation.InnerText = TextBox_Desig.Text;
ParentElement.AppendChild(ID);
ParentElement.AppendChild(Name);
ParentElement.AppendChild(Designation);
xmlEmloyeeDoc.DocumentElement.AppendChild(ParentElement);
xmlEmloyeeDoc.Save(Server.MapPath("~/Employees.xml"));
BindGrid();
}``