Interview Questions

Explain differences between server.transfer and server.execute method?

.NET Database ,COM interop,and .NET deployment questions and answers


(Continued from previous question...)

Explain differences between server.transfer and server.execute method?

Answer1:
server.transfer-> transefers the server’s control to the requested page given in the parameter.
server.Execute-> executes the requested page from the current page itself,with no change in the address bar. after execution the next line of code is executed in the current page.

Answer2.
Execute method returns control to the page in which it is called once the page specified in the Execute method finishes processing, the Transfer method does not return control to the calling page.

(Continued on next question...)

Other Interview Questions