日期:2014-05-19  浏览次数:20445 次

用DataGrid超级联接列打开另外设置好大小的一个页面,怎么样设置。。。。。。
如题,各位帮忙

------解决方案--------------------
那个链接可以使用showmodaldialog的js方法
------解决方案--------------------
偶在用的

Response.Write( " <script language= 'javascript '> window.open( 'test.aspx ', '产品列表 ', 'left= '+(window.screen.width-800)/2+ ',top= '+(window.screen.height-480)/2+ ',scrollbars=yes,resizable=no,width=800,height=480 '); </script> ");
------解决方案--------------------
可以这样写
private void gridNewsShow_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
e.Item.Cells[DataGrid中的序号].Attributes[ "onclick "]= "javascript脚本 ";
}
}
------解决方案--------------------
在超链接的“URL格式字符串”中写上类似如下的代码:

javascript:var win=window.open( 'xxx.aspx ', '_blank ', 'height=320,width=310,resizable=no ')