HTTPRequest and HTTPResponse does not work in anot

ofusernameu389

New Member
Hi!<BR>I do not succeed to use the objects "Request" and "Response" outside to<BR>the function sub Page_load. Why? I have made many tests and I am successful<BR>to make to work "response" and "request" objects in this way:<BR><BR>Sub Page_Load()<BR> Dim exam As New clsASP(Page)<BR> Call exam.writing()<BR>End Sub<BR><BR>Public Class clsASP<BR> Private oPage As Object<BR><BR> Public Sub New(Page As Object)<BR> oPage = Page<BR> End Sub<BR><BR> Public Sub writing()<BR> oPage.Response.Write("Asp.NET Release ONE")<BR> End Sub<BR>End Class<BR><BR>However I believe that it is not a good code. HELP ME!!!!<BR><BR>Thamk you very mouch<BR>maxG<BR>Do you receive any sort of error...<BR><BR>Or does it not write anything to the browser..?
 
Back
Top