简体   繁体   中英

How to use ASPX page into MVC

As per requirement, i need to use existing/provided ASCX user controls into MVC application. As understnad, to use these controls, I have to create ASPX traditional page into MVC and then use these user controls inside the ASPX page.

I can add webform into MVC application.

How can i incorporate URL for added webform ?? as it will be appear different url into the browser then other pages of MVC

PLease also suggest me if i have to take any other thing to incorporate traditional ASPX into MVC application.?

Thanks

Actually an ASP.NET project can host Web Forms, MVC and Web API. It's just about adding the right references to the whole project. Thus, you can create traditional .aspx pages in your project.

About "difference in URLs" when using Web Forms or MVC, this isn't longer true. Since ASP.NET 4.0, Web Forms also supports URL Routing (follow this link) .

I use Iframe to show the aspx page in mvc like this

<iframe src="Aspx/MonitorProduct.aspx" width="1280" height="950" style="overflow:hidden;margin-top:0px;background-color:white;border:1px solid black"/>

I'm not sure is it what you want? But i hope this will help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM