Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics 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 September 17th, 2004, 10:53 AM
Registered User
Join Date: Sep 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sending output to HTML table

When using the Response.Write command, I also want to use a table to help with the alignment of my reply to the user.
Yes I'm a student.
Yes I'm new at programming.
Any help is appreciated.

Old September 17th, 2004, 11:13 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts


Response.Write also outputs markup:

Response.Write("<table cellspacing='0' cellpadding='0' ...")

You can also pass in variables to the markup

Dim strText
strText = "some text"

Response.Write("<input type='text' id='txtResults' value='" & strText & "'>")

You can also do in the ASP page (if you have the values in variables:

Dim strValue
strValue = Request.Querystring("qsvalue")

<table cellspacing='0'>
<tr><td><%= strValue %></td></tr>

Old September 17th, 2004, 07:58 PM
Friend of Wrox
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post

read this article



Old September 20th, 2004, 10:02 AM
Registered User
Join Date: Sep 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

Here is the code from my .asp file.
All that works is the H3.

The link to the html is:

<%Option Explicit%>
<head><title>Cost of Carpet</title></head>
<H3>Your Carpet Estimate</H3>
Dim intIname,intLroom,intWroom,intrmarea,intCost,intsu bttl,inttax,intgrndttl

Response.Write "Sold to: "&intIname&"<br>"
Response.Write "<table border='3' cellpadding='3' cellborder='3' width='80%'>"
Response.Write "<tr>"
Response.Write " <td width='10%' align='center'><B>Length</B></td>"
Response.Write " <td width='10%' align='center'><B>Width</B></td>"
Response.Write " <td width='15%' align='center'><B>Square Feet</B></td>"
Response.Write " <td width='20%' align='center'><B>Cost/Square Foot</B></td>"
Response.Write " <td width='35%' align='center'><B>Cost of Carpet</B></td>"
Response.Write " </tr>"
Response.Write " <tr>"
Response.Write " <td width='10%' align='center'>"&intLroom&"</td>"
Response.Write " <td width='10%' align='center'>"&intWroom&"</td>"
Response.Write " <td width='15%' align='center'>"&intrmarea&"</td>"
Response.Write " <td width='20%' align='center'>"&intCost&"</td>"
Response.Write " <td width='35%' align='center'>"&intsubttl&"</td>"
Response.Write " </tr>"
Response.Write " <tr>"
Response.Write " <td colspan=4 align='center'><B>TAX</B></td>"
Response.Write " <td width="35%" align='center'>"&inttax&"</td>"
Response.Write " </tr>"
Response.Write " <tr>"
Response.Write " <td colspan=4 align='center'><B>TOTAL</B></td>"
Response.Write " <td width='35%' align='center'>"&intgrndttl&"</td>"
Response.Write " </tr>"
Response.Write "</table>"

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending data to the audio-output device BrianWren VB How-To 2 January 11th, 2007 06:46 PM
XSL html output problem aiyer0912 XSLT 11 November 8th, 2006 07:19 AM
jsp - input/output - html?? tra77 JSP Basics 0 April 14th, 2006 04:35 AM
XLS output to CHTML instead of HTML athanatos XSLT 1 February 9th, 2005 06:29 AM
Web Service HTML Output km0ti0n .NET Web Services 1 April 6th, 2004 11:54 AM

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