Deepi
Deepi

Reputation: 11

redirecting to aspx page from mvc controller

i have a project created in asp.net and now the new pages are implemented using mvc so i want to redirect to an aspx page from mvc controller but when I do Redirect("Login.aspx") in the action method, it shows the resource could not be found.

Upvotes: 0

Views: 2247

Answers (1)

obratim
obratim

Reputation: 546

You can create mvc action and call rendering of a partial view in the apropriate action's view

@Html.Partial("<Path to my aspx page>/Page.aspx")

in aspx page Inherits must be specifyed:

<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage" %>

Upvotes: 0

Related Questions