| 发表于:2007-03-28 09:21:53 楼主 |
我要实现点击datagrid中模板列中的一个linkbutton后,弹出一个模式窗口,代码如下: private void datagrid1_itemcommand(object source, system.web.ui.webcontrols.datagridcommandeventargs e) { string empid=(string)datagrid1.datakeys[e.item.itemindex]; if(e.commandname.equals( "edit ")) { for(int i=0;i <datagrid1.items.count;i++) { ((linkbutton)(datagrid1.items[i].findcontrol( "linkbutton2 "))).attributes.add( "onclick ", "javascript:showmodaldialog( 'webform1.aspx?tag= "+empid+ " ', 'newwindow, 'dialogwidth:600px;dialogheight:200px;help:0;center:yes;resizable:0;status:0;scroll:yes ');return(false); "); } } } 可是为什么打不开子窗体呢,请指点指点我啊,谢谢! |
|
|
|
|