简体   繁体   中英

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). 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. (.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

[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. Right click on the site and select "Convert to Web Application". 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. But it's recommended practice now to work with Web Applications.

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