I have an array of some URL links. And I need to open all theese links by clicking one HyperLink, located in cell of Telerik GridHyperLinkColumn. Is there any method to do this? Now I have a code which sets first way to my HyperLink:
HyperLink link = (HyperLink) item["documents"].Controls[0];
if (link.NavigateUrl.Contains(";"))
{
string[] linktext = link.NavigateUrl.Split(';');
link.NavigateUrl = linktext[0];
}
I would probably take a quick look at this SO answer here.
The takeaway is that this is not possible without using JavaScript functions:
Without JavaScript, it's not possible to open two pages by clicking one link unless both pages are framed on the one page that opens from clicking the link. With JS it's trivial.
The example is this:
<p><a href="#" onclick="window.open('http://google.com');
window.open('http://yahoo.com');">Click to open Google and Yahoo</a></p>
This would also work: (again see answer here)
<a href="http://www.google.com" onclick="location.href='http://www.yahoo.com';" target="_blank">Open Two Links With One Click</a>