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

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
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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 …
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 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