现在我把其中两个com组件都引用到了程序中,包括app.config文件.
代码如下:
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 Client;
using General;
namespace WebQt
{
/// <summary>
/// WebForm1 的摘要说明。
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TextBox1;
public string str;
private void Page_Load(object sender, System.EventArgs e)
{
Client.CJoinProtectMan joinman = new CJoinProtectMan(); joinman.InitObject("0000");
int n_str = joinman.NewJoinProtectMan(out str); this.TextBox1.Text = str.ToString();
} #region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load); }
#endregion
}
}
代码如下:
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 Client;
using General;
namespace WebQt
{
/// <summary>
/// WebForm1 的摘要说明。
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TextBox1;
public string str;
private void Page_Load(object sender, System.EventArgs e)
{
Client.CJoinProtectMan joinman = new CJoinProtectMan(); joinman.InitObject("0000");
int n_str = joinman.NewJoinProtectMan(out str); this.TextBox1.Text = str.ToString();
} #region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load); }
#endregion
}
}
解决方案 »
- asp.ne+mysql的问题!在线等
- 用户控件回车就登陆的问题(高手请进)
- List<T> 这样写法 是不是只在C2.0 中才有?
- ???谁有这样网站的源码,谢谢
- 请教一个小问题
- 请问如何制作这样的登陆窗体 简单 立即结帖
- DataGrid查询结果显示问题
- 散分:数据库查询问题
- 高分(可再加)如何在后台程序中动态生成Table(每一笔纪录一个Table),然后绑定数据在前台显示!(或是在DataGrid的摸版列定义)需源码
- <form action=list.asp target=_blank runat="server">有错吗?
- 在asp代码中,是不是只能有一个form呢?
- 各位老师,这里有一个问题研究了好多天了,不知应该如何解决?
因发生异常 System.IO.FileNotFoundException: 系统找不到指定的文件。 at System.IConfigHelper.Run(IConfigHandler factory, String fileName) at System.ConfigTreeParser.Parse(String fileName, String configPath) 而无法成功读取 .Config 文件 app.config。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Runtime.Remoting.RemotingException: 因发生异常 System.IO.FileNotFoundException: 系统找不到指定的文件。 at System.IConfigHelper.Run(IConfigHandler factory, String fileName) at System.ConfigTreeParser.Parse(String fileName, String configPath) 而无法成功读取 .Config 文件 app.config。源错误:
行 26: Client.CJoinProtectMan joinman = new CJoinProtectMan();
行 27:
行 28: joinman.InitObject("9999");
行 29:
行 30: int n_str = joinman.NewJoinProtectMan(out str);