Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4014808
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:32:30+00:00 2026-05-20T09:32:30+00:00

I have two actionlinks on my MVC view like this: <%= Html.ActionLink (click me,Partial1,Temp,new

  • 0

I have two actionlinks on my MVC view like this:

   <%= Html.ActionLink
      ("click me","Partial1","Temp",new { s = "0" },new { id = "mylink" }) %>

    <%= Html.ActionLink
      ("click me second link","Partial1", "Temp", null, 
      new { id = "mysecondlink" }) %>

and I have four style for these two links. if mylink is slected i want to apply #mylinkselected style to it and #mysecondlinknoselected to mysecondlink and if mysecondlink is selected, I want to apply #mysecondlinkselected to it and #mylinknotselected to mylink

I can not change the ids as I have code related to these links at top of view

 <script type="text/javascript">
        $(function() {
            $('#mylink').click(function() {
                $('#resultpartial1').load(this.href);
                return false;
            });
        });

        $(function() {
            $('#mysecondlink').click(function() {
            $('#resultpartial1').load(this.href, { s: "1"  });
                return false;
            });
        });
    </script>

how to change styles ?

Regards,
Asif Hameed

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:32:31+00:00Added an answer on May 20, 2026 at 9:32 am

    Your best bet is probably to just set an A:active style for the links. This will apply that style to whichever link is clicked.

    http://www.echoecho.com/csslinks.htm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have two html.actionlinks: <%= Html.ActionLink(Activate, ActivateJob, Management, new { selectedObject = Model.ID },
I have a view with the two HtmlHelpers that produce links, something like this
I have two classes (MVC view model) which inherits from one abstract base class.
I wire up Shadowbox dialog provider to my links or button like this: <%=Html.ActionLink(Resources.Localize.Routes_WidgetsEdit,
I have a link as follows. @Html.ActionLink(Create Report, Screenreport, Reports, null, new { @class
I have a Partial View with two opposite ActionLinks inside: <div id=divStatus> @if (IsAuthenticated)
I have this simple MVC 3 application which simply has two controllers(Home and Edit),
I have two @Html.ActionLink's one works and one does not and I cannot figure
I currently have an ASP .NET MVC site that has two domains pointing to
Apologies, I'm new to ASP.NET MVC. :) I'm unsure if this is simple a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.