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

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)
 
M

Michael Lang

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.
 
B

bruce barker

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top