不包含“DataItem”的定义--问题总结
2008-11-02 21:58
423 查看
编译错误
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误消息:
CS1061:
“System.Web.UI.Page”不包含“DataItem”的定义,并且找不到可接受类型为“System.Web.UI.Page”的第一个参数的扩展方法“DataItem”(是否缺少
using 指令或程序集引用?)
源错误:
源文件:
e:\鱼类\Fish\EBolg\E_enterpriseList.aspx 行: 167
网上摘录:rainstar_8(雨天之星)
在用<%#DataBinder.Eval(Container.DataItem,"字段")%>这种方法绑定数据时应该先用一个服务器数据控件,比如DataList或DataGrid或者repeater,然后在后台代码中绑定这个数据控件,在前台的.aspx文件才能这样子用的,要不然就会提示说的错误:
总结:不要忘记绑定数据时应该先用一个服务器数据控件,比如DataList或DataGrid或者repeater,一定要先放进这些控件才能运行,不然就会出错。
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
编译错误
说明:在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误消息:
CS1061:
“System.Web.UI.Page”不包含“DataItem”的定义,并且找不到可接受类型为“System.Web.UI.Page”的第一个参数的扩展方法“DataItem”(是否缺少
using 指令或程序集引用?)
源错误:
行 165: 行 166: 行 167: <div class="pic" ><a href='E_showEnterprise.aspx?id=<%#DataBinder.Eval(Container.DataItem, "e_id") %> ' target="_blank"> 行 168: <img alt="" src='../Files/Image/Enterprise/<%# Eval("e_photo") %>' 行 169: border="0" style="width: 154px" /></a> |
e:\鱼类\Fish\EBolg\E_enterpriseList.aspx 行: 167
网上摘录:rainstar_8(雨天之星)
在用<%#DataBinder.Eval(Container.DataItem,"字段")%>这种方法绑定数据时应该先用一个服务器数据控件,比如DataList或DataGrid或者repeater,然后在后台代码中绑定这个数据控件,在前台的.aspx文件才能这样子用的,要不然就会提示说的错误:
总结:不要忘记绑定数据时应该先用一个服务器数据控件,比如DataList或DataGrid或者repeater,一定要先放进这些控件才能运行,不然就会出错。
相关文章推荐
- “System.Web.UI.Page”不包含“DataItem”的定义,问题的解决
- “System.Data.DataRow”并不包含“Item”的定义
- “System.Data.DataRow”并不包含“Item”的定义
- 关于xcshareddata的一点问题总结
- spring-data-redis问题总结
- VC运行库版本不同导致链接.LIB静态库时发生重复定义问题的一个案例分析和总结
- 编程珠玑: 12章 取样问题 12.3设计空间,程序的输入包含两个整数m和n,其中m<n。输出是0~n-1范围内m个随机整数的有序列表,不允许重复。 -------解题总结
- LINQ entityset 不包含GetEnumerator的定义,在MVC中使用entity framework(EF)出现“必须添加对程序集“System.Data.Entity”解决方法
- VC运行库版本不同导致链接.LIB静态库时发生重复定义问题的一个案例分析和总结
- e.Item.DataItem使用问题
- 使用easyui-combobox的data属性加载定义好在*.js文件中的JSON数据的问题
- VC运行库版本不同导致链接.LIB静态库时发生重复定义问题的一个案例分析和总结
- VC运行库版本不同导致链接.LIB静态库时发生重复定义问题的一个案例分析和总结
- 总结Asp.net中Page加载PostData的具体过程 进而解决"获取动态创建的控件的PostData数据"问题
- 转:VC运行库版本不同导致链接.LIB静态库时发生重复定义问题的一个案例分析和总结
- 一篇总结的很好的Spring data jpa 文章,里面包含多种查询方式,可以结合api使用
- android 7.0拍照问题file:///storage/emulated/0/photo.jpeg exposed beyond app through ClipData.Item.getUri
- 总结Asp.net中Page加载PostData的具体过程 进而解决"获取动态创建的控件的PostData数据"问题
- VC运行库版本不同导致链接.LIB静态库时发生重复定义问题的一个案例分析和总结