简体   繁体   English

如何将现有的ASP.NET应用程序集成到Visual Studio 2010中的现有网站中?

[英]How to integrate existing ASP.NET app into existing website in Visual Studio 2010?

I have an existing website, built in Visual Studio 2010, that I would like to integrate with a web application I wrote in ASP.NET/C# (also in VS2010). 我有一个现有的网站,该网站建在Visual Studio 2010中,我想与我用ASP.NET/C#(也是VS2010)编写的Web应用程序集成。 When I try to move the pages to the website (just dragging and dropping), the MyPage.aspx.designer.cs file doesn't stay in the 'group' of files. 当我尝试将页面移动到网站上(只需拖放)时,MyPage.aspx.designer.cs文件不会停留在文件的“组”中。 (.aspx, .aspx.cs) (.aspx,.aspx.cs)

For reference, (if it matters), my application is an Online Application for my company, where people can apply online. 作为参考,(如果有关系的话)我的申请是我公司的在线申请,人们可以在线申请。

Any help is appreciated!! 任何帮助表示赞赏!

-E -E

[Update]: This is the error I get when trying to view an integrated page in the browser: [更新]:这是我尝试在浏览器中查看集成页面时遇到的错误:

Line 1:  <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TheEnd.aspx.cs"   Inherits="ApplicantEntry.TheEnd" %>

Line 2: 

Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

You need your website to be a "Web Application" to achieve what you're wanting to here. 您需要您的网站成为“ Web应用程序”才能实现您想要的目的。 Right click on the site and select "Convert to Web Application". 右键单击该站点,然后选择“转换为Web应用程序”。 That should do the trick. 这应该够了吧。

Alternatively, if you must keep your website non-Web Application, then you can just delete the designer file, you don't need it with a Website. 另外,如果必须将网站保留为非Web应用程序,则只需删除设计器文件,而网站则不需要它。 But it's recommended practice now to work with Web Applications. 但是,现在建议您与Web应用程序一起使用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 帮助将 asp.net web 应用程序部署到现有网站 - Help with deploying asp.net web app to an existing website 运行Asp.Net网站项目时如何在Visual Studio 2010中禁用脚本调试? - How to disable script debugging in Visual Studio 2010 when running Asp.Net website project? 如何将 ASP.NET 和 web 开发 package 添加到现有的 Visual Studio - How to add ASP.NET and web development package to existing visual studio 如何将现有的 Vue.js 2 接口集成到现有的 ASP.NET/C# Web 表单应用程序? - How to integrate an existing Vue.js 2 interface to an existing ASP.NET/C# Web forms application? 如何将 ASP.NET Web 应用程序部署到 Azure 与现有的 Z9778840A0104CB30C52ZB7 服务器数据库 (76410CB30C52ZB7) 服务器数据库 - How to deploy an ASP.NET Web App to Azure with an existing SQL Server database (Azure Data Studio) 如何将Angular 2.0添加到现有的ASP.NET MVC应用程序中 - How to add Angular 2.0 to an existing ASP.NET MVC app 如何在Visual Studio 2022中打开asp.net网站项目? - How to open asp.net website project in Visual studio 2022? 是否可以在 Visual Studio 中连接现有的本地数据库并使用 ASP.NET mvc Core 在 Web 上生成数据? - Is it possible to connect an existing local Database in Visual studio and generate the Data on Web with ASP.NET mvc Core? 如何将Razor组件集成到具有多个路由的现有Razor Pages Asp.net Core项目中 - How to integrate Razor Components into existing Razor Pages Asp.net Core project with multiple routes 将ASP.NET Core MVC应用程序集成到现有的ASP.NET MVC应用程序中 - Integrate ASP.NET Core MVC Application to existing ASP.NET MVC Application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM