?
Solved

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

Posted on 2014-04-09
4
Medium Priority
?
326 Views
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">
                    <h6>
                        Projects Category
                    </h6>
                    <ul>
                   
                        <li>
                            <asp:DataList ID="DlProject1" runat="server" RepeatColumns="1" RepeatDirection="Horizontal"
                                OnItemDataBound="DlProject1_ItemDataBound">
                                <ItemTemplate>
                                 
                                        <a href='Project3.aspx?categoryID=<%#Eval("categoryID")%>' class="active">
                                            <%#Eval("categoryName")%>
                                        </a>
                           
                                </ItemTemplate>
                            </asp:DataList>
                     
                        </li>
                    </ul>
                </div>

 Looking forward to hearing from you.
0
Comment
Question by:satmisha
[X]
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
4 Comments
 
LVL 8

Expert Comment

by:deepu chandran
ID: 39990911
0
 
LVL 5

Accepted Solution

by:
jayakrishnabh earned 530 total points
ID: 39991351
<script>
 $(document).ready(function(){            
            $("a").click(function () {
                $(this).css("color", "red");
                $(this).css("background-color", "yellow");
            });
        });
</script>
0
 

Author Comment

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

Author Closing Comment

by:satmisha
ID: 40018679
Thankx
0

Featured Post

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

719 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