Suzan Balaa
Suzan Balaa

Reputation: 122

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.

I already tried the below and they both didn't work :

Any help is appreciated

Upvotes: 0

Views: 1315

Answers (1)

user2526236
user2526236

Reputation: 1538

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

OR

Don't use href="javascript:void"

It means people without javascript cannot use the link. 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>

Upvotes: 1

Related Questions