View Full Version : displaying html from a string

01-24-2005, 09:26 PM
hello, i have the html of a page as a string and

Dim sFileExt
sFileExt = strRetval
sFileExt = Left(strRetval, 3667)
Response.Write sFileExt

display 3667 from the left side of the string, which doesn't fit the situation any more. How can i remove the first 3200 characters from the begining of the string instead.

Thanks in advanced!

01-24-2005, 10:33 PM
Try This

Dim sFileExt, i, x
i = Len(strRetval) 'the length of the string
REM make sure the string is over 3200 characters to prevent an error
If i > 3200 Then x = i-3200
sFileExt = Mid(strRetval, 3200, x) 'will return all the string after the 3200th character
Response.Write sFileExt

01-25-2005, 01:18 PM
removing starting characters from the string can be done like this:

strSomething = "oh! hello"
strSomething = Right(strSomething, Len(strSomething)-4)

which should select everything but the first 4 characters, returning "hello"