>I agree that the cookie header manipulation is cumbersome.
>
>What I have done in these instances is to use STRTRAN to write the HTML cookie code into the template. You could use:
>
lcWholeShebang=o.ExpandTemplate(lcPageName, lcContentType, llTemplateString, .T.)
>lcWholeShebang=STRTRAN(lcWholeShebang,PlaceHolder,lcCookieString)
>Response.Write(lcWholeShebang)
>
>In fact, I use this technique for everything ExpandTemplate does.
Well, in fact, the technique I proposed won't work. ExpandTemplate() does write the header immediately. So, it is not available for string manipulation after. I can't change all the places I am calling ExplandTemplate() as this is the same situation on several projects. So, basically, we don't have a solution right now.
So, that technique assumes we wrote our own header. Then at the end, Reponse.Write() will send it to the HTTP server. In that case, we have control to do string manipulation on the HTTP header section of the HTML code itself. But, not as it is right now.