Click here to Skip to main content
15,916,188 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
ASP.NET
<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>

Regards
Lancy
Posted
Updated 7-Nov-11 3:25am
v2
Comments
thatraja 7-Nov-11 9:32am    
where is the code-behind? Include that too in your question.

1 solution

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.
 
Share this answer
 
Comments
Lancy.net 7-Nov-11 11:14am    
Hi thanks for your reply first time trying this..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900