以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 Dot NET,C#,ASP,VB 』  (http://bbs.xml.org.cn/list.asp?boardid=43)
----  关于c#:WEB用户控件,大侠帮忙  (http://bbs.xml.org.cn/dispbbs.asp?boardid=43&rootid=&id=9651)


--  作者:summering
--  发布时间:8/31/2004 4:46:00 PM

--  关于c#:WEB用户控件,大侠帮忙
“/WebApplication2”应用程序中的服务器错误。
--------------------------------------------------------------------------------

编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。

编译器错误信息: CS0118: “System.Web.UI.WebControls.RepeaterItem”表示“类”,此处应为“变量”

源错误:

行 1:  <%@ Control Language="c#" AutoEventWireup="false" Codebehind="ch147itemTemplate.ascx.cs" Inherits="WebApplication2.ch14.ch147itemTemplate" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
行 2:  <span style="BORDER-RIGHT:1px solid; BORDER-TOP:1px solid; BORDER-LEFT:1px solid; WIDTH:180px; BORDER-BOTTOM:1px solid">
行 3:   <asp:ImageButton CommandArgument='<%# DataBinder.Eval(CType(Container,RepeaterItem).DataItem,"EmployeeID")%>'
行 4:   ImageUrl="image/but06.gif" ImageAlign="Middle" Width="25" Height="24" Runat="server" title="Delete Student" id=ImageButton1>
行 5:   </asp:ImageButton>&nbsp;&nbsp;

源文件: c:\inetpub\wwwroot\WebApplication2\ch14\ch147itemTemplate.ascx    行: 3

代码是这样的ch147itemTemplate.ascx:
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="ch147itemTemplate.ascx.cs" Inherits="WebApplication2.ch14.ch147itemTemplate" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<span style="BORDER-RIGHT:1px solid; BORDER-TOP:1px solid; BORDER-LEFT:1px solid; WIDTH:180px; BORDER-BOTTOM:1px solid">
 <asp:ImageButton CommandArgument='<%# DataBinder.Eval(CType(Container,RepeaterItem).DataItem,"EmployeeID")%>'
ImageUrl="image/but06.gif" ImageAlign="Middle" Width="25" Height="24" Runat="server" title="Delete Student" id=ImageButton1>
 </asp:ImageButton>&nbsp;&nbsp;
 <asp:LinkButton CommandArgument='<%# DataBinder.Eval(CType(Container,RepeaterItem).DataItem,"EmployeeID")%>' style="Z-INDEX:101" Runat="server" text='<%# DataBinder.Eval(CType(Container,RepeaterItem).DataItem,"Name")%>' ID="LinkButton2" title="Edit Student" />
</span>
<br>
请问这个问题出在什么地方?大侠帮忙!


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms