High-Lighting the href tag that was Clicked Last in DataList in .Net

Posted on 2014-04-09
Last Modified: 2014-04-23
Hi Team,

I want to highlight href tag when I click it. As of now I am able to highlight it on mouse over but in order to keep it highlighted what I can do ?

In the below code I am using "categoryID" as href, on mouse over I can make it highlighted but after click how can I keep it highlighted ?

<div class="leftlinkpan">
                        Projects Category
                            <asp:DataList ID="DlProject1" runat="server" RepeatColumns="1" RepeatDirection="Horizontal"
                                        <a href='Project3.aspx?categoryID=<%#Eval("categoryID")%>' class="active">

 Looking forward to hearing from you.
Question by:satmisha
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

by:deepu chandran
ID: 39990911

Accepted Solution

jayakrishnabh earned 265 total points
ID: 39991351
            $("a").click(function () {
                $(this).css("color", "red");
                $(this).css("background-color", "yellow");

Author Comment

ID: 39992827
I'll appreciate if you could provide some exaple/code. I tried above one but couldn't get the success.

Author Closing Comment

ID: 40018679

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

627 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