Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2007, 10:51 PM
Registered User
 
Join Date: Nov 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default repeater not displayed

hi i'm using a repeater to display data in a page.
my problem is, when the code runs, the repeater is created and all controls are created within it.

but the repeater is not visible on the page.
 i tried setting it's visibility attribute. but doesnt work.

can anyone help.

i'm including my code below.

thanks in advance



<ItemTemplate>
 <tr>
                                                                    <td>
                                                                        <asp:Label ID="AssetLabel" Text='Asset Class: <%# DataBinder.Eval(Container.DataItem, "Rating") %>'
                                                                            runat="server" />
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="CurrentLabel" Text='Current Manager/Fund: <%# DataBinder.Eval(Container.DataItem, "Rating") %>'
                                                                            runat="server" />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:Label ID="NewManagerLabel" Text="New Manager/Fund: " runat="server" />
                                                                    </td>
                                                                    <td>
                                                                    <asp:Label ID="Label1" Text="New Manager/Fund: " runat="server" />

                                                                    </td>
  </tr>
                                                            </ItemTemplate>


C# code:

 rptrManagerFund.DataSource = dsManagerFundData.Tables["strDataTable"];

  rptrManagerFund.DataBind();



 
Old November 17th, 2007, 01:17 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

rptrManagerFund.DataSource = dsManagerFundData.Tables["strDataTable"];

Do you seriously have a table named: strDataTable?? I imagine you want the code to be:
rptrManagerFund.DataSource = dsManagerFundData.Tables[strDataTable];

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========
 
Old November 17th, 2007, 02:51 AM
Registered User
 
Join Date: Nov 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

rptrManagerFund.DataSource = dsManagerFundData.Tables["strDataTable"];

the above statement gets the data. and the repeate is also generating as many items as the number of rows in the data table.

so i think it is correct. it worked for me earlier also, though i was not using repeater at that time.

thanks for the answer. i'll try your suggestion.

see if there is any other error in the code.








Similar Threads
Thread Thread Starter Forum Replies Last Post
This control cannot be displayed prv299 ASP.NET 3.5 Professionals 0 September 2nd, 2008 03:50 AM
Image Not Being Displayed Manoj Bisht ASP.NET 2.0 Professional 1 March 19th, 2008 01:38 AM
Page cannot be displayed. Voltron ASP.NET 2.0 Basics 0 October 22nd, 2006 04:20 PM
Not getting "time" displayed in the first example dotnetabhi VS.NET 2002/2003 6 March 27th, 2004 11:53 AM
time displayed damnnono_86 Access 2 November 28th, 2003 01:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.