无法创建中继器控件? [英] Repeater control can not be created ?

查看:93
本文介绍了无法创建中继器控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我必须在页面上使用转发器控制。我尝试通过读取图像路径显示图像。代码块类似于:



Hi,

I have to use repeater control at page. I try to show images by readin image paths. Code block is like :

<table id="repeaterControl" style="margin-removed 300px">
            <tr>
                <td>
                    <asp:Repeater runat="server" ID="repeater" Visible="True">
                        <ItemTemplate>
                            <dx:ASPxImage  runat="server" ID="ASPxImage2" ImageUrl=''<%# String.Format("RepeaterImages/{0}.png", Container.DataItem) %>''
                                Cursor="pointer"  ClientInstanceName=''<%# "widgetButton_" + Container.DataItem %>''
                                ToolTip=''<%# "Show " + Container.DataItem %>'' ClientSideEvents-Click=''<%# GetClientButtonClickHandler(Container) %>''>
                            </dx:ASPxImage>
                        </ItemTemplate>
                    </asp:Repeater>
                </td>
            </tr>
      </table>





当我构建页面并尝试查看页面源时,页面源处没有任何内容应该看到转发器。 页面来源如下所示:





When I build page and try to view page source, there is nothing at page source which repeater should be seen. Page source is seen like below:

<table id="repeaterControl" style="margin-left: 300px">
               <tr>
                   <td>

                   </td>
               </tr>

    </table>





我以为我无法读取图像,无法生成转发器。我的aspx页面和图像文件夹位于项目的同一目录中。所有图片都是.png扩展名。

如何解决这种情况?

感谢提前回复..



I thought that I can not read images and repeater can not be generated. My aspx page and image folder are at the same directory in project. And all images are .png extensioned.
How can I resolve this situation ?
Thanks for the replies in advance..

推荐答案

您是否检查过您的数据源在绑定到转发器时的记录以及绑定方式。
Did You check Your data source has records when you binding to repeater and how you binding.


例如:在数据表中设置图像然后将此数据表绑定到转发器。
For Example: Set your Images in Data table and then Bind this datatable to repeater.


你可以通过这些文章获得一个想法





http://msdn.microsoft.com/en-us/magazine/cc163780.aspx [ ^ ]





http:/ /www.netrostar.com/Tutorials-91-ASP.NET%20Tutorial.%20How%20to%20use%20Repeater [ ^ ]
You can have an Idea through these Articles


http://msdn.microsoft.com/en-us/magazine/cc163780.aspx[^]


http://www.netrostar.com/Tutorials-91-ASP.NET%20Tutorial.%20How%20to%20use%20Repeater[^]


这篇关于无法创建中继器控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆