Hello all!
This is probably pretty simple but it escapes me. On an ASP page, I'm using VBScript to output a server-side include using the Response.Write method. Unfortunately nothing on the webpage comes out, not even an error message. So I think it's partially working, just not outputing the right stuff. Here's the code I have:
<%
Dim fso, f
Dim text
Dim text1
Dim text2
Dim myString
Set fso = CreateObject("Scripting.FileSystemObject"
Set f = fspenTextFile("c:\inetpub\ 1)
text = f.ReadAll
If screenWidth = 1024 Then
If Len(text) > 5500 Then
text1 = Mid(text, 1, 5500)
text2 = Mid(text, 5500, Len(text))
Set f = fso.CreateTextFile("c:\inetpub\ f.Write (text1)
f.Close
Set f = fso.CreateTextFile("c:\inetpub\ f.Write (text2)
f.Close
Response.Write "<!--#include file=" & "text1.txt" & "-->"
Else
Response.Write "<!--#include file=" & "filler.txt" & "-->"
End If
Else
Response.Write"<!--#include file=" & "filler.txt" & "-->"
End If
%>
Can someone help me out real quick?
Thanks,
Jisoo22
This is probably pretty simple but it escapes me. On an ASP page, I'm using VBScript to output a server-side include using the Response.Write method. Unfortunately nothing on the webpage comes out, not even an error message. So I think it's partially working, just not outputing the right stuff. Here's the code I have:
<%
Dim fso, f
Dim text
Dim text1
Dim text2
Dim myString
Set fso = CreateObject("Scripting.FileSystemObject"
Set f = fspenTextFile("c:\inetpub\ 1)
text = f.ReadAll
If screenWidth = 1024 Then
If Len(text) > 5500 Then
text1 = Mid(text, 1, 5500)
text2 = Mid(text, 5500, Len(text))
Set f = fso.CreateTextFile("c:\inetpub\ f.Write (text1)
f.Close
Set f = fso.CreateTextFile("c:\inetpub\ f.Write (text2)
f.Close
Response.Write "<!--#include file=" & "text1.txt" & "-->"
Else
Response.Write "<!--#include file=" & "filler.txt" & "-->"
End If
Else
Response.Write"<!--#include file=" & "filler.txt" & "-->"
End If
%>
Can someone help me out real quick?
Thanks,
Jisoo22