I have a non controller file called MyLib.cs in this I have a method that on given condition I want it to redirect to a page.
I used: “RedirectToAction()” but I got an error saying it dose not exist in current context.
Any ideas what I should use?
Thanks!
I think you can use Response.Redirect here.
Consider this code
Give it a try and let us know if it worked.
P.S: don’t forget to mark as answer if this answer really helped you, thanks.