Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy Sting Variable Question

Status
Not open for further replies.

Jables

Programmer
Aug 28, 2001
148
US
What is the correct syntax for defining a string variable on a page.

Here's what I'm doing

Dim varwriter
varwriter = "clay"

The server doesn't like this and it keeps giving me an error.

 
You don't define strings in ASP, they are variants. What you have is correct for putting a string into a variant assuming that you specified Language=VBScript.
This what I use
Code:
<%@ Language=VBScript EnableSessionState=False %>

<%
Option Explicit
response.buffer = true
response.expires = 0
%>
<%
dim strkey
dim strFirstName
dim strLastName
dim strproductCode
%>
Compare Code (Text)
Generate Sort in VB or VBScript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top