[Fix]Asynchronous operations are not allowed in this context

Asynchronous operations are not allowed in this context. Page starting an
asynchronous operation has to have 
the Async attribute set to true and an asynchronous operation can only be
started on a page prior to PreRenderComplete event.

The error above occurs when you try to call the method on web service asynchronously.
The solution is to add Async equal to true in your .aspx page.

<%@ Page Title="" Language="C#" MasterPageFile="~/Application/Site1.Master" 
AutoEventWireup="true" Async="true"    %>

The above solution will solve the error throw. 

Popular posts from this blog

Example to disable save as certain file type in SSRS Report Viewer

Phone book application example - Java

Modal Popup Message Box ASP.NEt C# Example