中继器中需要的帮助 [英] Help needed in Repeater

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

问题描述

我正在使用带有中继器控件的动态文本框.
当我在屏幕上看不到任何内容时,请您帮我.
以下是我的aspx页面

Hi i am doing Dynamic Text box with repeater control.
Could you pls help me when i run nothing is visible in the screen.
Below is my aspx page

<pre lang="HTML"> <%@ Page Language="C#" MasterPageFile="~/MasterPages/Admin.master" AutoEventWireup="true" CodeFile="ItemDetails.aspx.cs" Inherits="Admin_Pages_DO_Management_ItemDetails" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Repeater ID="Repeater1" runat="server"  OnItemCommand="Repeater1_ItemCommand" OnItemDataBound="Repeater1_ItemDataBound">
&lt;HeaderTemplate>
<table>
<tr>
<th>Item</th>
<th>Description</th>
<th>Qty</th>
</tr>

&lt;/HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:TextBox ID="Itemtxt" runat="server" Visible="true" Text='<%# Eval("ItemNo") %>'></asp:TextBox>
</td>
<td>
<asp:TextBox ID="Destxt" runat="server" TextMode= "MultiLine" Text='<%# Eval("Desc") %>'></asp:TextBox>
</td>
<td>
<asp:TextBox ID="Qty" runat="server"  Text='<%# Eval("Qty") %>'></asp:TextBox>
</td>
<td>
<asp:Button ID="btnAddAnother" runat="server" Text='<%# Eval("Add") %>'/>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>

</asp:Content>

</pre>


问候
Lancy


Regards
Lancy

推荐答案

是否还可以指定用于将数据绑定到转发器的数据源?

在上一页中,没有数据源.

声明一个数据源,并将该数据源的ID分配给Repeater的DataSourceID.
Could You also specify the DataSource that you are using to bind the data to the repeater?

In the above page , there is no datasource.

Declare a datasource and assign the ID of that DataSource to the DataSourceID of Repeater.


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

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