[英]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.