在asp.net中的gridview rowcommand事件中找到html控件? [英] find html control in gridview rowcommand event in asp.net?
本文介绍了在asp.net中的gridview rowcommand事件中找到html控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在asp.net的gridview rowcommand事件中找到html控件?
提前谢谢,
解决方案
< blockquote>试试这个:
HtmlGenericControl div = e.Row.FindControl( msgDiv) as HtmlGenericControl;
grdRow =(GridViewRow)e.CommandSource
TextBox txtAbc =(TextBox)grdRow.FindControl( txtAbc);
并查看此处 [ ^ ]
在asp.net中的RowCommand事件的gridview中查找控件 [ ^ ]
看到这个
http://www.dotnetfunda.com/forums/thread4605-want-to-find-control-in-gridview-on-rowcommand-event -in-aspnet.aspx [ ^ ]
上面的链接提供了在rowcommand事件中gridview中访问控制的方法。要访问Html控件,请将runat =server
属性设置为html控件,并使用相同的方式访问这些控件。
find html control in gridview rowcommand event in asp.net?
Thanks in advance,
解决方案
Try this :
HtmlGenericControl div = e.Row.FindControl("msgDiv") as HtmlGenericControl;
Try this:
grdRow = (GridViewRow) e.CommandSource TextBox txtAbc= (TextBox)grdRow.FindControl("txtAbc");
And have a look Here[^]
Find Control in gridview on RowCommand event in asp.net[^]
see this
http://www.dotnetfunda.com/forums/thread4605-want-to-find-control-in-gridview-on-rowcommand-event-in-aspnet.aspx[^]
[EDIT]
The above link provides the way to access control in gridview in rowcommand event. To access Html controls placerunat="server"
property to html controls and use the same way to access those controls.
这篇关于在asp.net中的gridview rowcommand事件中找到html控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文