ASP.NET MVC2 - Dynamic Page Creation

I am kind of new to the world of ASP.NET (especially MVC), I am trying to build up a page based on the configuration below:

   <headInput>
    <defaultColumns>
      <column name="Shift" validation="" unit="" required="" />
      <column name="Level" validation="" unit="" required="" />
      <column name="Value" validation="" unit="" required="" />
      <column name="Time" validation="" unit="" required="" />
    </defaultColumns>
    <additionalCols1>
      <column name="Rate" validation="" unit="" required="" />
    </additionalCols1>
    <additionalCols2>
      <column name="Online" validation="" unit="" required="" />
      <column name="Type" validation="" unit="" required="" />
    </additionalCols2>
   </headInput>

I have been trying to understand on how I can use the above configuration to generate labels as columns and then generate the row with data in columns.

I tried looking at many examples but haven't been able to figure out if it is even possible or not. Any help would be appreciated.

Thanks.

Answers


I'm not sure what you're trying to do or what schema you're using in the example above, but my feeling is that you should be using HTML tables for this:

http://www.w3schools.com/html/html_tables.asp

http://www.w3.org/TR/html4/struct/tables.html

Tables are defined in rows, not columns, first with the heading row ( then the data rows then the table data .

Also look at the colspan attribute and the rowspan attribute which I think you'll need for this - lets columns span more than one row and rows span more than one column.

Also if you're learning MVC why are you using a 2 year old version?? MVC3 was released over a year ago and MVC 4 is in beta with a go-live license. We're using MVC 4 to develop a web based stock trading application and its solid as a rock.

There's an example of building an HTML table using MVC at http://www.asp.net/mvc/tutorials/older-versions/models-(data)/displaying-a-table-of-database-data-cs (scroll to the bottom to see the MVC view) Its basically HTML with some server tags for pulling the data from the model. That's how MVC is - very different from webforms where you'd have server controls generating HTML for you.


Need Your Help

postgresql open connection and execute more then one command

postgresql dart dart-async

I want to do the following two insert operations using the postgresql driver for dart.

Removing a specific item from LinkedList in java without using any API

java data-structures linked-list

I am trying to remove an item from the LinkedList in java. This List is implemented by me and I am not using any java API. The major trouble I am facing is with RECURSION as I am always lost in rec...