How to use Respone.Redirect inside An UpdatePanel in ASP.NET 2.0.
When we are creating any Web Application in ASP.NET 2.0, we need to use AJAX Extension for using Update Panel. In one of our projects (Web Application using ASP .NET 2.0), we had a Submit button inside an UpdatePanel and onClick event of that button, we were redirecting to another page using Response.Redirect. But strange thing was that on button click, the below error was thrown.
To make Response.Redirect work inside Update Panel, we need to add below in our web.config.
Basically when we are developing web application using Visual Studio 2005, two options are available. Please see the image below
If we create our web application by selecting ASP.NET Web Application, then we need to do everything manually for using AJAX Extension.
If we create our web application by selecting ASP.NET AJAX-Enabled Web Application, then no need to add manually. Everything will be added automatically in web.config also. So at this case we have no problem. But for the above case, we need to take care of this thing.