protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
for (int i = 0; i < GridView1.Rows.Count; i++)
{
GridView1.DataSourceID = "SqlDataSource1";
GridView1.DataBind();
if (GridView1.Rows[i].Cells[1].Text == "0")
{
GridView1.Rows[i].Cells[1].Text = "限制IP";
}
else if (GridView1.Rows[i].Cells[1].Text == "1")
{ GridView1.Rows[i].Cells[1].Text = "限制ID";
}
else
{ GridView1.Rows[i].Cells[1].Text = "限制时间"; } }
} }
看怎么修改了 要是加个符号啥的 你查询时 直接SELECT FIELDS &“VVV” AS XXX这样就哦了啊