I am developing an MVC3 application using Visual Studio 2010.
I have an aspx page that I want to display as a result of a controller action.
I added this action to the home controller.
// GET: /Home/EmployeePortal public ActionResult EmployeePortal() { return View(); }
This is an aspx page.
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %> <!DOCTYPE html> <html> <head runat="server"> <title>EmployeePortal</title> </head> <body> <asp:TextBox ID="TextBox1" runat="server" /> <div> This is employee portal </div> </body> </html>
When I launch the application, I can go to this page using the URL: http: // localhost: 3990 / Home / EmployeePortal
The problem is that when I have one or more server side controls on an aspx page, I get this error on the website. An error occurred while processing your request.
When I comment on a server side control from a page, it appears in order.
The aspx page has been added as an application for the application through the new menu.
I need an aspx page embedded in an MVC application, and so I am trying to use this aspx page.
I'm not sure what I'm doing wrong. Please help.
source share