日期:2014-05-18  浏览次数:20387 次

datagrid中模板列的问题
A.aspx页面中的datagrid中有一个模板列button(此处可为其它控件),点它弹出一个另一个页面(B.aspx),在另一个页面操作后(关闭B页面),刷新A页面.

------解决方案--------------------
<asp:TemplateColumn HeaderText= "编辑 " ItemStyle-HorizontalAlign= "Center ">
<HeaderStyle Width= "8% "> </HeaderStyle>
<ItemTemplate>
<a href= "JavaScript: window.showModalDialog( 'bcgl_edit.aspx?bcglid= <%# DataBinder.Eval(Container.DataItem, "bcsdid ")%> &&bcdwid= <%=strdwid%> ', ' ', 'dialogWidth=450px;dialogHeight=410px;status:no; ');document.location.replace( 'bcgl.aspx?BCDWID= <%=strdwid%> '); "> <img src= "../img/bj.gif " width= "46 " height= "15 " border= "0 " onmouseout= "this.src= '../img/bj.gif '; "
onmouseover= "this.src= '../img/bj2.gif '; ">
</a>
</ItemTemplate>
</asp:TemplateColumn>
楼主参考一下吧,我的项目这样用 还可以