Solved

response.redirect from a class

Posted on 2010-08-17
3
292 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

630 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