Reputation: 10108
Using MVC 5 in VS2013 (razor engine) - how can I render a partial webform (ASPX page) such that the webform code behind method "Page_Load" will be called, and thus can be debugged?
Upvotes: 1
Views: 3935
Reputation: 2114
@Html.Partial("~/Views/Shared/test/menu.aspx")
And in the Webform at the top use somthing like this:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="menu.aspx.cs" Inherits="System.Web.Mvc.ViewPage" %>
Just make sure it Inherits="System.Web.Mvc.ViewPage"
Upvotes: 2