Classic ASP Dynamic Include It works like server-side insertion, but it does it in a different way: at runtime, you can specify the file you want to add at that moment.
<%
' **** Dynamic ASP include
function fixInclude(content)
out=""
if instr(content,"#include ")>0 then
response.write "Error: include directive not permitted!"
response.end
end if
content=replace(content,"<"&"%=","<"&"%response.write ")
pos1=instr(content,"<%")
pos2=instr(content,"%"& ">")
if pos1>0 then
before= mid(content,1,pos1-1)
before=replace(before,"""","""""")
before=replace(before,vbcrlf,""""&vbcrlf&"response.write vbcrlf&""")
before=vbcrlf & "response.write """ & before & """" &vbcrlf
middle= mid(content,pos1+2,(pos2-pos1-2))
after=mid(content,pos2+2,len(content))
out=before & middle & fixInclude(after)
else
content=replace(content,"""","""""")
content=replace(content,vbcrlf,""""&vbcrlf&"response.write vbcrlf&""")
out=vbcrlf & "response.write """ & content &""""
end if
fixInclude=out
end function
Function getMappedFileAsString(byVal strFilename)
Dim fso,td
Set fso = Server.CreateObject("Scripting.FilesystemObject")
Set ts = fso.OpenTextFile(Server.MapPath(strFilename), 1)
getMappedFileAsString = ts.ReadAll
ts.close
Set ts = nothing
Set fso = Nothing
End Function
Function Include(filename)
executeglobal (fixInclude(getMappedFileAsString(filename)))
End Function
%>
<!-- Example of use: -->
<% Include("helloworld.asp") %>
Classic ASP Dynamic Include video tutorial, Coding Archive video tutorial, Classic ASP Dynamic Include Coding Archive tutorial, Classic ASP Dynamic Include Coding Archive watch video, Classic ASP Dynamic Include Coding Archive HD Video, Classic ASP Dynamic Include It works like server-side insertion, but it does it in a different way: at runtime, you can specify the file you want to add at that moment. Coding Archive sample video, Classic ASP Dynamic Include It works like server-side insertion, but it does it in a different way: at runtime, you can specify the file you want to add at that moment. Coding Archive video code , Classic ASP Dynamic Include learning video, Classic ASP Dynamic Include coding video
Coding Archive
In this area, I show advanced ASP - Active Server Pages coding and working styles and coding with MySQL, MSSQL, Oracle and other databases. - See All
For Classic Asp MySql database random data this code is for you! You can use it in all your projects for Mysql database random data that works smoothly and fast.
You can use the code I have given to send mail without any problems with the CDO component. Have peace of mind with this CDO code that works smoothly in your projects :)
You can examine the example of placing a logo on a photo with the Classic Asp ASPJpeg component with this code. You can use the Classic ASP AspJpeg component code piece that will always work for you in all your works.
With this asp vbscript function you can find the first and last day of a month. It is a very fast function that will work in your database filtering operations.