Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
ASPProtect Version 8.x Support
 CJWSoft Support Info : ASPProtect Version 8.x Support
Subject Info: response.write A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
alanelli
New User
New User
Avatar

Joined: July/03/2008
Online Status: Offline
Info: 9
Added: July/20/2008 at 5:59pm | IP Logged Quote alanelli

Can anyone tell me how to complete the response.write line to include the group protection code below...

  <%
   host=lcase(request.servervariables("HTTP_H OST"))
   SELECT CASE host
   CASE "aaa.mydomain.com"
   response.write " <% GROUPACCESS = ""1"" %> " & vbcrlf
   CASE "bbb.mydomain.com"
   response.write " <% GROUPACCESS = ""2"" %> " & vbcrlf
   CASE ELSE
   response.write ""
   END SELECT
  %>

If I leave it as above, i get an "Unterminated string constant " error, of course.

Any help is much appreciated...

A..

 

Back to Top View alanelli's Profile Search for other info by alanelli
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: July/20/2008 at 6:10pm | IP Logged Quote cwilliams

that's because you can not response write ASP Code Delimiters. It is because the ASP engine tries to parse all the <%%> blocks first...

<% and %> cannot be within a response. write

http://classicasp.aspfaq.com/general/how-do-i-embed-asp-deli miters-lt-or-in-a-string.html

 



__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
alanelli
New User
New User
Avatar

Joined: July/03/2008
Online Status: Offline
Info: 9
Added: July/20/2008 at 6:16pm | IP Logged Quote alanelli

Thank you very much Chris...

Sorry to take your time with these very basic ASP issues tho.

I appreciate your help alot.

Thx again.

Back to Top View alanelli's Profile Search for other info by alanelli
 
alanelli
New User
New User
Avatar

Joined: July/03/2008
Online Status: Offline
Info: 9
Added: July/20/2008 at 7:43pm | IP Logged Quote alanelli

If anyone's interested, I concluded this small code customization with the following solution:

==============
<%@ LANGUAGE="VBSCRIPT" %>

<% Dim host
host = request.servervariables("HTTP_HOST")

If host = "aaa.mydomain.com" Then
GROUPACCESS = "1"

elseIf host = "bbb.mydomain.com" Then
GROUPACCESS = "2"

end if %>

===========================

Hope this helps anyone in any way.

Good day............

A.

==============

Back to Top View alanelli's Profile Search for other info by alanelli
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area


Active Server Pages help tutorial how to ASP Help ASP Tutorials ASP Programming ASP Code - ASP Free CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.powerasp.com,www.aspclassifieds.com,www.aspphotogallery.com,www.codewanker.com