Click here to Skip to main content
15,909,953 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I am working on existing ASP.NET WebSite project(Not ASP.NET Web Application).
I want to add MVC on top of my existing project. My current project which is designed by using ASP.NET 4.0.

I do not want to add new MVC project in to the solution, wanted to mix the MVC along with existing functionality developed in ASP.NET itself.

I searched in google but all the result set which was talking about ASP.NET Web Application and MVC like below:
mixing-aspnet-webforms-and-mvc
integrate-webforms-mvc-webapi
But I am more keen to know the solutions on the basis of ASP.NET website only.

Please guide me the steps on how I can mix MVC into ASP.NET website.

Thanks in advance!
Vijay
Posted
Updated 16-Sep-15 1:51am
v2

1 solution

Hello All,

I followed mvc 3 in asp.net website.

However it works perfectly but only issue with this is I need to either enter complete controller url along with parameters if any or on button click server event I needed to give a controller call using Response.Redirect like Response.Redirect("Home/Index");

Please help me on how I can share data from website's aspx page to my controller action method as a parameter? Don't suggest me to use session that is strictly not allowed in my current project because of highest user's.

Thanks in advance!
Vijay
 
Share this answer
 
Comments
F-ES Sitecore 16-Sep-15 8:57am    
You should be able to add params like normal

Response.Redirect("Home/Index?param=" + myData);
Vijaykumar Vadnal 16-Sep-15 9:15am    
Yea I know, but in the link which only renders ContentResult to the browser, what if I want to render actual view in my ActionResult method?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900