locked
Auto generate HTML code, any good idea? RRS feed

  • Question

  • User1074540480 posted

    Hi, all

    I am now developing a report page which shows contracts information. Each contract has its title, contract number, address and also the detailed information of money in the tables.

    Problem is the number of contracts is dynamic. So I have to write a dynamic code to display the contract.

    Now I did it in a very stupind way. I wrote lots of response.write("<div><table><tr><td>...</td></tr></table><div>") for every HTML code in VB.net. And used for loop to repeatedly wrote those HTML code to generate the page.

    Could you give me some ideas to write a dynamic page easily?

    Thank you so much!

     

    Sample of my page as below:

    Agreement Profile Report
    Agreement No.: 2155
    Currency:  Dollar
    Recipient: Tim Moore, 1233 gallows rd apt 332, Vienna, Virginia, USA
    Title: Water Conservation
    Agreement Status: Agreement Open Agreement Type: Grant
    Agreement Start Date:  2/1/2007 Agreement End Date: 4/29/2015
    Agreement Signature Date:    Agreement Issue Date:  2/1/2007
    Desk Officer: Technical Director: Lucas Parsons

    Administrator: Super Man

    Financial Summary
    Total Amount Payments Sent PTA Liability Balance Recipient Expenses to Date Recipient Cash on Hand Balance Agreement Balance
    $400,25.00 $324,25.00 NA $0.00 $324,25.00 $324,25.00

    --------------------------------------------------------------------------------------------------------------------------------------------

    Agreement Profile Report
    Agreement No.: 2155
    Currency:  Dollar
    Recipient: Tim Moore, 1233 gallows rd apt 332, Vienna, Virginia, USA
    Title: Water Conservation
    Agreement Status: Agreement Open Agreement Type: Grant
    Agreement Start Date:  2/1/2007 Agreement End Date: 4/29/2015
    Agreement Signature Date:    Agreement Issue Date:  2/1/2007
    Desk Officer: Technical Director: Lucas Parsons

    Administrator: Super Man

    Financial Summary
    Total Amount Payments Sent PTA Liability Balance Recipient Expenses to Date Recipient Cash on Hand Balance Agreement Balance
    $400,25.00 $324,25.00 NA $0.00 $324,25.00 $324,25.00

     

    ------------------------------------------------------------------------------------------------------------------------------------

    Repeat

     

    ------------------------------------------------------------------------------------------------------------------------------------

    Repeat

     

    ------------------------------------------------------------------------------------------------------------------------------------

    Repeat...

    ...

     

     

     

     

     

     

     

     

     

    Friday, January 24, 2014 3:42 PM

Answers