前台: testGridView2.aspx
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
1
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="testGridView2.aspx.cs" Inherits="testGridView2" %>
2![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
5
<html xmlns="http://www.w3.org/1999/xhtml" >
6
<head runat="server">
7
<title>无标题页</title>
8
</head>
9
<body>
10
<form id="form1" runat="server">
11
<div>
12
知识点:<br />
13
1: 手工绑定GridView, 不用SqlDataSource<br />
14
2: 在前台显示HTML 代码(可以将数据绑定到 literal,然后设置 mode=code)<br />
15
3: 用DropDownList 作查询条件,在 GridView 上显示.<br />
16
4: 镶嵌GridView.<br />
17
<br />
18
<br />
19
下面做例子<br />
20
<br />
21
<asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="#CCCCCC"
22
BorderStyle="None" BorderWidth="1px" CellPadding="3" AllowSorting="True" AutoGenerateColumns="False" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" DataKeyNames="au_id">
23
<FooterStyle BackColor="White" ForeColor="#000066" />
24
<Columns>
25
<asp:TemplateField HeaderText="名字">
26
<EditItemTemplate>
27
<asp:TextBox ID="txtname" runat="server" Text='<%# Eval("au_fname") %>'></asp:TextBox>
28
</EditItemTemplate>
29
<ItemTemplate>
30
<asp:Label ID="lblfname" runat="server" Text='<%# Eval("au_fname") %>'></asp:Label>
31
</ItemTemplate>
32
</asp:TemplateField>
33
<asp:TemplateField HeaderText="城市">
34
<EditItemTemplate>
35
<asp:TextBox ID="txtcity" runat="server" Text='<%# Eval("city") %>'></asp:TextBox>
36
</EditItemTemplate>
37
<ItemTemplate>
38
<asp:Label ID="lblCity" runat="server" Text='<%# Eval("City") %>'></asp:Label>
39
</ItemTemplate>
40
</asp:TemplateField>
41
<asp:TemplateField HeaderText="电话">
42
<EditItemTemplate>
43
<asp:TextBox ID="txtphone" runat="server" Text='<%# Eval("phone") %>'></asp:TextBox>
44
</EditItemTemplate>
45
<ItemTemplate>
46
<asp:Label ID="lblphone" runat="server" Text='<%# Eval("phone") %>'></asp:Label>
47
</ItemTemplate>
48
</asp:TemplateField>
49
<asp:TemplateField HeaderText="显示HTML代码">
50
<ItemTemplate>
51
<asp:Literal ID="Literal1" runat="server" Mode="Encode" Text="<B><I>显示HTML</I></B>"></asp:Literal>
52
</ItemTemplate>
53
</asp:TemplateField>
54
</Columns>
55
<RowStyle ForeColor="#000066" />
56
<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
57
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
58
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
59
<PagerSettings Visible="False" />
60
</asp:GridView>
61
<asp:Panel ID="Panel1" runat="server" BackColor="#E0E0E0" Height="25px" Width="483px">
62
<asp:Button ID="btnfirst" runat="server" Text="首页" CommandArgument="first" OnClick="pagging_click" />
63
<asp:Button ID="btnUp" runat="server" Text="上一页" CommandArgument="up" OnClick="pagging_click" />
64
<asp:Button ID="btnNext" runat="server" Text="下一页" CommandArgument="next" OnClick="pagging_click" />
65
<asp:Button ID="btnEnd" runat="server" Text="页尾" CommandArgument="end" OnClick="pagging_click" /></asp:Panel>
66
<br />
67
<br />
68
=================<br />
69
下面这个是利用一个DropDownList当作查询条件,然后在GridView 中显示<br />
70
<br />
71
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
72
DataTextField="state" DataValueField="state">
73
</asp:DropDownList>
74
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:pubsConnectionString %>"
75
SelectCommand="SELECT DISTINCT [state] FROM [authors]"></asp:SqlDataSource>
76
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" CellPadding="4"
77
DataKeyNames="au_id" DataSourceID="SqlDataSource2" ForeColor="#333333" GridLines="None">
78
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
79
<Columns>
80
<asp:BoundField DataField="au_fname" HeaderText="au_fname" SortExpression="au_fname" />
81
<asp:BoundField DataField="au_id" HeaderText="au_id" ReadOnly="True" SortExpression="au_id" />
82
<asp:BoundField DataField="city" HeaderText="city" SortExpression="city" />
83
<asp:BoundField DataField="state" HeaderText="state" SortExpression="state" />
84
<asp:BoundField DataField="phone" HeaderText="phone" SortExpression="phone" />
85
</Columns>
86
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
87
<EditRowStyle BackColor="#999999" />
88
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
89
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
90
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
91
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
92
</asp:GridView>
93
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:pubsConnectionString %>"
94
SelectCommand="SELECT [au_fname], [au_id], [city], [state], [phone] FROM [authors] WHERE ([state] = @state)">
95
<SelectParameters>
96
<asp:ControlParameter ControlID="DropDownList1" Name="state" PropertyName="SelectedValue"
97
Type="String" />
98
</SelectParameters>
99
</asp:SqlDataSource>
100
<br />
101
=========================<br />
102
下面是一个镶嵌事例.<br />
103
<asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" BackColor="White"
104
BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="emp_id"
105
DataSourceID="SqlDataSource3" OnRowDataBound="GridView3_RowDataBound">
106
<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
107
<Columns>
108
<asp:BoundField DataField="emp_id" HeaderText="emp_id" ReadOnly="True" SortExpression="emp_id" />
109
<asp:BoundField DataField="lname" HeaderText="lname" SortExpression="lname" />
110
<asp:BoundField DataField="pub_id" HeaderText="pub_id" SortExpression="pub_id" />
111
<asp:TemplateField>
112
<HeaderTemplate>
113
书名
114
</HeaderTemplate>
115
<ItemTemplate>
116
<asp:BulletedList ID="BulletedList1" runat="server">
117
</asp:BulletedList>
118
</ItemTemplate>
119
</asp:TemplateField>
120
</Columns>
121
<RowStyle BackColor="White" ForeColor="#330099" />
122
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
123
<PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
124
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
125
</asp:GridView>
126
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:pubsConnectionString %>"
127
SelectCommand="SELECT [emp_id], [lname], [pub_id] FROM [employee]"></asp:SqlDataSource>
128
<br />
129
<br />
130
===========================<br />
131
一次更新多条记录<br />
132
<asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" CellPadding="4"
133
DataKeyNames="au_id" DataSourceID="SqlDataSource4" ForeColor="#333333" GridLines="None" AllowPaging="True">
134
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
135
<Columns>
136
<asp:BoundField DataField="au_id" HeaderText="au_id" ReadOnly="True" SortExpression="au_id" />
137
<asp:BoundField DataField="au_fname" HeaderText="au_fname" SortExpression="au_fname" />
138
<asp:TemplateField HeaderText="编辑该列" Visible="False">
139
<EditItemTemplate>
140
141
</EditItemTemplate>
142
<ItemTemplate>
143
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("au_fname") %>'></asp:TextBox>
144
</ItemTemplate>
145
<HeaderTemplate>
146
编辑该列
147
</HeaderTemplate>
148
</asp:TemplateField>
149
<asp:BoundField DataField="city" HeaderText="city" SortExpression="city" />
150
<asp:BoundField DataField="phone" HeaderText="phone" SortExpression="phone" />
151
<asp:BoundField DataField="state" HeaderText="state" SortExpression="state" />
152
</Columns>
153
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
154
<EditRowStyle BackColor="#999999" />
155
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
156
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
157
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
158
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
159
</asp:GridView>
160
161
<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:pubsConnectionString %>"
162
SelectCommand="SELECT [au_id], [au_fname], [city], [phone], [state] FROM [authors]">
163
</asp:SqlDataSource>
164
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="编辑全部" />
165
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="保存全部" /> <br />
166
<br />
167
<br />
168
<br />
169
<br />
170
</div>
171
</form>
172
</body>
173
</html>
174
后台: testGridView2.aspx.cs
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
1
using System;
2
using System.Data;
3
using System.Configuration;
4
using System.Collections;
5
using System.Web;
6
using System.Web.Security;
7
using System.Web.UI;
8
using System.Web.UI.WebControls;
9
using System.Web.UI.WebControls.WebParts;
10
using System.Web.UI.HtmlControls;
11
using System.Data.SqlClient;
12![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
13
public partial class testGridView2 : System.Web.UI.Page
14
{
15
protected void Page_Load(object sender, EventArgs e)
16
{
17
if (!IsPostBack)
18
{
19
bind();
20
}
21
}
22![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
23
#region
24
/// <summary>
25
/// 设置一个绑定类,手工绑定GridView,不用SqlDataSource.
26
/// </summary>
27
private void bind()
28
![](https://www.cnblogs.com/Images/dot.gif)
66
#endregion
67![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
68
![](https://www.cnblogs.com/Images/dot.gif)
81![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
82
![](https://www.cnblogs.com/Images/dot.gif)
106![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
107![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
108
#region
109
/// <summary>
110
/// 设置数据行的事件,比如:修改,删除,取消编辑![](https://www.cnblogs.com/Images/dot.gif)
111
/// </summary>
112
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
113
{//取消编辑 cancel 事件.
114
GridView1.EditIndex = -1;
115
bind();
116
}
117
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
118
{// 删除记录 Delete
119
string id = GridView1.DataKeys[e.RowIndex]["au_id"].ToString();
120
string que = "delete from authors where au_id='"+id+"'";
121
if(cmd(que)>0)
122
{
123
bind();
124
}
125![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
126
}
127
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
128
{//进入编辑模式 Edit
129
GridView1.EditIndex = e.NewEditIndex;
130
bind();
131
}
132
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
133
{//编辑动作 Update , 先取得当前ID, 注意这里的写法(如何取得当前前的字段值):
134
string id = GridView1.DataKeys[e.RowIndex]["au_id"].ToString();
135
//注意下面这里,这些必须做在一个模板列里面,要不然是找不到这个"控件"的
136
//显示的列写在 ItemTemple..里面,编辑的列写在 EditTemp
里面
137
string fname = ((TextBox)GridView1.Rows[e.RowIndex].Cells[1].FindControl("txtname")).Text;
138
string city = ((TextBox)GridView1.Rows[e.RowIndex].Cells[2].FindControl("txtcity")).Text;
139
string phone = ((TextBox)GridView1.Rows[e.RowIndex].Cells[3].FindControl("txtphone")).Text;
140![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
141
string que = "update authors set au_fname='"+fname+"',city='"+city+"',phone='"+phone+"' where au_id='"+id+"'";
142
if(cmd(que)>0)
143
{// 如果 > 0 ,则编辑成功,退出编辑模式.
144
GridView1.EditIndex = -1;
145
bind();
146
}
147![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
148![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
149
//string id = GridView1.DataKeys[e.RowIndex]["au_id"].ToString();
150
//string fname = ((TextBox)GridView1.Rows[e.RowIndex].Cells[1].FindControl("TextBox1")).Text;
151
////注意上面,我之所以找到了文本框的名字,那是因为我把所有的列都转换成了模板列,不怕你笑,我整了至少一个小时才整出来
152
////但是编辑他的数据根本没有这么麻烦,我们即将学到的DetailsView和FromView可以轻松完成这个任务.
153
////这里我硬着头皮做出来只是因为给有些喜欢玩稀奇的朋友提个思路。
154
//string city = ((TextBox)GridView1.Rows[e.RowIndex].Cells[2].FindControl("TextBox2")).Text;
155
//string phone = ((TextBox)GridView1.Rows[e.RowIndex].Cells[3].FindControl("TextBox3")).Text;
156
//string query = "update authors set au_fname='" + fname + "',city='" + city + "',phone='" + phone + "' where au_id='" + id + "'";
157
//if (cmd(query) > 0)
158
//{
159
// GridView1.EditIndex = -1;
160
// bind();
161
//}
162![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
163![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
164
}
165
#endregion
166![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
167
private SqlDataReader read(string id)
168
{
169
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["pubsConnectionString"].ConnectionString);
170
con.Open();
171
SqlCommand cmd = new SqlCommand("select title from titles where pub_id='" + id + "'", con);
172
//注意下面这句!!
173
return cmd.ExecuteReader(CommandBehavior.CloseConnection);
174
}
175![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
176![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
177
protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e)
178
{
179
foreach (GridViewRow gvr in GridView3.Rows)
180
{//跌代GridView1的所有行
181
string id = gvr.Cells[2].Text;
182
//查找到当前行的第三列的文本,把他作为我们的ID,换句话说是作为我们的查询条件
183
BulletedList bl = (BulletedList)gvr.Cells[3].FindControl("BulletedList1");
184
//找到我们安排到第4列的卧底,一个被镶套在里面的BulletedList
185
bl.DataSource = read(id);
186
//将他的数据源指定为我们上面定制的方法,当然,还是得把ID传给他
187
bl.DataTextField = "title";
188
//指定要显示的文本字段
189
bl.DataBind();
190
//我不想说了,这个要是你不知道的话,去死吧你!
191
}
192
}
193
protected void Button1_Click(object sender, EventArgs e)
194
{//编辑全部
195
GridView4.Columns[1].Visible = false;//隐藏显示列
196
GridView4.Columns[2].Visible = true; //显示编辑列
197
}
198
protected void Button2_Click(object sender, EventArgs e)
199
{
200
for (int i = 0; i < GridView4.Rows.Count; i++)
201
{//循环所有的数据行
202
string id = (GridView4.Rows[i].Cells[0].Text).ToString();
203
string fname = ((TextBox)GridView4.Rows[i].Cells[2].FindControl("TextBox1")).Text;
204
//得到当前行的ID和Job_desc列的值
205
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["pubsConnectionString"].ConnectionString);
206
con.Open();
207
SqlCommand cmd = new SqlCommand("update authors set au_fname='" + fname + "' where au_id='" + id + "'", con);
208
cmd.ExecuteNonQuery();
209
//执行更新
210![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
211
//更新全部。隐藏第3列,显示第2列
212
GridView4.Columns[2].Visible = false;
213
GridView4.Columns[1].Visible = true;
214
}
215
}
216
}
217
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
1
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
2
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
3
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
4
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
5
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
6
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
7
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
8
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
9
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
10
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
11
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
12
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
13
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
14
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
15
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
16
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
17
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
18
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
19
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
20
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
21
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
22
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
23
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
24
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
25
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
26
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
27
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
28
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
29
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
30
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
31
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
32
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
33
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
34
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
35
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
36
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
37
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
38
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
39
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
40
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
41
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
42
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
43
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
44
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
45
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
46
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
47
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
48
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
49
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
50
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
51
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
52
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
53
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
54
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
55
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
56
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
57
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
58
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
59
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
60
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
61
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
62
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
63
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
64
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
65
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
66
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
67
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
68
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
69
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
70
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
71
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
72
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
73
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
74
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
75
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
76
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
77
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
78
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
79
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
80
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
81
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
82
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
83
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
84
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
85
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
86
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
87
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
88
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
89
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
90
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
91
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
92
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
93
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
94
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
95
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
96
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
97
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
98
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
99
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
100
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
101
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
102
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
103
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
104
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
105
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
106
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
107
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
108
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
109
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
110
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
111
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
112
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
113
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
114
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
115
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
116
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
117
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
118
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
119
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
120
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
121
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
122
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
123
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
124
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
125
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
126
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
127
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
128
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
129
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
130
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
131
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
132
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
133
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
134
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
135
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
136
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
137
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
138
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
139
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
140
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
141
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
142
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
143
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
144
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
145
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
146
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
147
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
148
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
149
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
150
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
151
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
152
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
153
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
154
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
155
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
156
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
157
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
158
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
159
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
160
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
161
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
162
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
163
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
164
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
165
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
166
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
167
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
168
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
169
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
170
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
171
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
172
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
173
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
174
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
后台: testGridView2.aspx.cs
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
1
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
2
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
3
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
4
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
5
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
6
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
7
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
8
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
9
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
10
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
11
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
12
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
13
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
14
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
15
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
16
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
17
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
18
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
19
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
20
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
21
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
22
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
23
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
24
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
25
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
26
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
27
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
28
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![](https://www.cnblogs.com/Images/dot.gif)
66
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
67
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
68
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![](https://www.cnblogs.com/Images/dot.gif)
81
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
82
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
![](https://www.cnblogs.com/Images/dot.gif)
106
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
107
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
108
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
109
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
110
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/dot.gif)
111
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
112
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
113
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
114
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
115
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
116
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
117
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
118
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
119
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
120
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
121
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
122
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
123
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
124
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
125
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
126
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
127
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
128
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
129
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
130
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
131
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
132
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
133
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
134
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
135
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
136
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/dot.gif)
137
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
138
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
139
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
140
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
141
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
142
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
143
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
144
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
145
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
146
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
147
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
148
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
149
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
150
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
151
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
152
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
153
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
154
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
155
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
156
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
157
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
158
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
159
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
160
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
161
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
162
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
163
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
164
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
165
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
166
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
167
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
168
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
169
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
170
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
171
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
172
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
173
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
174
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
175
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
176
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
177
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
178
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
179
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
180
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
181
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
182
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
183
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
184
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
185
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
186
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
187
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
188
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
189
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
190
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
191
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
192
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
193
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
194
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
195
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
196
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
197
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
198
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
199
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
200
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
201
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
202
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
203
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
204
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
205
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
206
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
207
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
208
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
209
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
210
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
211
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
212
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
213
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
214
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
215
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
216
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
217