Solved

How to disable NavigateUrl proeprty of HyperLink

Posted on 2008-06-13
2
530 Views
Last Modified: 2010-04-21
Greetings all

I have the following hyperliunk, which when clicked opens a url ina separate window. In order for the link to appear properly (sorry - don't know how else to put it) - ie underlined and proepr cursor (hand) when hovering, I need soemthing in "NavigateUrl.

When the user clicks on the link, it opens the url correctly. However, it also attempts to go to the content of "NavigateUrl" - which i don't want.

Is there any way around this?


In advance, thanks!!

   allanmark

<asp:HyperLink  ID="hypFeaturedSite" runat="server" style="position: relative; top: 35px;" 
          CssClass="hypLink" NavigateUrl="x" onclick="javascript:win= window.open('HTTP://www.google.com','win','left=20,top=20,width=800,height=500,scrollbars=1,toolbar=1,resizable=0');win.moveTo(100,100);
 }">Featured Site</asp:HyperLink>

Open in new window

0
Comment
Question by:allanmark
2 Comments
 
LVL 21

Accepted Solution

by:
naspinski earned 250 total points
ID: 21776819
this will take care of it for you
NavigateUrl="javascript:void()"

Open in new window

0
 

Author Closing Comment

by:allanmark
ID: 31466851
Short and sweet !!  Works like a dream!!  

Many thanks!!!!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that undeā€¦
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question