我们在做一个asp.net外包的项目,打开项目发现启动项目为类库,然后发现有个类库的文件夹,里面有许多类。但是webui目录里面的aspx文件和。cs文件基本没有什么代码,比如:  viewreport.aspx :
      <%@ Page CodeBehind="ViewReport.aspx.cs" Language="c#" 
AutoEventWireup="false" Inherits="Avery.Ice.DataServer.webui.ViewReport" %>
<%@ Import Namespace="System.Web" %>后端文件只有:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;namespace Avery.Ice.DataServer.webui
{
 /// <summary>
 /// Summary description for ViewReport.
 /// </summary>
 public class ViewReport : System.Web.UI.Page
 {
  protected System.Web.UI.WebControls.Label ErrorMsg;  private void Page_Load(object sender, System.EventArgs e)
  {
  }  #region Web Form Designer generated code
  override protected void OnInit(EventArgs e)
  {
   //
   // CODEGEN: This call is required by the ASP.NET Web Form Designer.
   //
   InitializeComponent();
   base.OnInit(e);
  }  /// <summary>
  /// Required method for Designer support - do not modify
  /// the contents of this method with the code editor.
  /// </summary>
  private void InitializeComponent()
  {
   this.Load += new System.EventHandler(this.Page_Load);  }
  #endregion
 }
}问题是asp.net有无这种功能,直接.cs中写相应的类什么的,而aspx不用写什么代码?(也有可能是我们拿到的代码不完整)
另外我如何部署才能浏览它?另外,比如打印功能使用url是http://...Controller.aspx?id=23....
,发现在web.config有这么一段代码:
<system.web>
    <httpRuntime executionTimeout="1200" />
    <httpHandlers>
      <add verb="*" path="Controller.aspx" type="Avery.Ice.DataServer.Action.DataServerController, DataServer"/>
    </httpHandlers>可是项目中无Controller.aspx 文件,怎么回事?

解决方案 »

  1.   

    演练:部署 Web 解决方案
    http://msdn.microsoft.com/library/chs/default.asp?url=/library/chs/vsintro7/html/vbtskDeployingWebSolution.asp参照
    http://www.itonline.gd.cn/ittech/list.asp?id=617
    http://blog.csdn.net/younther/archive/2004/06/16/20185.aspx
      

  2.   

    可以,而且codebehinde的cs文件也可以不要了直接从  组件中继承
    <%@ Page language="c#" AutoEventWireup="false" Inherits="InfoPub.Web.Test" %>
    InfoPub.Web.Test为你编译成dll中的 Web Page 类