Can I use DoEvents in .NET Server Side VB code?

  • Thread starter Thread starter Jim Mitchell
  • Start date Start date
J

Jim Mitchell

I find that some code (like saving cookies) is not processed before a
server.transfer in VB. I was thinking I could use DoEvents, but Visual
Studio does not seem to take it?

Listed below is the code...

Thanks in advance

DoEvents()

Server.Transfer(call_string)
 
I find that some code (like saving cookies) is not processed before a
server.transfer in VB. I was thinking I could use DoEvents, but Visual
Studio does not seem to take it?

Listed below is the code...

Thanks in advance

DoEvents()

Server.Transfer(call_string)

try calling the static Sleep() method on the Thread class...

Thread.Sleep();

....which passes control of the processor to the next thread.
 
DoEvents does a window loop on a windows based app. there is no window loop
on asp.net as its a service process.

this has nothing to do with cookies. cookies are stored and sent by the
browser. if you do a server.transfer, you have the same request object (and
same cookies) as the inital page, the new cookies set by the first page are
in the response (as they have not yet been sent to the client).

-- bruce (sqlwork.com)
 
Back
Top