((TextBox)e.Item.Cells[i].Controls[0]).ID
解决方案 »
- asp.net获取oracle 存储过程报:无效的SQL语句
- 求一个 Jquery mp3 插件 且有上传歌曲功能 十分感谢!!
- 详细数据显示问题
- 求一段上传图片的代码
- (在线等啊,希望大家帮帮忙,很急的)火狐 表格合并单元格的问题
- .net项目的身份认证机制比较
- 如何删除DATAGRID中显示的行,不删除数据库???
- 怎么部署asp.net开发的Wap应用程序,请教?
- Asp.net(c#)怎样发邮件?
- 为什么这样取不到值,错在哪里?myUserID=dgi.Cells[1].Text.ToString().Trim();取出的值为"",但这一列明明有值呀?
- 连接到Excel的问题
- 新手上路一个简历的问题!各位高手帮帮忙!!!!
{
if (e.Item.ItemType == ListItemType.Header)
{
Response.Write(((TextBox)e.Item.Cells[0].Controls[1]).ID);
}
}
{
if (e.Row.RowType == DataControlRowType.Header)
{
TextBox tb = (TextBox)this.GridView1.FindControl("TextBox1");
Response.Write("'"+tb.Text+"'");
}
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox TextBox1 = (TextBox)DataGrid1.FindControl("dtg_00_ProdCode");
Response.Write("'" +TextBox1.Text + "'");
}
是对的!支持
foreach (DataListItem dl in this.DataList1.Items)
{
string date = ((TextBox)dl.FindControl("TextBox1")).ID;
}
public void InitSystemTranslation(System.Web.UI.Page obj)
{
HtmlForm form = new HtmlForm();
for (int i = 0; i < obj.Controls.Count; i++)
{
if (obj.Controls[i] is HtmlForm)
{
form = obj.Controls[i] as HtmlForm;
}
}
foreach (object obj1 in form.Controls)
{
if (obj1 is Panel)
{
foreach (object obj2 in (obj1 as Panel).Controls)
{
if (obj2 is Button)
{
Button Btn = obj2 as Button;
}
else if (obj2 is DataGrid)
{
DataGrid Dtg = obj2 as DataGrid; if (Dtg.ID.Length > 4 && Dtg.ID.Substring(Dtg.ID.Length - 4) == "Head")
{
//如何写?
}
}
else if (obj2 is Label)
{
Label Lbl = obj2 as Label; }
}
}
}
}