Solved

repeater control not showing data

Posted on 2011-02-14
3
441 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 500 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

Technology Partners: 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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

680 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