Author: hanimv | Posted on: 2/12/2009 8:32:21 AM | Views : 328

 hi all



I have a class in which any exception occurs I need to redirect to
login page. Since my page is in an iframe Icant use usuall
response.redirect (it will load the whole page in the iframe).
So i used the following



  ((System.Web.UI.Page)System.Web.HttpContext.Current.Handler).ClientScript.RegisterStartupScript

                      (typeof(Employee), "myScript", string.Format("window.parent.location.href='{0}';", strUrl), true);



Employee is the class name. strUrl is login url.



This works perfect except when there is more code to execute after this
statement. In response.redirect the page response is ended so that no
more code is executed. but in this case the whole code is executed
before calling the script. So how to end the response right after thi ...

Go to the complete details ...