GridView1中的ItemTemplate里有个Label6,如何得到这个控件的text值
解决方案 »
- 请教一个关于jQuery解析json的问题
- 网站后台管理的小问题
- 如何用JS获得CheckBox的ToolTip
- 请教有长期开发经验的高手,,一个新闻系统数据显示设计问题!!!!!!菜鸟谢绝入内~~~
- IIS 下的奇怪问题,被困了好几天了,寻求帮忙,错误提示如下,谢谢...
- 请教个位大侠!~~~~~~~~对XML的处理
- 关于二维码扫描的网址访问问题....
- 刚开始学net ,请大家多帮帮忙
- treeview的问题?为什么每当我点击一个子节点后,就回复到一级目录的状态,而不能将点击的那个节点锁定住,要怎么才能实现这个功能阿?着
- 请问怎样把以下的Div用C#把它变为显示状态?谢谢!
- 关于开篇动画卡几秒的问题。!~
- 关于画table的定位问题
{
if (e.Row.RowType == DataControlRowType.DataRow && this.gvUsers.EditIndex != e.Row.RowIndex)
{
Label lbsuoding = (Label)e.Row.Cells[4].FindControl("Label6");
}
}
Label lbl = GridView1.FindControl["label6"] as Label;
string lblName=lbl.Text;
frach(control c in GridView1.Control)
{
if(c is Lable){
Lable lable = c.FindControl("Label6") as Lable;
lable.text;
}
}
Label lbl = GridView1.FindControl["label6"] as Label;
string lblName=lbl.Text;
{
SqlDataReader sdr = db.reDataReader("select * from advicereply");
if (sdr.Read())
{
if (string.IsNullOrEmpty(sdr["reply"].ToString()))
{
Label reply = GridView1.FindControl("Label6") as Label;
reply.Text = "未回复";
}
else
{
Label replied = GridView1.FindControl("Label6") as Label;
replied.Text = "已回复";
}
}
}
那我要直接赋值,这样貌似不对,要怎么改?
if (e.Row.RowType == DataControlRowType.DataRow && this.gvUsers.EditIndex != e.Row.RowIndex)
{
Label lbsuoding = (Label)e.Row.Cells[4].FindControl("Label6");
}
我都习惯用这个