Open multiple URL on HyperLink Click using jQuery in ASP.Net

Last Reply one year ago By pandeyism

Posted one year ago

how to open multiple website url using hyperlink in asp.net

Posted one year ago

Hi GaneshG,

Do you want open multiple website on click to hyperlink ?

Will you explain in details ?


Posted one year ago

yes,I want multiple website url pass usinh hyperlink


Posted one year ago

Hi GaneshG,

Refer below sample.

HTML

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#hfPasslnk").click(function () {
            var urls = $(this).attr('href');
            for (var i = 0; i < urls.split(';').length; i++) {
                window.open(urls.split(';')[i], '_blank');
            }
            return false;
        });
    });
</script>
<asp:HyperLink ID="hfPasslnk" NavigateUrl="http://www.aspforums.net/;https://www.aspsnippets.com/"
    runat="server" Text="Click here"></asp:HyperLink>

Screenshot