标题:如何在ListView“ListView1”上指定项占位符?
只看楼主
beidoujs
Rank: 2
等 级:论坛游民
帖 子:21
专家分:12
注 册:2011-3-31
结帖率:100%
 问题点数:0 回复次数:1 
如何在ListView“ListView1”上指定项占位符?
我用的是vs2008,添加一个listview控件绑定数据源后,调试运行显示:【必须在 ListView“ListView1”上指定项占位符。可通过将控件的 ID 的属性设置为“itemPlaceholder”来指定项占位符。项占位符控件还必须指定 runat="server"。】, 如何在 ListView“ListView1”上指定项占位符?
程序代码:
堆栈跟踪:
[InvalidOperationException: 必须在 ListView“ListView1”上指定项占位符。可通过将控件的 ID 的属性设置为“itemPlaceholder”来指定项占位符。项占位符控件还必须指定 runat="server"。]
   System.Web.UI.WebControls.ListView.GetPreparedContainerInfo(Control outerContainer, Boolean isItem, Int32& placeholderIndex) +249
   System.Web.UI.WebControls.ListView.CreateItemsWithoutGroups(ListViewPagedDataSource dataSource, Boolean dataBinding, InsertItemPosition insertPosition, ArrayList keyArray) +59
   System.Web.UI.WebControls.ListView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +693
   System.Web.UI.WebControls.ListView.PerformDataBinding(IEnumerable data) +32
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +111
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
   System.Web.UI.WebControls.ListView.PerformSelect() +56
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   System.Web.UI.WebControls.ListView.CreateChildControls() +53
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.PreRenderRecursiveInternal() +41
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360





[ 本帖最后由 beidoujs 于 2011-4-2 22:27 编辑 ]
搜索更多相关主题的帖子: 占位符 数据源 
2011-04-02 22:25
beidoujs
Rank: 2
等 级:论坛游民
帖 子:21
专家分:12
注 册:2011-3-31
得分:0 
怎么没人知道呢?

知己知彼
2011-04-06 10:41



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-335514-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.982426 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved