Link to home
Start Free TrialLog in
Avatar of vbnetcoder
vbnetcoder

asked on

repeater control not showing data

I added a repeater control and gave its datasource a DS that has rows.

Repeater1.DataSource = DS

I added it to the form as shown in the HTML file attached.

Why doesn't the repeater show any data? or show anything at all on the screen for that matter.


<body>
    <form id="form1" runat="server">
    <div>
    
        <table class="style1">
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td>
                    <asp:Repeater ID="Repeater1" runat="server">
                    <HeaderTemplate>
                    <TR>
                     <th>
                     Description
                     </th>
                    </TR>
                    </HeaderTemplate>
                    
                   <ItemTemplate>
                   <Td><%#Eval("Category_Name")%></Td>
                   
                   </ItemTemplate>
                    </asp:Repeater>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    
    </div>
    </form>
</body>

Open in new window

Avatar of Rajkumar Gs
Rajkumar Gs
Flag of India image

After
Repeater1.DataSource = DS
try add this line
Repeater1.DataBind()
ASKER CERTIFIED SOLUTION
Avatar of Rajkumar Gs
Rajkumar Gs
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vbnetcoder
vbnetcoder

ASKER

ty