|
|
|
|
|
| | |
|
Active Server Pages what is asp programming how to sample asp example code scripts software asp forum mail sessions applications global.asa CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Temlates in ASP & SQL |
From: |
Kush Desai |
Date: |
12/23/2000 5:33:10 AM |
IP: |
203.197.9.234 |
Hi Friends,
I have a problem that i havnt been able to find a good solution to and i thought that i would ask my peers.
I am trying to use templates to achieve a clear seperation of presentation layout & data. To achieve this, i have read all available articles on all ASP sites talking bout using templates. They typically use the Replace() to replace the markers with the provided content.
But i have another problem
say i have a table like
<table>
<tr>
<td>Name</td>
<td>Address</td>
</tr>
<tr>
<td>[1]</td>
<td>[2]</td>
</tr>
</table>
here [1] and [2] are the markers.
Typically each marker would be replaced by 1 value.i.e. i can do
for i = 1 to 2
Replace("[} & i & "]",arr[i])
next
where arr is an array i make.
suppose i run a query that returns a dataset with these two columns and the record count is 10. In this case a single Replace() doesnt do the job.
I would like to know if there is another way that i can have a template with the placeholders inside table which get replaced by the dataset.
All comments welcome
Thanks
Kush |
|
|

|
|
|
|
|
|
|
|
|
|