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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:32:46+00:00 2026-05-17T18:32:46+00:00

This should be relatively simple for the MVC experts out there, but I’m still

  • 0

This should be relatively simple for the MVC experts out there, but I’m still learning the ropes.

  • I have a View which is not strongly-typed, simply ViewPage<dynamic>.
  • On this View, I have a single textbox, which is extended using jQuery’s AutoComplete
  • When the user types something into the textbox, the AutoComplete does an AJAX call to a Controller, which calls a stored procedure, returning a JSON collection of records, with 2 properties:
    • ID (Identifer for the item)
    • Name (Name for the item)

Now, with the jQuery AutoComplete UI Plugin, when a user clicks one of the items that is shown in the autocomplete, a client-side event is called, passing through the JSON object:

// .. snip heaps of jQuery
select: function (event, ui) {
   // ui is a JSON object:
   //    ui.item.id
   //    ui.item.name
}

Now my question is – from this client-side event, I need to display on the same page (below the texbox), extended information about this item. (obviously will require another AJAX call to the server).

How can I do that? The only thing I can think of is simply make the jQuery call another controller which returns a single JsonResult, and manually parse this JSON, displaying the HTML I want.

Is that the only way? Is there a helper I can use? The reason my View is not strongly-typed is because when the page loads, there is no information displayed about the model, simply a textbox.

I was really hoping I could create a partial view that is strongly-typed, and somehow call RenderPartial on this partial view, passing through the id of the item I want to display. Is this possible from client-side/AJAX?

  • 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-17T18:32:46+00:00Added an answer on May 17, 2026 at 6:32 pm

    You can use jQuery to request html as well as Json from the controller. So your jQuery could look like this:

    $.get(action, null, function(data){
      $('#someDiv').html(data);
    }, 'html');
    

    and you controller could return:

    return PartialView("SomePartial", Model)
    

    And the html would be rendered to the screen

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

Sidebar

Related Questions

No related questions found

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.