troubleshooting Question

how to add to text to asp display

Avatar of tmurray22
tmurray22 asked on
13 Comments1 Solution380 ViewsLast Modified:
I have an asp page that dipaly two values , then has a form underneath.
I want to change add some text to my values.


currently displays


I want it to say

welcome "name"
you currently have "value" points in your account

here is my code

<title>My First ASP Page</title>
<body bgcolor="white" text="black">

'Dimension variables
Dim adoCon         'Holds the Database Connection Object
Dim rsGuestbook   'Holds the recordset for the records in the database
Dim strSQL          'Holds the SQL query to query the database  
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=letmein; DBQ=" & Server.MapPath("\SCM\fpdb\ptdb\users.mdb") & ";Persist Security Info=False"

'Create an ADO recordset object
Set rsGuestbook = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT totals.Name, totals.TotalAmount FROM totals;"
'Open the recordset with the SQL query
rsGuestbook.Open strSQL, adoCon
'Loop through the recordset
Do While not rsGuestbook.EOF
           'Write the HTML to display the current record in the recordset
     Response.Write ("<br>")
     Response.Write (rsGuestbook("Name"))
     Response.Write ("<br>")
     Response.Write (rsGuestbook("TotalAmount"))
     Response.Write ("<br>")

     'Move to the next record in the recordset


'Reset server objects
Set rsGuestbook = Nothing
Set adoCon = Nothing
<!-- Begin form code -->
 <form name="FrontPage_Form1" method="post" action="add_to_guestbook.asp" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript">
     <p align="center">&nbsp;Selection: <select size="1" name="Selection">
>>>>> following line splitted for readability of the question - modulo CS Moderator <<<<<<<
     <!--webbot bot="Validation" s-data-type="Number" s-number-separators=",.
" i-maximum-length="3" s-validation-constraint="Greater than or equal to" s-validation-value="1"
 s-validation-constraint="Less than or equal to" s-validation-value="500" -->
     <input type="text" name="amount" maxlength="3" size="3">
     <p align="center">
     <input type="submit" name="Submit" value="Submit">

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros