ASP.Net前台调用后台变量的方法(2)


protected void ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
System.Web.UI.WebControls.ListItemType elemType = e.Item.ItemType;
if (elemType == System.Web.UI.WebControls.ListItemType.Pager)
{
TableCell pager = (TableCell) e.Item.Controls[0];
for (int i=0; i {
Object o = pager.Controls[i];
if (o is LinkButton)
{
LinkButton h = (LinkButton) o;
h.Text = " " + h.Text + " ";
}
else
{
Label l = (Label) o;
l.Text = String.Format("[第{0}页]", l.Text);
}
}
}
}


2. 引用:zhangzs8896(小二)

复制代码 代码如下:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjjjjz.html