Unable to set Response object in ASP Classic

This line:

set Response = nothing

Error failed

"Microsoft VBScript runtime  error '800a01b6'

Object doesn't support this property or method: 'Response' "

Now I can think of any number of reasons why the engine might not want to let me do such a seemingly stupid thing, but I'm not sure how the missing method can be missing.

EDIT: Here is an example of what I would like to do with this.

class ResponseBufferEphemeron
    private real_response_
    private buffer_

    private sub class_initialize
        set real_response_ = Response
    end sub

    private sub class_terminate
        set Response = real_response_
    end sub

    public function init (buf)
        set buffer_ = buf
        set init = me
    end function

    public function write (str)
        buffer_.add str
    end function
end class

function output_to (buf)
    set output_to = (new ResponseBufferEphemeron).init(buf)
end function

dim buf: set buf = Str("Block output: ") ' My string class '
with output_to(buf)
    Response.Write "Hello, World!"
end with 

Response.Write buf ' => Block output: Hello, World! '
+1
source share
2 answers

You cannot set the answer to anything.

The ASP Response object is used to send output to the user from the server.

What are you trying to do? If you are trying to end a response to a user, use

Response.End
0
source

Well, I found the answer here: http://blogs.msdn.com/b/ericlippert/archive/2003/10/20/53248.aspx

, VBScript , , , Response.Write, , Response, IResponse::Write. .

0

Source: https://habr.com/ru/post/1756282/


All Articles