ASP.NET2.0分页问题! 请问如何在DataGrid分页的数字前面加上一个"Page:"; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <asp:DataGrid ID="DataGrid1" runat="server" AllowPaging="True" OnItemCreated="DataGrid1_ItemCreated">++++=====================================================+++++protected void DataGrid1_ItemCreated(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType == ListItemType.Pager) { foreach (Control lbtn in e.Item.Cells[0].Controls) { if (lbtn is Label) ((Label)lbtn).Text = "Page" + ((Label)lbtn).Text; else if (lbtn is LinkButton) ((LinkButton)lbtn).Text = "Page" + ((LinkButton)lbtn).Text; } } } 谢谢!!!能不能弄成:Page:1 2 3 4 5这样?? 可以~~protected void DataGrid1_ItemCreated(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType == ListItemType.Pager) { Label lb = new Labe(); lb.Text = "Page:"; e.Item.Cells[0].Controls.AddAt(0,lb); } } asp.net 网站的加密 [JS Cookie相关]希望高手能指点下错误,或给点思路吧。谢谢各位,顶有分 有关 站点地图与iframe 的问题 +++++++++100分 进来看题目 根据今天的日期,怎样得出这周的日期 大家看看这里有什么错 Access里插入时间字段的SQL怎么写? 高手帮看一下这个问题. javascript如何获取从文件浏览框(<INPUT type="file")选到的文件大小? c#里面的delegate(委托)怎样理解??? RegularExpressionValidator控件的问题! 麻烦前辈帮我解释一下这个正则表达式的意思
{
if (e.Item.ItemType == ListItemType.Pager)
{
foreach (Control lbtn in e.Item.Cells[0].Controls)
{
if (lbtn is Label)
((Label)lbtn).Text = "Page" + ((Label)lbtn).Text;
else if (lbtn is LinkButton)
((LinkButton)lbtn).Text = "Page" + ((LinkButton)lbtn).Text;
}
} }
能不能弄成:
Page:1 2 3 4 5
这样??
{
if (e.Item.ItemType == ListItemType.Pager)
{
Label lb = new Labe();
lb.Text = "Page:";
e.Item.Cells[0].Controls.AddAt(0,lb);
}
}