I would like to reuse *.aspx files in multiple ASP.Net MVC projects. Is this possible?
EDIT: Anthony's suggestion of using version control system to share common files across multiple projects solves my question in a practical way. Luckily, since I'm using Subversion, the solution fits me. However, if I wasn't using one, how can this problem still be solved?
Is it possible to do something like this?
- Build a redistributable User Control using VS's website precompilation feature. (As described here.)
- Reference the output assemblies in the required projects.
- Create a modified View engine that instantiates User Controls via generic type parameter.
We then construct controller actions like this:
public ActionResult Shared()
{
return View<SharedPageOrUserControl>();
}
Does that look possible?