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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expected Statement

Status
Not open for further replies.

incron

Technical User
Mar 16, 2002
60
US
Guys I an running Svr 2003 on a dedicated server I have a file and in the file is this simple code:

<%@ Language=VBScript %>
<%
option explicit
Response.Expires = -1
Server.ScriptTimeout = 600
' All communication must be in UTF-8, including the response back from the request
Session.CodePage = 65001

%>


If I put anything below those lines I get an Expected Statement error, it does not matter what it is, for example I have tried:

<%@ Language=VBScript %>
<%
option explicit
Response.Expires = -1
Server.ScriptTimeout = 600
' All communication must be in UTF-8, including the response back from the request
Session.CodePage = 65001

%>

<% <div> </div> %>





I have also tried:

<%@ Language=VBScript %>
<%
option explicit
Response.Expires = -1
Server.ScriptTimeout = 600
' All communication must be in UTF-8, including the response back from the request
Session.CodePage = 65001

%>



<%
</form>Email Address:<input type="text" name="email" /></form>
%>




the result is the same,anything I put in ASP tags is rejected unless it is straight asp code such as :

<%Response.write("Warning - file(s) being uploaded with identical file names will be overwritten and replaced!")%>

I cant use DIVs or Forms,or image tags any ideas, virus maybe?
 
Anything between <% and %> lives on the server side. Anything outside that is shown on you web page.
Code:
<%@ Language=VBScript %>
<% 
option explicit 
Response.Expires = -1
Server.ScriptTimeout = 600
' All communication must be in UTF-8, including the response back from the request
Session.CodePage  = 65001

%>
<!-- this is on the HTML page so no < % and % > -->
<form>Email Address:<input type="text" name="email" /></form>
<%
' back to the server
response.write ("Hey it works<br/>")
%>
<!-- back to the HTML page -->
Of course it does<br/>
 
xwb - thank you I am new to asp. Sorry about the late reply. I now have a better understanding of how asp works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top