if I have this code in a user control file(ascx), I want the page current visited has class "active"
for example: when I visited b.html, the html source should be:
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Nitesh KejriwalRank #253 · 9.9K reputationPosted Sep 6, 2014, 12:17 AM EDT
johnson yuan25 reputationPosted Sep 7, 2014, 12:36 PM EDT
I think the key is how to determine the case to check whether to add css class.
How can I know which page I'm loading now?
It's not like news_list.aspx?id=14 that I can add css class by querystring,
I have to page's like news_list.aspx, index.aspx...
johnson yuan25 reputationPosted Sep 7, 2014, 12:39 PM EDT
you can look this demo at http://aspnet451.planetwrox.com/PhotoAlbums/
how can I do this in my project?
Nitesh KejriwalRank #253 · 9.9K reputationPosted Sep 7, 2014, 7:30 PM EDT