Web Connection
RenderAspScript loopback WC 8.1
Gravatar is a globally recognized avatar based on your email address. RenderAspScript loopback WC 8.1
  Marcel DESMET
  All
  Oct 27, 2024 @ 10:09am

Hello,

I don't use scripts in my project. So just play to see how it work's.

Stock HelloScript is ok.

Try to script a pure HTML without any template reference and function in the process. (nPageScriptMode = 3)

A prg is generated and compiled but RenderAspScript loopback

Gravatar is a globally recognized avatar based on your email address. re: RenderAspScript loopback WC 8.1
  Rick Strahl
  Marcel DESMET
  Oct 27, 2024 @ 10:55am

Use Response.ExpandScript() inside of Web Connection code... it uses RenderAspScript() internally but sets up properly.

Otherwise post some sample code please and I'll take a look.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: RenderAspScript loopback WC 8.1
  Marcel DESMET
  Rick Strahl
  Oct 27, 2024 @ 12:14pm

It's ok, my mistake was to use '<%= RenderContent() %>' without a template

This Html page is Ok .

<!DOCTYPE html>
<html>
<body>
<%= RenderSection("content") %>
</body>
</html> 

<% section="content" %>
<% 	
	PUBLIC pcPageTitle
	pcPageTitle = "Hello Script World" 	
%>
<%=  pcPageTitle %>
<% endsection %>

Gravatar is a globally recognized avatar based on your email address. re: RenderAspScript loopback WC 8.1
  Rick Strahl
  Marcel DESMET
  Oct 27, 2024 @ 02:04pm

FWIW you don't need to use PUBLIC in scripts. Scripts turn into FoxPro code so any declaration just follows standard FoxPro code closure rules and default to PRIVATE visible to the script from the declaration down.

+++ Rick ---

© 1996-2025