Вопрос

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top