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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:43:23+00:00 2026-05-11T16:43:23+00:00

(ASP.NET Web Application) I’d like to create a page which allows the user to

  • 0

(ASP.NET Web Application) I’d like to create a page which allows the user to build an HTML table. The user will be provided with the following controls: a textbox used to define the amount of rows in the table, a textbox used to define the amount of columns in the table, and a bulleted list of shapes (ex. Square, Octagon, etc) which will be displayed within each cell.

As the user enters a value within each control, I’d like to build and display the table based upon the existing values. I’d like to handle the generating of the HTML table’s code on the client-side.

What are my options? I’ve come across a number of articles that I believe could be useful, but I’m unable to piece everything together and gather an applicable approach; I have little experience with client-side scripting, however I will not shy away from a learning curve (what programmer would?) if it will result in a clean, efficient solution.

Any informative links you can provide would be greatly appreciated.

  • 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-11T16:43:23+00:00Added an answer on May 11, 2026 at 4:43 pm

    JQuery with a couple of nested loops should do this fairly easily. You can optimize it with a string builder or something, but the basics are pretty clear. If you’re doing something more complicated, you’d probably be better off looking into one of the templating engines for JQuery or MS AJAX:

     <script type="text/javascript">
         $(function() {
           $('INPUT, SELECT').change(function() {
              var rows = parseInt($('#rows').get(0).value);
              var cols = parseInt($('#cols').get(0).value);
              if (isNaN(rows) || isNaN(cols)) {
                  return;
              }
              var shape = $('#shape').get(0).value;
              drawTable(rows, cols, shape);
           });
         });
    
         function drawTable(rows, cols, shape) {
            $('#results').empty().append("<table></table>");
            var table = $('#results > TABLE');
    
            for (var row = 0; row < rows; row++) {
               var htmlRow;
               htmlRow = '<tr>';
               for (var col = 0; col < cols; col++) {
                  htmlRow += '<td><img src="' + shape + '.gif" alt="' + shape + '" /></td>';
               }
               htmlRow += "</tr>";
               table.append(htmlRow);
            }
         }         
     </script>
    
     Columns: <input id="cols" type="text" /> <br />
     Rows: <input id="rows" type="text" /> <br />
     Shape: 
         <select id="shape">
            <option value="square">Square</option>
            <option value="circle">Circle</option>
         </select>
    
     <div id="results">
     </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 95k
  • Answers 95k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer To me it would seem like there would be a… May 11, 2026 at 7:06 pm
  • Editorial Team
    Editorial Team added an answer IOException is a class from the java.io package, so in… May 11, 2026 at 7:06 pm
  • Editorial Team
    Editorial Team added an answer You should add -s to get a stable sort: sort… May 11, 2026 at 7:06 pm

Related Questions

When I build my ASP.NET web application I get a .dll file with the
Possible Duplicate: ASP.NET: Web Site or Web Application? I have noticed that there is
I use an HttpHandler to dynamically serve images in a ASP.Net web application. I
What is the simplest way to distribute an asp.net web application? I tried to
I'm currently a .NET developer, but I'm starting to work with Flex a little

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.