Forum Moderators: open
I want someone who's working from home be able to log into our website and run a page the allows him to create content for us which also creates a .ASP file on the fly making the new content available straight away.
I've got almost everything working but there's just one thing (isn't there always) that I cannot sort out and it's driving me crazy. The problem is with adding "'s into a string that is contained within quotes.
The sample code below works:
<%
DepotName = "Belfast"
dim fs,fname
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fname=fs.CreateTextFile("D:\Websites\WEBSITE\test.asp",true)
fname.WriteLine("<!-- #include file=""ConnectionString.asp""-->")
fname.WriteLine("strDepotName=""MICK"" ")
fname.Close
set fname=nothing
set fs=nothing
%>
The line with MICK in it allows the text file to be created but I would like to have a DepotName variable in there so that the resulting line reads strDepotName = "Belfast"
I've tried putting <%=DepotName%> in there but that didn't work...what am I missing?
Any help gratefully received.
Thanks
Mick