如何用XML修改GridView中的数据
我想实现的功能是点击编辑 就会跳转到编辑页 从而修改 点击 添加 就跳转到添加页面 添加我做出来了 修改 请各位指教下 该如何 实现 呢 ????????????
这是我的主页面代码
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>XML 增、删、改和查</title>
<style type="text/css">
.style1
{
margin-left: 200px;
width: 600px;
border-style: solid;
border-width: 1px;
}
body
{
width:1000px;
background-color:#FOFOFO
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="style1" border="1">
<tr>
<td align="center" style="background-color: Gray;">
九朝装饰通讯录系统
</td>
</tr>
<tr>
<td>
<asp:GridView ID="GrTX" runat="server" BorderWidtBackColor="White"
CellPadding="4" ForeColor="#333333" GridLines="None"
onrowdeleted="GrTX_RowDeleted" DataKeyNames="id"
onrowediting="GrTX_RowEditing">
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:CommandField ShowDeleteButton="True" />
<asp:CommandField ShowSelectButton="True" SelectText="详细信息" />
</Columns>
<FooterStyle BackColor="#1C5E55" ForeColor="White" Font-Bold="True" />
<RowStyle BackColor="#E3EAEB" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#7C6F57" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnAdd" runat="server" Text="增 加" onclick="btnAdd_Click" />
</td>
</tr>
</table>
</div>
</form>
</body>
</htm