首页从Microsoft下载了IEWebControls.exe,安装好。
之后创建一个SimpleTreeView.aspx 内容如下:
-------------------------------------------------
<%@ Page Language="C#" %>
<%@ Register TagPrefix="IE" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
<%@ import namesapce="Microsoft.Web.UI.WebControls" %><html>
<head>
</head>
<body>
<form runat="server">
<IE:TREEVIEW runat="server">
<TREENODE text="ASP.NET Books">
<TREENODE text="ASP.NET Unleashed" />
<TREENODE text="ASP.NET Tips, Code, and Tutorials" />
</TREENODE>
</IE:TREEVIEW>
</form>
</body>
</html>
运行后出现如下:--------------------------------------------------------------------------------
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------分析器错误
说明: 在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。 分析器错误信息: 找不到文件或程序集名称“Microsoft.Web.UI.WebControls”,或找不到它的一个依赖项。源错误: 行: 2
行 1: <%@ Page Language="C#" %>
行 2: <%@ Register TagPrefix="IE" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
行 3: <%@ import namesapce="Microsoft.Web.UI.WebControls" %>
行 4: <script runat="server">
如何解决?谢谢
之后创建一个SimpleTreeView.aspx 内容如下:
-------------------------------------------------
<%@ Page Language="C#" %>
<%@ Register TagPrefix="IE" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
<%@ import namesapce="Microsoft.Web.UI.WebControls" %><html>
<head>
</head>
<body>
<form runat="server">
<IE:TREEVIEW runat="server">
<TREENODE text="ASP.NET Books">
<TREENODE text="ASP.NET Unleashed" />
<TREENODE text="ASP.NET Tips, Code, and Tutorials" />
</TREENODE>
</IE:TREEVIEW>
</form>
</body>
</html>
运行后出现如下:--------------------------------------------------------------------------------
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------分析器错误
说明: 在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。 分析器错误信息: 找不到文件或程序集名称“Microsoft.Web.UI.WebControls”,或找不到它的一个依赖项。源错误: 行: 2
行 1: <%@ Page Language="C#" %>
行 2: <%@ Register TagPrefix="IE" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
行 3: <%@ import namesapce="Microsoft.Web.UI.WebControls" %>
行 4: <script runat="server">
如何解决?谢谢
解决方案 »
- 无命名空间无法引用APP_CODE里面的类?
- 当一个页面需要多次获取外部的数据作为参数去读数据库的情况下,如果没有执行获取外部数据,那么如何保存上一次获取的数据呢?
- dropdownlist默认值
- 利用事务为何在TransactionScope ts = new TransactionScope()的时候就说事务超时啊
- DataGrid中嵌套Checkbox问题,大家多多帮忙!
- 兄弟们!我把问题问的再简单点!帮帮忙啊!!!项目等着这个收工!!
- 请问string怎么转换成stringbuilder
- 怎么给别人已经编译好的dll加上强名称?
- 弱弱问:关于datagrid的超链接
- DataGrid控件編輯狀態下賦值出現錯誤
- 新手问题
- 向高手询问一个GridView的问题。
Microsoft.Web.UI.WebControls.dll的引用
Microsoft.Web.UI.WebControls.dll
不过。。只显示文本。。没显示树状视图。。比如上面的例子。运行后在IE里只看到如下:
---------------------------------------------------------------------------ASP.NET Books ASP.NET Unleashed ASP.NET Tips, Code, and Tutorials
directory under your top-level site directory. For example, if your
site root is c:\Inetpub\wwwroot, type this at the command prompt: xcopy /s /i .\build\Runtime c:\Inetpub\wwwroot\webctrl_client\1_0 /y This will create the following directory structure under the site: /webctrl_client/1_0
MultiPage.htc
TabStrip.htc
toolbar.htc
treeview.htc
webservice.htc
webserviced.htc
[images]
[treeimages]2. Create a new web application in IIS and copy the contents of the
samples directory to this application directory. For example: xcopy /s /i .\samples c:\Inetpub\wwwroot\sampleapp /y3. Create a /bin subdirectory for the application and copy the file
Microsoft.Web.UI.WebControls.dll to this directory. The contents of the application will be as follows: /sampleapp
multipage.aspx
state_city.xml
tabstrip.aspx
toolbar.aspx
treeview.aspx
treeview_bound.aspx
/bin
Microsoft.Web.UI.WebControls.dll4. Request the sample pages from your Internet Explorer web browser, for
example: http://localhost/sampleapp/multipage.aspx
只显示:
-------------------------------------------------------------------
ASP.NET Books ASP.NET Unleashed ASP.NET Tips, Code, and Tutorials