Karla77
asked on
Response.Redirect
I have a application project that has all .cs files. My main project References to the application. In one of my .cs file I have a method that I want to redirect to another page every time it's called. I did Response.Redirect(""); but it says The type or namespace name 'Response' could not be found (are you missing a using directive or an assembly reference?)
Any clue on where to go from here?
Any clue on where to go from here?
hi,
response.redirect will work only if the page is inherited from System.Web.UI.Page
i think u have written Response.reditect in a class file
b u d d h a
response.redirect will work only if the page is inherited from System.Web.UI.Page
i think u have written Response.reditect in a class file
b u d d h a
ASKER
If you can't use Response.redirect in a .cs file is there something like Response.redirect that you can use.
You can use Response.Redirect in a .cs file, you just need to use what I showed above.
System.Web.HttpContext.Cur rent.Respo nse.Redire ct
Bob
System.Web.HttpContext.Cur
Bob
ASKER
I tried that and I still got The type or namespace name 'HttpContext' does not exist in the class or namespace 'System.Web' (are you missing an assembly reference?)
System.Web.HttpContext.Cur rent.Respo nse.Redire ct("");
Is there something else I might have missed?
System.Web.HttpContext.Cur
Is there something else I might have missed?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yes I do.
System.Web.HttpContext.Cur
Bob