[英]Opening a new window popup from a HyperLinkField of GridView
I'm using GridView and need a new window popup from HyperLink field with no toolbars, and not resizable. 我正在使用GridView,并且需要HyperLink字段中的新窗口弹出窗口,没有工具栏,并且无法调整大小。
I pass the value of ID (in querystring) to the new page. 我将ID的值(在querystring中)传递给新页面。
How to do that? 怎么做?
I'm using Master Page . 我正在使用“ 母版页” 。
Example code is like: 示例代码如下:
NavigateUrl='<%# (String.IsNullOrEmpty(Eval("Attachment").ToString()) ?
String.Format("sDetailsUpload.aspx?sID={0}",
_2Version_Mprep.Base64ForUrlEncode(Eval("ID").ToString())) :
Eval("Attachment").ToString())%>'
Try this in your Markup webpage. 在您的标记网页中尝试此操作。
I hope I was helpful. 希望对您有所帮助。
NavigateUrl='<%# (String.IsNullOrEmpty(Eval("Attachment").ToString()) ?
String.Format("sDetailsUpload.aspx?sID={0}",
_2Version_Mprep.Base64ForUrlEncode(Eval("ID").ToString()) :
Eval("Attachment").ToString())%>'
onclick="javascript:w= window.open(this.href,'sID',
'left=20,top=20,width=750,height=450,toolbar=0,resizable=0');
return false;"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.