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 8372707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:30:17+00:00 2026-06-09T14:30:17+00:00

I have just solved an issue I had which couldn’t be solved (to my

  • 0

I have just solved an issue I had which couldn’t be solved (to my limited knowledge) with an ActionLink so I used a regular hyperlink.

When these two links are rendered on the page, they are styled very similar to each other as they pass the same css conditions, however they aren’t exactly the same in two ways that I have noticed:

  • The text is selectable on the hyperlink where is isn’t on the ActionLink
  • When hovering over the ActionLink, the cursor changes to a hand rather than a pointer, the hyperlink stays with the pointer.

I was under the impression that an ActionLink renders a hyperlink which would explain why they are both styled by the css, but there are obviously some differences.

Does anyone know how to fix this, or suggest another solution to replacing an ActionLink with a hyperlink to call an AJAX function (which returns a PartialView)?

UPDATE

This is the rendered HTML. The first is the hyperlink, then second is the ActionLink.

<li><a id="load-partial">Test</a></li> 
<li><a href="/Contact/List">Contact</a></li>

The reason I have an id in the hyperlink is so that it will run the following script to create the view in a specific div. I can’t seem to replicate this using an ActionLink as it just return the view on it’s own without the Layout views and completely unformatted.

<script>
$(document).ready(function () {
    $('#load-partial').click(function () {
        $.ajax({
            url: '/Contact/List/',
            datatype: 'html',
            success: function (data) {
                $('#adminmain').empty().html(data);
            }
        });
    });
});
</script>

Thanks very much.

  • 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-06-09T14:30:19+00:00Added an answer on June 9, 2026 at 2:30 pm

    An ActionLink is nothing more than a server-side helper method that emits an HTML A tag. There is nothing else special about it.

    If you are seeing differences in behavior / rendering, view the HTML source that is rendered and look for differences there.

    There are very few things you cannot accomplish with an ActionLink that would require you to hand-code the A tag. Did you post a separate question about the problem you could not solve using it?

    UPDATE (based on your posted HTML)

    The hyperlink is missing a href so it will not do anything when clicked.

    If you need to add an ID to your ActionLink, you can do something like:

    @Html.ActionLink("Contact (this is the text)", "List", "Contact", 
        new { someQueryStringParameter = 42 }, 
        new { id="load-partial" })
    

    That example shows how to generate

    <a id="load-partial" href="/Contact/List?someQueryStringParameter=42">Contact (this is the text)</a>
    

    Keep in mind the ID should be unique on a given HTML page.

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

Sidebar

Related Questions

I have solved this problem, I just need to know what to do. I
- Running PHP 5.3.8 on Linux- To start, we have solved this issue to
Alrighty, I'm getting quite frustrated, namely because I thought I had this issue solved,
I've solved this issue but I'm just wondering why this works the way it
I have run into an interesting issue using PHP's date() function. Haven't had any
I have a test db on godaddy, I have had a similar issue before
I had a problem with ARC and blocks but have solved the problem. Unfortunately
We just upgraded to IIS7 and have had intermittent issues with SESSION variables. In
I have a problem and I just do not know how to solve it.
I have just created this table: create table dbo.OrderTypes ( ID smallint primary key

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.