0

I have a site written in C# using the ASP.NET MVC 2 frameworkthat unfortunately requires a few pages to work on Webforms (for a ReportViewer Control that needs Viewstate.

I've created a folder called Reports, converted it to a Web Application and added a page to the folder called ReportViewer.aspx (the system correctly added aspx.cs file and aspx.designer files).

I also created a class called BasePage.cs which inherits from System.Web.UI.Page and made my ReportViewer.aspx.cs inherit it.

When I try to browse this page, I get the following error:

Parser Error Message: Could not load type AzureWatch.ControlPanel.Web.Reports.ReportViewer.

Source Error:

Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportViewer.aspx.cs" Inherits="AzureWatch.ControlPanel.Web.Reports.ReportViewer"

How do I get ASP.NET aspx pages to show up in an ASP.NET MVC site correctly?

4
  • Have your created a separate web.config file for "Reports" web application? Commented Jan 30, 2011 at 17:26
  • I've just added web.config but nothing has changed Commented Jan 30, 2011 at 18:22
  • 1
    Are you certain AzureWatch.ControlPanel.Web.Reports.ReportViewer is loadable by your Web Form? Commented Jan 30, 2011 at 18:29
  • OK, this is a stupid user error... I apologize for even starting the question :( I was in 'Release' mode which is not working correctly from the VS2010 environment. As soon as I switched to Debug mode, everything started functioning. Thanks for help! Commented Jan 30, 2011 at 19:11

1 Answer 1

1

You can just use .aspx pages by adding them to your MVC app - MVC is a framework over ASP.NET anyhow, so there is nothing to stop you from adding a .aspx page except your own guilt :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.