• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 595
  • Last Modified:

Make Whole DIV Tag Hyper Link - ASP.NET

Is it possible to make a whole of a div tag a hyper link in asp.net?  If so what code can I insert?
0
kinton
Asked:
kinton
1 Solution
 
abelCommented:
what do you mean by making a div tag a hyperlink? A hyperlink is a <a href... /> tag, and a div tag is, well, a <div> tag. You can put an <a> tag around a div tag, and you can put an <a> tag inside a <div> tag:


<div>
   <a href="http://mylinkhere">the content of the div here</a>
</div>

Open in new window

0
 
JPJ78Commented:

<div onclick="document.location.href='myNewPage.html';">yada yada yada </div>

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Tackle projects and never again get stuck behind a technical roadblock.
Join Now