Author Topic: Classic ASP embedded colour coding not working.  (Read 1807 times)

Satchmo

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Classic ASP embedded colour coding not working.
« on: October 22, 2015, 02:19:37 pm »
Hi
I've just upgraded from version 2008 to 2014.
The colour syntax highlighting for embedded ASP in HTML pages is not working.
I have tried importing my old uscheme.ini file but it makes no difference.
This is a killer for me as I am maintaining a lot of legacy ASP code.
Is this a known bug?

Cheers
Satchmo

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5714
  • Hero Points: 457
Re: Classic ASP embedded colour coding not working.
« Reply #1 on: October 22, 2015, 03:40:03 pm »
Please post a small sample. Thanks

A picture of the color coding would be helpful too.
« Last Edit: October 22, 2015, 08:34:48 pm by Clark »

Satchmo

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Classic ASP embedded colour coding not working.
« Reply #2 on: October 23, 2015, 09:13:17 am »
OK.. here a bit of sample code
<% @Language="VBScript" %>
<% OPTION EXPLICIT %>
<% Response.Buffer = True %>
<% Session.LCID = &H0809 %>
 
<!-- #include virtual= "/includes/asp/constants_inc.asp" -->
<!-- #include virtual= "/includes/asp/enumerations_inc.asp" -->
<!-- #include virtual= "/includes/asp/functions_inc.asp" -->

<%

'Call subFlushCache
'Call subSessionTimeOut(Session("USER"),"/timout.asp")
Dim strSQL,objConn,objRS

Dim strFID : strFID = Request.QueryString("fid")

strFID = fnReconstruct(strFID)

Call subDB_OpenConn(objConn)

strSQL = "SELECT Stuff,User,DateCreated,Decription FROM myTable Where myTableID = " & strFID

Set objRS = objConn.Execute(strSQL)
If (objRS.EOF and objRS.BOF) Then
   Response.Write "<h1>Error: The query returned no data!</h1>"
   Call subDB_CloseConn(objConn,objRS)
   Response.End
End If
%>

<!-- #include virtual= "/includes/asp/head_inc.asp" -->

<body class="page">
   <h1 class="formH1">Test</h1>
   <div class="qsection">
   <fieldset class="qfieldset" title="">
   <legend>
   Some stuff goes here
   </legend>

     Form Ref: <%=objRS("stuff")%> Created: <%=objRS("DateCreated")%> by <%=objRS("User")%>

<div class="bottomPad">&nbsp;</div>

<!-- #include virtual= "/includes/asp/foot_inc.asp" -->

<%
Call subDB_CloseConn(objConn,objRS)
%>

The weird this is that I opened an asp file this morning with the problem, when I saved it under a new name, the correct highlighting just suddenly started working properly(?).

I'll see if I can get replicate the issue again and send you the details.

Satchmo

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Classic ASP embedded colour coding not working.
« Reply #3 on: October 23, 2015, 10:16:34 am »
OK got repeatable process that going on.

I load up the script that is not colouring correctly . I save it under a new name, but with the same extension (.asp) and bingo.. the highlighting (HL) now works. I now save the newly named file back to the original name, overwriting the original file.. and boom.. the HL is back to the wrong type.  So again I rename the file and the HL comes back properly.  I then copy and paste the content of the new file into notepad and delete both .asp files. I create a new blank asp file and copy the contents back from notepad into the complete new file and save it with the original filename.. load it up and the HL is wrong.. save it to a new filename and the correct HL is back.
This is giving me a headache so I'm going back to VSE2008 for the short terms  :(

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5714
  • Hero Points: 457
Re: Classic ASP embedded colour coding not working.
« Reply #4 on: October 23, 2015, 11:56:12 am »
It sounds like the language mode is incorrect.

The language mode is saved per file. After opening the problem file, go to Document>Select Mode and set the mode to HTML.

If that fails, try launching SlickEdit with a clean config (vs -sc f:\tempconfig).

Satchmo

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Classic ASP embedded colour coding not working.
« Reply #5 on: October 26, 2015, 09:37:37 am »
Thanks very much for your help Clark.
I launched with the clean config and then explicitly set the mode to HTML and everything is working fine now  :)