单击datagrid某一行的按鈕,怎样查找该行的其它控件?
解决方案 »
- 网页直接显示Excel
- 公司要新上Ajax框架,求VS2008下的 ajax技术与通用的ajax之间的技术比较文章
- js控制浮动层的位置问题
- 请问,ASP.NET的网页有没有办法执行一个客户端程序?
- DropDownList绑定数据的问题。
- 关于在dreamwerver 里的中文显示乱码问题。请指教。
- 报表安装问题????马上结贴。
- 在线结帐:删除加确认对话框?
- 请大家看看1+1=?这个贴,跪求,我都没分了(我真是想知道是怎么回事)?
- 请求高手告诉我如何处理“应用程序中的服务器错误,SQL Server 不存在或访问被拒绝.”多谢!
- 删除记录的问题,急!急!
- DataGrid模板列問題,急急急。。。。。
ControlType mycon=(ControlType)e.item.cells[i].FindControl("ControlID");!
ControlType mycon=(ControlType)e.item.cells[i].FindControl("ControlID");!
什麽意思?
在后台
sub datagrid_itemcommand() handles datagrid.itemcommand
dim label as label
label = e.item.findcontrol(labelname) dim button as button
button = e.item.findcontrol(buttonname)
end sub
假设是label的话
Label mycon=(Label)e.item.cells[i].FindControl("ControlID");ControlID 指的是Label的id。
如果是按钮、文本框等,就用Control control = e.Items[idx].FindCondControl("控件id");
再转换为相应的控件来使用。
ControlType mycon=(ControlType)e.item.cells[i].FindControl("ControlID");!是什麽意思呢?