Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old September 17th, 2004, 10:53 AM
Registered User
 
Join Date: Sep 2004
Location: , , .
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.

  #2 (permalink)  
Old September 17th, 2004, 11:13 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

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>
</table>

Brian
  #3 (permalink)  
Old September 17th, 2004, 07:58 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default


read this article

http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=178

Rajani

  #4 (permalink)  
Old September 20th, 2004, 10:02 AM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

The link to the html is:
http://coursework.cl.uh.edu/Inst5735...4/carpet2.html

<%@Language=vbscript%>
<%Option Explicit%>
<html>
<head><title>Cost of Carpet</title></head>
<body>
<H3>Your Carpet Estimate</H3>
<BR>
<%
Dim intIname,intLroom,intWroom,intrmarea,intCost,intsu bttl,inttax,intgrndttl
intIname=Request.form("Iname")
intLroom=Request.form("Lroom")
intWroom=Request.form("Wroom")
intrmarea=(intLroom*intWroom)
intCost=Request.form("Cost")
intsubttl=Round((intrmarea*intCost),2)
inttax=Round((intsubttl*.0825),2)
intgrndttl=Round((intsubttl+inttax),2)

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>"
%>
</body>
</html>



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.