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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:18:40+00:00 2026-05-11T22:18:40+00:00

I have an index view that I want to update automatically as the user

  • 0

I have an index view that I want to update automatically as the user types in a client id. I got something similiar to work (only it was updating just a label) – but this will not work.

What happens is the partial is just rendered by itself (not in place of the UpdateTargetID). So the data is rendered on a new page. Here is my code:

Controller:

public ActionResult ClientList(string queryText)
    {
        var clients = CR.GetClientLike(queryText);
        return PartialView("ClientIndex", clients);
    }

Partial View:

<table>
<thead>
    <tr>
        <td>Client ID</td>
        <td>Phone1</td>
        <td>Phone2</td>
        <td>Phone3</td>
        <td>Phone4</td>
    </tr>
</thead>
<tbody>
    <% if (Model != null)
       {
           foreach (Client c in Model)
           { %>
        <tr>
            <td><%= Html.Encode(c.ClientID)%></td>
            <td><%= Html.Encode(c.WorkPhone)%></td>
            <td><%= Html.Encode(c.WorkPhone1)%></td>
            <td><%= Html.Encode(c.WorkPhone2)%></td>
            <td><%= Html.Encode(c.WorkPhone3)%></td>

        </tr>
    <% }
       } %>
</tbody>

Main View:

Insert code messed up, so this is just copy/pasted:

$(function() {
$(“#queryText”).keyup(function() {
$(‘#sForm’).submit();
});
});

  <div id="status" class="status" name="status">
    <%--<% Html.RenderPartial("ClientIndex", ViewData["clients"]); %> Should this be here???? --%>

  </div>
  • 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-11T22:18:41+00:00Added an answer on May 11, 2026 at 10:18 pm

    Rather than posting a form on the page constantly why not do a behind the scenes jQuery.get call to get the search results for the provided text. I would think this would be faster and cleaner. When submitting the form like I think you are (judging from my reading of your code) you are causing the page to essentially refresh (and not re-write to the div).

    $('#sForm').submit()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my ASP.net MVC View I have a dropdown that I want to get
In my User controllers Index view I have a table with usernames and some
I have a CListView that uses ajaxLink() in the _view file. View (index.php) <?php
I've got a View that contains code that allows the user to upload images.
I am trying to have an element index view displaying the associated projectname (
I have the following code in my index view. latest_entry_list = Entry.objects.filter(is_published=True).order_by('-date_published')[:10] for entry
If I have a HomeController displaying its Index view, how would I proceed in
In my rails view(index.html.erb), i have following structure <div> <%= render :partial => create
I have folders and pages /admin/add/index.php, /admin/edit/index.php & /admin/view/index.php which all are requiring page
I have the* Topics * controller and in the view/topics/index.html.erb the link for destroying

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.