Hello all!
I'm putting together an ASP page that uses VBScript to read in a text file and puts it up on the page. I'm also trying to design it so that if the text is past a certain length, the VBScript will cut off the end, stick it onto a second ASP page and create a link to it on the initial page. Here's the code I've been working on (in skeleton form):
<%
Dim fso, f
Dim text
Dim text1
Dim text2
Dim counter
counter = 1
Set fso = CreateObject("Scripting.FileSystemObject"
Set f = fs
penTextFile("c:\inetpub\ 1)
text = f.ReadAll
Session("text"
= text
Session("counter"
= counter
If screenWidth => 1024 Then
Do Until Len(text) < 5500
Session("text" & Session("counter"
) = Left(Session("text"
, 5500)
Session("text"
= Mid(Session("text"
, 5501, Len(Session("text"
))
Response.Write Session("text" & Session("counter"
)
Session("counter"
= Session("counter"
+ 1
Loop
Session("text" & Session("counter"
) = text
Response.Write Session("text" & Session("counter"
)
Session("counter"
= Session("counter"
+ 1
Else
Response.Write Session("text"
End If
%>
Can someone tell me how I can do that?
Thanks,
Jisoo22
I'm putting together an ASP page that uses VBScript to read in a text file and puts it up on the page. I'm also trying to design it so that if the text is past a certain length, the VBScript will cut off the end, stick it onto a second ASP page and create a link to it on the initial page. Here's the code I've been working on (in skeleton form):
<%
Dim fso, f
Dim text
Dim text1
Dim text2
Dim counter
counter = 1
Set fso = CreateObject("Scripting.FileSystemObject"
Set f = fs
text = f.ReadAll
Session("text"
Session("counter"
If screenWidth => 1024 Then
Do Until Len(text) < 5500
Session("text" & Session("counter"
Session("text"
Response.Write Session("text" & Session("counter"
Session("counter"
Loop
Session("text" & Session("counter"
Response.Write Session("text" & Session("counter"
Session("counter"
Else
Response.Write Session("text"
End If
%>
Can someone tell me how I can do that?
Thanks,
Jisoo22