[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

How to create zip file to download in JSP- Servlet

How to create DataGrid or GridView in JSP - Servlet

Pinging in ASP.NET Example