.net c# 问题

来源:百度知道 编辑:UC知道 时间:2024/09/28 10:45:03
错误 找不到类型或命名空间名称“HouseManage_QueryHouseLeaseForm”(是否缺少 using 指令或程序集引用?)
具体代码如下
//文件名:HouseLeasePrint.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class HouseManage_HouseLeasePrint : System.Web.UI.Page
{
//-----------错误提示就是在下面这句的最前面-----------------------
private HouseManage_HouseLeaseForm MyPrintForm;
protected void Page_Load(object sender, EventArgs e)
{
MyPrintForm =(HouseManage_HouseLeaseForm)Context.Handler;
this.Label3.Text = MyPrintForm.MyPrint房源编号;
if (Session["MyCompanyPhone"] != null)
{
this.Label2.Text = "联系电话:" + Session["MyCompanyPhone"

HouseManage_HouseLeaseForm 这应该是一个自定义的类吧。
你要看下网站里面有没有这个HouseManage_HouseLeaseForm.cs文件。
如果用到了分层思想,就需要引用这个类的命名空间。
using

你在哪用到了HouseManage_QueryHouseLeaseForm?
我怎么找不到,你把出错的代码贴出来看看

private HouseManage_HouseLeaseForm MyPrintForm
//你这是在引用外部页面还是本页面 POST回来的数据,

如果是本页面想取HouseLeaseForm页POST过来的表单,你应注意,保证两个页面的FORM ID不能有冲突,

这样就直接可以request.form来取数据,而不需要像上面一样去实例化:private HouseManage_HouseLeaseForm MyPrintForm

呵呵,碰运气,看看是否猜中了