Solved

response.redirect from a class

Posted on 2010-08-17
3
272 Views
Last Modified: 2012-06-27
Hi

Is there a way to call Response.Redirect from a class?

I am getting an error the name 'Response' does not exist in the current context. Is this because I am not calling the response from an aspx page?

Thanks.
0
Comment
Question by:elmbrook
3 Comments
 
LVL 12

Accepted Solution

by:
Ramkisan Jagtap earned 200 total points
ID: 33461555
Please try this one:
System.Web.HttpContext.Current.Response.Redirect(" SomePage.aspx");

Regrds,
Ram
0
 
LVL 27

Assisted Solution

by:nmarun
nmarun earned 150 total points
ID: 33461596
Try something like:

HttpContext.Current.Response.Redirect("redirectUrl");

Arun
0
 
LVL 14

Assisted Solution

by:Dhanasekaran Sengodan
Dhanasekaran Sengodan earned 150 total points
ID: 33463163
HttpContext.Current.Response.Redirect("SomePage.aspx", true);
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
designing in object programming 12 80
2 questions 10 25
Latest thoughts on C# utilizing Mono on Linux vs .NET on Windows? 5 30
MailAddress in vb 4 17
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question