Yes, we can make controller as partial.
Lets create a mvc application. Now create a contolller and name it "ABCController".
Now make the controller as partial.
- using System.Web.Mvc;
- namespace HtmlInjectInMvc.Controllers
- {
- public partial class ABCController: Controller
- {
- public ActionResult Index()
- {
- return View();
- }
- }
- }
Now add another controller and name it xyzController. In xyzController.cs
- using System.Web.Mvc;
- namespace HtmlInjectInMvc.Controllers
- {
- public class xyzController: Controller
- {
- public ActionResult Index()
- {
- return View();
- }
- }
- public partial class ABCController: Controller
- {
- public ActionResult About()
- {
- ViewBag.Name = "Prmaod Kumar";
- return View();
- }
- }
- }
Now run the application.
Output


Hope enjoy this article.
Happy coding :)

Kiran ThakurPosted Jan 16, 2016, 5:33 AM
good one
Gowtham RajamanickamPosted Apr 19, 2015, 12:05 AM
Good one
NitinPosted Apr 12, 2015, 4:24 PM
good one