TreeView问题,老是提示外部组件发生异常!

psxfghost 2004-10-18 11:03:46
An unexpected error has occurred in this Application. The system administrators have been notified. Please feel free to contact us with the information surrounding this error.
The error occurred in: http://localhost/gmWebSite/Modules/Message/WebForm2.aspx
Error Message: 外部组件发生异常。
--------------------------------------------------------------------------------
Stack Trace:
System.Web.HttpException: 外部组件发生异常。 ---> System.Web.HttpCompileException: 外部组件发生异常。 at System.Web.Compilation.BaseCompiler.ThrowIfCompilerErrors(CompilerResults results, CodeDomProvider codeProvider, CodeCompileUnit sourceData, String sourceFile, String sourceString) at System.Web.Compilation.BaseCompiler.GetCompiledType() at System.Web.Compilation.PageCompiler.CompilePageType(PageParser pageParser) at System.Web.UI.PageParser.CompileIntoType() at System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation() --- 内部异常堆栈跟踪的结尾 --- at System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) at System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() at System.Web.UI.TemplateParser.GetParserCacheItem() at System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String path) at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig) at System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
...全文
186 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
cancersyf 2004-10-18
  • 打赏
  • 举报
回复
你能把详细的代码贴出来吗,另外你的framework是什么版本?
psxfghost 2004-10-18
  • 打赏
  • 举报
回复
拜托各位大侠帮忙看看^_^
psxfghost 2004-10-18
  • 打赏
  • 举报
回复
我已经把对应的webctrl_client文件放入项目下了,可还是不行,装的也是支持1。1框架的IEWebControls.exe
BillTuan 2004-10-18
  • 打赏
  • 举报
回复
如果你的页面在设计上没有提示错误,应该不会出错的!
看一下你的设计界面上的TREEVIEW的缩略图上有没有出错提示?

出错信息?可能不是TREEVIEW的问题!
sunyuanjun 2004-10-18
  • 打赏
  • 举报
回复
是不是你编译的时有问题.重新编译一下呀.再试
webctrl_client放在IIS主目录下.不用放在项目下.
psxfghost1 2004-10-18
  • 打赏
  • 举报
回复
怎么没有人回答呢?
psxfghost 2004-10-18
  • 打赏
  • 举报
回复
页面部分:
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Page language="c#" Codebehind="WebForm2.aspx.cs" AutoEventWireup="false" Inherits="gmWebSite.Modules.Message.WebForm2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm2</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<FONT face="宋体">
<iewc:TreeView id="TreeView1" style="Z-INDEX: 101; LEFT: 64px; POSITION: absolute; TOP: 64px" runat="server"></iewc:TreeView></FONT>
</form>
</body>
</HTML>
psxfghost 2004-10-18
  • 打赏
  • 举报
回复
源码部分:
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 gmWebSite.Modules.Message
{
/// <summary>
/// WebForm2 的摘要说明。
/// </summary>
public class WebForm2 : System.Web.UI.Page
{
protected Microsoft.Web.UI.WebControls.TreeView TreeView1;

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.Load += new System.EventHandler(this.Page_Load);

}
#endregion
}
}
psxfghost 2004-10-18
  • 打赏
  • 举报
回复
1.1的版本!代码我都没有写,只是建立了一个treeview的实例,试运行就已经出错了

62,071

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧