Solved

repeater control not showing data

Posted on 2011-02-14
3
431 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
Comment Utility
After
Repeater1.DataSource = DS
try add this line
Repeater1.DataBind()
0
 
LVL 23

Accepted Solution

by:
Rajkumar Gs earned 500 total points
Comment Utility
DataBind() binds the assigned dataset to Repeater and displays data
0
 

Author Closing Comment

by:vbnetcoder
Comment Utility
ty
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now