Hi there,
I'm getting the following error on my site;
Microsoft VBScript compilation error '800a03f2'
Expected identifier
/includes/pagecontent.asp, line 2
Public Class Article
-------^
The above include is referenced in my page as follows;
<%
Dim article : Set article = GetArticle(22)
%>
<!--#include virtual="/includes/pagecontent.asp" -->
<h1><%=article.Title%></h1>
<div><%=article.Content%></div>
I was wondering if anyone might be able to help me resolve this one? I've read a few posts about changing virtual to file, but this is not useful for me in my site structure.
The pagecontent.asp looks like this;
Public Class Article
public ID
public Title
public Content
End Class
Function GetArticle(article)
Dim conn: Set conn = Server.CreateObject("ADODB.connection")
conn.Open Application("database")
Dim cmd: Set cmd = Server.CreateObject("ADODB.command")
Dim rsArticle
cmd.ActiveConnection = conn
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "prc_getArticle"
cmd.Parameters.Append cmd.CreateParameter("@ArticleID", adInteger, adParamInput,, article)
Dim rsArticle: Set rsArticle = cmd.Execute
IF Not rsArticle.EOF Then
Set GetArticle = new Article;
GetArticle.ID = rsArticle.fields("art_id")
GetArticle.Title = rsArticle.fields("art_title")
GetArticle.Content = rsArticle.fields("art_content")
Else
Set GetArticle = Nothing
End If
rsArticle.Close()
End Function