Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

repeater control not showing data

Posted on 2011-02-14
3
Medium Priority
?
453 Views
Last Modified: 2012-05-11
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

0
Comment
Question by:vbnetcoder
  • 2
3 Comments
 
LVL 23

Expert Comment

by:Rajkumar Gs
ID: 34890488
After
Repeater1.DataSource = DS
try add this line
Repeater1.DataBind()
0
 
LVL 23

Accepted Solution

by:
Rajkumar Gs earned 2000 total points
ID: 34890514
DataBind() binds the assigned dataset to Repeater and displays data
0
 

Author Closing Comment

by:vbnetcoder
ID: 34890917
ty
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question