0
votes

can anyone see why using this code:

<% select case edit
case "specs" %>
<!-- #include file="edits/specs.asp" -->
<%  case "desc" 'LINE 28 HERE %> 
<!-- #include file="edits/desc.asp" -->
<%  case "review" %>
<!-- #include file="edits/review.asp" -->
<%  case "images" %>
<!-- #include file="edits/images.asp" -->
<%  case "floor" %>
<!-- #include file="edits/floor.asp" -->
<%  case else %>
<!-- #include file="edits/main.asp" -->
<%  end select %>

is creating this error: Microsoft VBScript compilation error '800a0400'

Expected statement

/*****.com/edit2.asp, line 28

case "desc" ^

Because it seems ok to me and the blogs I've found about it, (asp isn't exactly my best language though)

1
Please point out line 28 in your code example. Is the included file valid in this page context? - Oded
the include files are located in the correct place for this code, a few lines up is another include which is working fine. - LewiG
one thing to note, includes are processed before anything else, so all of those files need to be pulled in before attempting to run this page. What is in edits/desc.asp, more pertinently, what is the first line? - Richard Benson
edits.php originally contained all the code from the include pages, I have just spilt it up as it was gettign to big. desc.php starts with declaring some varibles and a db connection, but all was working before the move - LewiG
the problem was in specs.asp where i hadn't closed an If staitment (I usually code PHP!) doh! sorry for wasting your time & cheers for input. - LewiG

1 Answers

3
votes
<%

select case edit
  case "specs"
    call server.execute("edits/specs.asp")
  case "desc"
    call server.execute("edits/desc.asp")
  case "review"
    call server.execute("edits/review.asp")
  case "images"
    call server.execute("edits/images.asp")
  case "floor"
    call server.execute("edits/floor.asp")
  case else
    call server.execute("edits/main.asp")
end select

%>