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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:47:24+00:00 2026-06-13T08:47:24+00:00

I have the following view inside my asp.net MVC web application:- <table id=tablelist border=1>

  • 0

I have the following view inside my asp.net MVC web application:-

<table id="tablelist" border="1">
    <tr>

    </tr>
    </table>

and i am trying to fill the table using the following java script:-

function getprocesslist(result) {
    var str = 'Total Number Of Processes:- ' + result.total.toString();
        $('#total').text(str.toString());
        var str1 = '<th>'+ 'Process Name' + '</th><th>'+ 'Process Requestor ID' + '</th><th>'+ 'Process State' +' </th><th>'+ 'Process Start Date' +' </th><th>'+ 'Process Due Date' +' </th>';
        $('#tablelist tr:last').after(str1);
    $.each(result.data, function (key, val) {
        var str2 = '<tr><td>' + val.name + '</td><td>' + val.requesterId + '</td><td>' + val.state + '</td><td>' + val.startedTime + '</td><td>' + val.due + '</td></tr>';

        $('#tablelist tr:last').after(str2);

    });

But i am facing the following problems with the above code:-

  1. the table header <th> will be displayed at the end of the table instead of being the first row.

  2. if i execute the same script more than one time then the table format will be wrong, and the table data will be displayed in multiple lines inside each table cell.

  3. no table boarders is being displayed, although i define the border="1".

Best Regards

  • 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-13T08:47:25+00:00Added an answer on June 13, 2026 at 8:47 am

    The reason your header is showing up at the bottom of the table is that it isn’t inside a <tr>, which is invalid, and your browser doesn’t quite know what to do with it. Wrap it in a <tr> and you’ll be fine. This would probably also resolve your second problem.

    As for borders, they should appear once your markup is valid, assuming there are no other overriding styles.

    Demo

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

Sidebar

Related Questions

I have the following view definition in my asp.net mvc website: <% Using Ajax.BeginForm(UsrCtlChangePassword,
i have the following script inside my asp.net MVC application to bounce the image
i have the following Ajax.beginform inside my asp.net mvc view, where the result of
i have the following script inside my asp.net mvc view:- function disableform(id) { $('#'
using ASP.NET MVC 2 I have a navigation menu inside my Master Page. In
I'm trying to add unit testing to an ASP.NET MVC application I have built.
I have the following table structure inside a view which gets displayed in the
I have following view <asp:Content ID=Content2 ContentPlaceHolderID=MainContent runat=server> <h2>Tables <%=ViewData[RetriverName] %></h2> <%using (Html.BeginForm(ResfreshSelectedTables, Home))
I have an ASP.Net MVC3 application (it doesn't matter if it is ASP.NET MVC,
I have two Grid View gridview1 and gridview2 inside an asp.net page. In order

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.