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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:28:43+00:00 2026-06-11T11:28:43+00:00

I come from a webforms background, and at this point I’m quite frustrated with

  • 0

I come from a webforms background, and at this point I’m quite frustrated with MVC4. I’ve been looking at examples, watching video’s, googling, ect. Nothing seems to be working and I’m about to throw in the towel, however, this site is pretty helpful so I’m going to see if I can get some help with this.

What I’d like to do is:

  1. Create a page with jQuery tabs (easytabs) (this is done btw)
  2. On the tab click event, I’d like it to
    re-load a tab via ajax

In webforms, I would have been done at 8am with this. I’m now stuck on this and its 5pm. Frustrated beyond belief.

I followed the web video tutorial on the MVC4 site, this lovely example is in Razor, which I do not wish to use, but, I still follow it anyways for the knowledge:

http://www.asp.net/mvc/overview/javascript
-> ‘Javascript and Ajax’
-> http://pluralsight.com/training/players/PSODPlayer?author=scott-allen&name=mvc3-building-ajax&mode=live&clip=0&course=aspdotnet-mvc3-intro

In my easytabs, in HTML, I would define my html as:

<li class="tab"><a href="#tabs-users" class="light heavy">Manage Sections</a></li>

So, following the video, I tried to create and anchor tag with ajax attributes via the ajax helper to replace this HTML:

 <% Ajax.ActionLink("Manage Sections", "tabsUsers", new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "tabs-users", InsertionMode = InsertionMode.Replace }); %>

This renders NOTHING. It will not render it on the page. So, I go hunting, and find I need the following:

<%: Scripts.Render("~/bundles/jqueryval") %>

This bundle includes ‘jquery.unobtrusive-ajax.min.js‘ and also in the web.config I have the settings:

<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />

Still nothing.

Original HTML

<div id="tab-container" class="tab-container">
    <ul class="etabs">
        <li class="tab upper first"><a href="#tabs-users" class="light heavy">Manage Users</a></li>
        <li class="tab upper"><a href="#tabs-groups" class="light heavy">Manage Sections</a></li>
    </ul>
    <div id="tabs-users" class="normal light clearfix">
        Users
    </div>
    <div id="tabs-groups" class="normal light clearfix">
        Groups
    </div>
</div>

I have a feeling the Ajax.ActionLink doesn’t like to render the anchor tag there, but I have no idea why.

Controller

    [HttpGet]
    public PartialViewResult tabsUsers()
    {
        IEnumerable<SelectListItem> items = UserManager.GetUsers()
            .Select(c => new SelectListItem
            {
                Value = c.UserID.ToString(),
                Text = c.FirstName + c.LastName
            });

        return PartialView("UsersPartial", items);
    }

UsersPartial View

    <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<LMS.Data.User>>" %>

<table>
    <tr>
        <th>
            <%: Html.DisplayNameFor(model => model.UserName) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.FirstName) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.LastName) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.Password) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.Email) %>
        </th>
        <th></th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.UserName) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.FirstName) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.LastName) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Password) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Email) %>
        </td>
        <td>
            <%: Html.ActionLink("Edit", "Edit", new { id=item.UserID }) %> |
            <%: Html.ActionLink("Details", "Details", new { id=item.UserID }) %> |
            <%: Html.ActionLink("Delete", "Delete", new { id=item.UserID }) %>
        </td>
    </tr>
<% } %>

</table>

Scripts section as rendered when running

        <script src="/Scripts/jquery-1.6.2.js" type="text/javascript"></script>

        <script src="/Scripts/jquery.unobtrusive-ajax.js" type="text/javascript"></script>
<script src="/Scripts/jquery.validate.js" type="text/javascript"></script>
<script src="/Scripts/jquery.validate.unobtrusive.js" type="text/javascript"></script>

        <script src="/Scripts/jquery-ui-1.8.11.js" type="text/javascript"></script>

        <script src="/Scripts/jquery.easytabs.min.js" type="text/javascript"></script>
<script src="/Scripts/script.js" type="text/javascript"></script>

Any ideas?? I really want to give MVC a worthwhile shot here, but it’s not being very nice to me.

  • 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-11T11:28:45+00:00Added an answer on June 11, 2026 at 11:28 am

    This renders NOTHING. It will not render it on the page.

    That’s because the correct syntax is the following:

    <%= Ajax.ActionLink("Manage Sections", "tabsUsers", new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "tabs-users", InsertionMode = InsertionMode.Replace }) %>
    

    As a long time WebForms user finishing things at 8am you should have know that <%= is used to output the result to the response whereas <% and a ; at the end simply executes the command on the server without outputting anything.

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

Sidebar

Related Questions

I come from a C++ background and I've been working with C# for about
I come from frontend background, so I apologize if this db question seems dumb.
i am new to webforms and come from a php background. when creating complex
I come from a C++ background, so apologies if this is a non-C# way
I come from an Actionscript3 background and this is my first time writing any
I come from a Java background, but I learned C++ after and have been
I come from a Java background and am getting more into .NET, what are
I come from ruby/C# and am new to Python. I'm looking at the following
I come from a php background and in php, there is an array_size() function
I come from a C# background and I am working on a C++ project.

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.