You work as the developer in an IT company. Recently your company has a big customer. The customer runs a large supermarket chain. You're appointed to provide technical support for the customer. Now according to the customer requirement, you create a Web Form which calls a method as part of its processing. It takes a long time for the method to process. Besides this, you notice that the other Web Forms in the ASP.NET Web site are now processing slowly. You have to execute the long running method in parallel to other requests to reduce the page response times. So what should you do?
A. You have to call the method within the PreInit and PreRenderComplete page events.
B. You have to call the method by using the BeginGetAysncData and EndGetAsyncData delegates.
C. You have to set the CompilationMode attribute to Always inside the page directive of the Web Form that calls the method.
D. You have to set the Async attribute to True inside the page directive of the Web Form that calls the method.
Answer:B
You work as the developer in an IT company. Recently your company has a big customer. The customer runs a large supermarket chain. You're appointed to provide technical support for the customer. Now according to the customer requirement, you create a Web Form which calls a method as part of its processing. It takes a long time for the method to process. Besides this, you notice that the other Web Forms in the ASP.NET Web site are now processing slowly. You have to execute the long running method in parallel to other requests to reduce the page response times. So what should you do?
A. You have to call the method within the PreInit and PreRenderComplete page events. B. You have to call the method by using the BeginGetAysncData and EndGetAsyncData delegates. C. You have to set the CompilationMode attribute to Always inside the page directive of the Web Form that calls the method. D. You have to set the Async attribute to True inside the page directive of the Web Form that calls the method.