Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ExpandTemplate() way of doing things
Message
De
20/10/2001 17:50:02
 
 
À
20/10/2001 17:33:01
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Divers
Thread ID:
00571366
Message ID:
00571371
Vues:
14
Michel,

In addition to the previous message, also note that you can specify the optional 4th parameter to ExpandTemplate (llNoOutput) as .T. to stop it from sending directly to the HTTP stream. This means that you can store the resulting HTML from several ExpandTemplate calls into vars and then combine them together to send out with Response.Write or whatever...
llNoOutput
Optional - if .T. output is returned to string and no HTTP stream output is created 
>When calling ExpandTemplate(), this generates an header of its own. The problem is what if we need to add a cookie after we have called ExplandTemplate(). There is already an header. As far as I know, from all the threads I have read, it seems that the only way to create a cookie in WWC, is the create a header and write that header. Which means, we will end up with two headers. And, this is exactly what happens.
>
>How to solve this problem?
>
>Some will say that we should only call that function once and call it with the parameter of the header which could include the cookie. I don't believe in that. In several projects, I need to call that function at least two times per call before returning the content to the user. And, we are also adding some HTML on our own. And, then, after, the business logic might decide to add or not a cookie. That is a situation.
>
>By default, once the process kicks in, we have access to Response, Request, Server and Session objects. But, where's the header. If there would be one, we could have access to it from anywhere and just add items to it. It seems that when we want to do it we have to create the object. If that would be the case, and if ExpandTemplate() would not deal with that, we would be ok. Having them independent would make things a lot easier.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform