I would like to use HyperLink of ASP.Net to open a new window when I click on it. I can not hard code the NavigateUrl, instead I have to use 'onclick' function. In that function I have to use 'window.open(url)'. What should be the value of NavigateUrl in the design page. I could use 'javascript:retur开发者_JAVA技巧n true;' , it works on browsers other than IE. I tried with '#', but it does not give the expected result.
Have you tried javascript:void(0);
? Then the a tag looks like:
<a href="javascript:void(0);" onclick="window.open('http://www.stackoverflow.com', 'StackOverflow');">test</a>
精彩评论