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

  • Home
  • SEARCH
  • 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 7040597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:56:14+00:00 2026-05-28T01:56:14+00:00

I am trying to implement an Ajax way to update my data grid. So

  • 0

I am trying to implement an Ajax way to update my data grid. So far I have coded the following in my controller:

public ActionResult Detail(string ac, string me) {     
   vm.AdminDetails = _link.Detail(ac + me).ToList();      
   if (Request.IsAjaxRequest())         
      return PartialView(vm);     
   return View(vm); 
} 

My snapshot of the view looks like this:

@model ViewModels.Shared.BaseViewModel
@{ 
    Layout = "~/Areas/Administration/Views/Menus/_Layout.cshtml";
}

@section content {
<div class="bdy_box">
        <div id="detailData" class="rep_tb0">
        // code to generate the list of data
        </div>
</div>

My snapshot of the javascript looks like this:

function reload(entity, pk) {
    $.ajax({
        url: "/Administration/" + entity + "s/Detail",
        data: { pk: pk },
        dataType: 'html',
        cache: false,
        success: function (responseText) {
            $('#detailData').html(responseText);
        }
    });
};

The data does get returned BUT my problem is other data also gets returned. When I look at the contents of the detailData div I see much more than I need. For example I see something like the following:

<div class="rep_tb0" id="detailData">  
<title></title>    
<meta content="" name="title">    
<meta content="" name="description">     
<meta content="" name="keywords">    
<link type="image/x-icon" href="/Content/Favicons/default.ico" rel="shortcut icon">     
<link type="text/css" rel="stylesheet" href="/Content/Stylesheets/Style203.css">

Is there a reason why it’s showing me all this and how can I stop it showing all this header type of information?

  • 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-28T01:56:15+00:00Added an answer on May 28, 2026 at 1:56 am

    Melissa,

    I’m assuming that you have a partialview called _detail.cshtml (if not, you need to create one)??

    I believe that you may be actually invoking the ‘full’ view detail.cshtml based on your sample. I’d suggest that you call your action it along the following lines:

    public ActionResult Detail(string ac, string me) {     
       vm.AdminDetails = _link.Detail(ac + me).ToList();      
       if (Request.IsAjaxRequest())         
          return PartialView("_details", vm);     
       return View(vm); 
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Details: I'm basically trying to implement the functionality of the example here ( http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultvb.aspx
I am trying to implement Ext.ux.grid.filter.ListFilter using a data store (rather than a hardcoded
I am trying to implement a way to avoid click spamming. I have a
I am trying to implement AJAX in my Google App Engine application, and so
I am trying to implement ajax back/forward button support and therefore writing variables after
I am trying to implement a simple request to Wikipedia's API using AJAX (XMLHttpRequest).
Am trying to implement a generic way for reading sections from a config file.
I'm trying to find a way to implement file manager functionality in an mvc
I am trying to implement paging across ajax calls. The page should not refresh
Following up from this question , I'm trying to implement an unobtrusive confirm dialog.

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.