我加入一个新web窗体后,什么控件也没弄,竟然无法加载,报错如下内容,哪位高手可告诉我是怎么回事啊?
前一个窗体内容正常!<%@ Page language="c#" Codebehind="UserManage.aspx.cs" AutoEventWireup="false" Inherits="libSystem.UserManage1" %>

解决方案 »

  1.   

    我晕!这是错误内容?这是aspx页面的第一行!!
      

  2.   

    补充:
               
         分析器错误信息:未能加载类型"libSystem.UserManage1"    源文件:c:\inetpub\wwwroot\libSystem\UserManage.aspx  行1
      

  3.   

    哈哈哈,你晕,我更晕!!
    完整信息如下:
           分析器错误 
    说明: 在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。 分析器错误信息: 未能加载类型“libSystem.UserManage1”。源错误: 
    行 1:  <%@ Page language="c#" Codebehind="UserManage.aspx.cs" AutoEventWireup="false" Inherits="libSystem.UserManage1" %>
    行 2:  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    行 3:  <HTML>
     源文件: c:\inetpub\wwwroot\libSystem\UserManage.aspx    行: 1 
    --------------------------------------------------------------------------------
    版本信息: Microsoft .NET Framework 版本:1.1.4322.573; ASP.NET 版本:1.1.4322.573 
      

  4.   

    后台文件的类名不对。检查一下UserManage.aspx.cs中,类名是UserManage1还是UserManage
      

  5.   

    我起初也发现这不对,所以就把UserManage1改成UserManage了,可结果还是一样,我特郁闷!还会有其他什么问题吗?
      

  6.   

    libSystem是命名空间
    UserManage1是类名
    检查UserManage.aspx.cs中是否对应
      

  7.   

    我当然也试过了啊,还是一样,因此,我才请教大家的啊!
    刚又发现,前一个web窗体在加载时出现了一个问题:
    !找不到类型或命名空间名称“ConfigrationSettings"(是否缺少using指令或程序集引用?)下边是我的cs代码: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;
    using System.Data.SqlClient;namespace libSystem
    {
    /// <summary>
    /// WebForm1 的摘要说明。
    /// </summary>
    public class WebForm1 : System.Web.UI.Page
    {
    protected System.Web.UI.WebControls.Label Label1;
    protected System.Web.UI.WebControls.Label Label2;
    protected System.Web.UI.WebControls.TextBox tbx_uid;
    protected System.Web.UI.WebControls.Label lbl_message;
    protected System.Web.UI.WebControls.Button btn_login;
    protected System.Web.UI.WebControls.TextBox tbx_upassword;
    protected System.Web.UI.WebControls.Label Label3;

    private void Page_Load(object sender, System.EventArgs e)
    {
    // 在此处放置用户代码以初始化页面
    } #region Web 窗体设计器生成的代码
    override protected void OnInit(EventArgs e)
    {
    //
    // CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
    //
    InitializeComponent();
    base.OnInit(e);
    }

    /// <summary>
    /// 设计器支持所需的方法 - 不要使用代码编辑器修改
    /// 此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {    
    this.btn_login.Click += new System.EventHandler(this.btn_login_Click);
    this.Load += new System.EventHandler(this.Page_Load); }
    #endregion private void btn_login_Click(object sender, System.EventArgs e)
    {
    string strconn= ConfigurationSettings.AppSettings["dsn"];
    //连接本地计算机的LMS数据库
    SqlConnection cn= new SqlConnection (strconn);
    cn.Open ();
    //构造SQL语句,该语句在Users表中检查用户名和密码是否正确
    string mysql= "select * from Users where Uid='"+tbx_uid.Text +"'and UPassword='"+tbx_upassword.Text +"'";
    //创建Command对象
    SqlCommand cm=new SqlCommand  (mysql,cn);
    //执行ExecuteReader ()方法
    SqlDataReader dr=cm.ExecuteReader ();
    if(dr.Read ())
    {
    lbl_message.Text= "";
    //保存当前用户名及用户权限
    Session["uid"]=dr["uid"].ToString ();
    Session["upower"]=dr["upower"].ToString ();
    lbl_message.Text="欢迎您!"+Session["uid"];
    if(Session["upower"].ToString ()=="1")
    { //图书馆总管
    Response.Redirect ("bookmanage.aspx");
    }
    else if(Session["upower"].ToString ()=="2")
    { //管理员
    Response.Redirect ("borrowcheckin.aspx");
    }
    else 
    {
    lbl_message.Text ="对不起,您的用户名/密码不正确,或无权登录管理系统";
    }
    }
    else
    {
    lbl_message.Text ="对不起,您的用户名/密码不正确,或无权登录管理系统";
    }
    //关闭连接
    cn.Close();
    }
    }
    }
      

  8.   

    如果新建后不做任何改动却报错.
    请检查你的.net版本.
    我也遇到过加载类型的错误.就是因为net2.0和net1.1搞混了.