Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reendering ASP page from WWC
Message
De
13/09/2005 01:57:43
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
12/09/2005 22:16:57
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Divers
Thread ID:
01049008
Message ID:
01049027
Vues:
19
>Is there a way from WWC to reender an ASP from VFP? I would like to generate the resulted HTML code and send that instead of using a window.location redirect.

I'm not exactly sure if this is what you're asking. I prepare content HTM and driectly write to Response. ie:
* Write some content
set textmerge to memvar m.HTMLContent noshow
set textmerge on
\<Table border="1">
\ <tr><th>Name</th><th>Address</th></tr>
 for ix=1 to alen(aNames,1)
\ <tr><td><<aNames[m.ix,1]>></th><th><<aNames[m.ix,2]>></th></tr>
 endfor
\</table>
set textmerge off
set textmerge to


		loHTMLHeader = Createobject('wwHTMLHeader',Response)
		loHTTPHeader = Createobject('wwHTTPHeader',Response)
		This.PrepHeader(loHTTPHeader, loHTMLHeader, 'My Title')
		With Response
			.HTMLHeaderEx(loHTMLHeader,loHTTPHeader)
			.FastWrite(m.HTMLContent)
			.HTMLFooter()
		Endwith


Procedure PrepHeader
	Lparameters toHTTPHeader, toHTMLHeader, tcTitle, tcBodyTag
	With toHTTPHeader
		.DefaultHeader()
		*		.AddForceReload()
		*		.CompleteHeader()
	Endwith
	With toHTMLHeader
		.cHeadSection = .cHeadSection+;
			[<META HTTP-EQUIV="Pragma" CONTENT="no-cache">]+CRLF+;
			[<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">]+CRLF+;
			[<META HTTP-EQUIV="Expires" CONTENT="0">]+CRLF
		.AddTitle(m.tcTitle)
		.AddJavaScript('function nothing() {}')
		tcBodyTag = Iif(!Empty(tcBodyTag),tcBodyTag,BODYTAG)
		.cBodyTag = Stuff(tcBodyTag, Rat('>',tcBodyTag),1,' onUnload="nothing();">')
	Endwith
Endproc
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform