Posted on: 6/19/2013 3:50:47 AM | Views : 389

Hi,
I'm working on a web app originally developed in webforms; now many features being added are developed in MVC. So I find myself in a situation that in a code behind (.aspx.cs), I need to a controller action, just to run the logic defined in the controller action, WITHOUT any view file - I'm not sure how to achieve this.
Here is my code in the .aspx.cs file:
public void OnLoggedIn(object sender, EventArgs e)
{
     this.Response.Redirect("~/Product/Login"); // Note: I know this line of code will NOT acheive what I want; it now looks for a view file, while the controller action "~/Product/Login" will just perform the logic I wanted, but no view file. Is there a command similar to "this.Response.Redirect", but instead of redirect, will just call the controller action and run it?
}
Thanks,
Claudia
...

Go to the complete details ...