各位大侠,我在aspx的页面中放了一个panel,在panel里我添加了一个DataList,而在DataList的项模板中加了一个html表格,在其中的一个单元格中放了一个label,通过数据绑定来显示数据库中的一个字段的值。
我现在想直接从这个label得到它绑定的数据字段的值,不知道怎么做?
请各们大侠帮帮忙,在线等,谢谢!!!
解决方案 »
- 【急】.net中 根据手机号获取归属地
- 阅读器关闭时 FieldCount 的尝试无效。
- 兄弟们给一个树控件的例子,好吗
- 急!急!急!急!好问题
- 有crystal report 10 或者 crystal rport XI的安装用的注册码吗?
- 请教赠分:如何将htm/html文件在DIV中显示出来?
- 怎么取得DataGrid上第2行第3列的值
- Session["XX"]丢失或过期 能否通过Web.Config配置或者Global.asax自能做处理页不报错!
- 在存储过程中参数的OUTPUT和INPUT属性的区别
- 求助高手!!!
- javascript:超链接传递中文参数的问题
- CascadingDropDown控件读数据库不出东西
{
Label l = (LabeL)form1.FindControl("label1");
string txt = l.Text;
}
-------------------------------
if(e.Item.ItemType=ListItemType.Item || e.Item.ItemType=ListItemType.AlternatingItem)
{ Label labName = (LabeL)form1.FindControl("label1");
string txt = labName .Text;
}
-------------------------------
protected System.Web.UI.WebControls.DataList DataList1;
private string _str=String.Empty;
public string Str
{
get{return _str;}
set{_str=value;}
}
private GetLabelText()
{
foreach(DataListItem i in DataList1)
{
Label labName=(Label)i.FindControl("label1");
Str=labName.Text;
}
}