G
Guest
Hi,
I'm using Threads, and when I try to do Server.Transfer, I recieved an
error. (child object does not exist...)
My Code:
Dim t As New Thread(AddressOf Hilo)
Private Sub Hilo()
Thread.Sleep(1000)
Server.Transfer("Index.aspx")
end Sub
In Page Load I use:
t.Start()
The Thread works fine, but fails in Server.Transfer. I notice
Httpcontext.current is nothing inside "Private Sub Hilo()", but it isn't in
PageLoad, so the sentence Server.Transfer fails.
I've tried to declare a httpcontext variable and set the value of
httpcontext.current in page load.
i.e. Dim HT as httpcontext
And inside PageLoad:
HT = httpcontext.current.
It works in pageload, but inside Sub Hilo, HT is nothing as well.
Any Idea?
I'm using Threads, and when I try to do Server.Transfer, I recieved an
error. (child object does not exist...)
My Code:
Dim t As New Thread(AddressOf Hilo)
Private Sub Hilo()
Thread.Sleep(1000)
Server.Transfer("Index.aspx")
end Sub
In Page Load I use:
t.Start()
The Thread works fine, but fails in Server.Transfer. I notice
Httpcontext.current is nothing inside "Private Sub Hilo()", but it isn't in
PageLoad, so the sentence Server.Transfer fails.
I've tried to declare a httpcontext variable and set the value of
httpcontext.current in page load.
i.e. Dim HT as httpcontext
And inside PageLoad:
HT = httpcontext.current.
It works in pageload, but inside Sub Hilo, HT is nothing as well.
Any Idea?