Software Technology Tips

How to use Respone.Redirect inside An UpdatePanel in ASP.NET 2.0.
 
Issue:
 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.
 
UpdatePanelResponeError
Solution:
 To make Response.Redirect work inside Update Panel, we need to add below in our web.config.
 
<httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </httpModules>
 
More Info:
 
Basically when we are developing web application using Visual Studio 2005, two options are available. Please see the image below
 
VS
 
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.
 
 
 


Related Tags:

ASP.N ET, Update Panel

Author: Himanshu Sahu

ASP.NET

Let us Connect!

iso 9001 QA25 Red Herring STPI D&B Fastest Growing SME 2013 Award zinnov Nasscom

This site uses cookies. We respect your privacy.copyright (c) Mindfire Solutions 2007-2015. Login