P
Phil Grimpo
I have an application where users create pages using a WYSIWYG editor and
the content is stored in the database. For "custom tags" the stored html
will have something like {%Contact_Form%}.
So let's say the html of the page is:
<body>
<html>
This is my form:<br>
{%Contact_Form%}
</html>
<body>
Ok? Then, when the page renders I do this:
<%
RenderedData = rs_Page("MainData")
RenderedData =
Replace(RenderedData,"{%Contact_Form%}",Server.Execute("/IncludedFiles/PageComponents/TESTFORM.asp"))
%>
<%=RenderedData%>
Ok. The problem is this, when the page renders, the contact form is
inserted BEFORE the text where as my original "string" should have had the
form AFTER the text. When I don't use Server.Execute and just replace with
some dummy text or something, everything renders in the appropriate order.
I've done tests where the TESTFORM.asp page just has some text in it and the
same results happens (concluding that it's not a problem with the coding in
that page)
Any ideas on why this isn't rendering in the appropriate order? Shouldn't
the "custom tag" be just simply replace with the html in this included file?
Is there another way to call this file so this works?
thanks for any help.
-Phil
the content is stored in the database. For "custom tags" the stored html
will have something like {%Contact_Form%}.
So let's say the html of the page is:
<body>
<html>
This is my form:<br>
{%Contact_Form%}
</html>
<body>
Ok? Then, when the page renders I do this:
<%
RenderedData = rs_Page("MainData")
RenderedData =
Replace(RenderedData,"{%Contact_Form%}",Server.Execute("/IncludedFiles/PageComponents/TESTFORM.asp"))
%>
<%=RenderedData%>
Ok. The problem is this, when the page renders, the contact form is
inserted BEFORE the text where as my original "string" should have had the
form AFTER the text. When I don't use Server.Execute and just replace with
some dummy text or something, everything renders in the appropriate order.
I've done tests where the TESTFORM.asp page just has some text in it and the
same results happens (concluding that it's not a problem with the coding in
that page)
Any ideas on why this isn't rendering in the appropriate order? Shouldn't
the "custom tag" be just simply replace with the html in this included file?
Is there another way to call this file so this works?
thanks for any help.
-Phil