Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 15th, 2004, 07:23 AM
Registered User
 
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic Matrix

Hi

I need to define a name to a matrix which changes dimensions
(ammount of rows and columns)

Please help

Thanx

 
Old October 15th, 2004, 08:05 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

To give a correct answer, you should let us know a bit more detail about your requirement. Do you want to create an HTML table with varying rows and columns ?
This code will do it.

<%
    Dim iNumRows
    Dim iNumCols

    'set number of rows and columns
    iNumRows=<number of rows you want for it>
    iNumCols=<number of columns you want>
%>
<table border="1" cellpadding="3" cellspacing="3" align="center" width="100%">
    <%
        Dim iRows
        Dim iCols
        For iRows=1 To iNumRows Step 1
    %>
            <tr>
                <%
                    For iCols=1 To iNumCols Step 1
                %>
                        <td>&nbsp;</td>
                <%
                    Next
                %>
            </tr>
    <%
        Next
    %>
</table>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Columns & Dynamic Grouping ??? nileshgambhava BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 1 March 24th, 2008 07:58 AM
help writing dynamic form data to dynamic table ublend SQL Server ASP 1 June 1st, 2007 08:09 AM
help writing dynamic form data to dynamic table ublend Classic ASP Professional 1 June 1st, 2007 08:08 AM
Sum of sub-matrix of a matrix Gromlok Java Basics 0 March 4th, 2007 03:45 PM
Dynamic Checkboxes using dynamic Select Values bsheridan Classic ASP Databases 0 March 12th, 2006 10:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.