[英]Forcing links in an SSRS report to open in a new window from within silverlight
I have an SSRS report embedded within a silverlight application and I want the links in that report to open in a new tab . 我在Silverlight应用程序中嵌入了SSRS报告,并且希望该报告中的链接在新选项卡中打开。
I already tried the below and they both didn't work : 我已经尝试了以下方法,但它们都没有起作用:
Any help is appreciated 任何帮助表示赞赏
This should solve in Code behind 这应该在代码后面解决
System.Windows.Browser.HtmlPage.Window.Navigate(
new Uri("http://silverlight.net"),
"_blank", "height=300,width=600,top=100,left=100");
Src: MSDN Src:MSDN
OR 要么
Don't use href="javascript:void" 不要使用href =“ javascript:void”
It means people without javascript cannot use the link. 这意味着没有javascript的人无法使用该链接。 Use something like this instead.
使用类似这样的东西。
Then add this to the head of your page 然后将其添加到页面的顶部
<script>
function myFunction() {
window.open("http://www.w3schools.com");
}
</script>
<body>
<a href="#" onclick="myFunction()">click here</a>
</body>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.