473,505 Members | 15,976 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Repeater Problem

I am having a problem with using a repeater control. I have no idea what I
am doing wrong. It compiles but nothing displays. Can anyone help? Here is
the code:
ASPX File:

<%@ Page language="c#" Codebehind="profile.aspx.cs" AutoEventWireup="false"
Inherits="MarketZar.accts.profile" %>
<html>
<head>
<mz:headsection id=Headsection1 runat="server"></mz:headsection>
</head>
<body>
<form id=Form1 runat="server">
<div align=center>
<table cellSpacing=0 cellPadding=0 width=855 border=0>
<mz:header id=Header runat="server" name="Header"></mz:header>
<mz:menu id=Menu runat="server" name="Menu"></mz:menu>
</table>
<!-- Main content table -->
<table id=main_frame_table cellSpacing=0 cellPadding=5 width=755
align=center
background=/images/maintable_bckgrnd.gif border=0>
<tr>
<td><!-- Table that contains the banners and content -->
<table id=banners_n_content cellSpacing=0 cellPadding=0 width=745
align=center border=0>
<TBODY>
<tr>
<td vAlign=top width=220><mz:leftbanner id=LeftBanner1
runat="server"></mz:leftbanner></td>
<!-- A transparent spacer cell to the right of the left-side
banners -->
<td width=5><IMG height=1 src="/images/1x1transparent.gif" width=5
</td> <td vAlign=top>
<!-- Table that contains main content -->
<table id=main_content height=251 cellSpacing=0 cellPadding=5
width=395 bgColor=#ffffff border=0>
<TBODY>
<tr>
<td class=BodyContentSmall vAlign=top align=center <p>
<mz:acctsmenu id=Accts_Menu runat="server"></mz:acctsmenu>
</p>
<p align=left>
<asp:label id=Lbl1 runat="server" ForeColor="Black"
Font-Names="Verdana"></asp:label>
</p>
<asp:repeater id=Repeater1 runat="server">
<headertemplate>
<table width="300" cellpadding="2" cellspacing="2"border=1>
<tr>
<td></td>
</tr>
</headertemplate>
<itemtemplate>
<tr>
<td>
<b>Name:</b>
</td>
<td><%# DataBinder.Eval(Container.DataItem, "fname") %> <%#
DataBinder.Eval(Container.DataItem, "lname") %></td>
</tr>
<tr>
<td><b>Street:</b></td>
<td><%# DataBinder.Eval(Container.DataItem, "addr1") %><%#
DataBinder.Eval(Container.DataItem, "addr2") %> </td>
</tr>
<tr>
<td><b>City:</b></td>
<td><%# DataBinder.Eval(Container.DataItem, "city") %> </td>
</tr>
<tr>
<td><b>State:</b></td>
<td><%# DataBinder.Eval(Container.DataItem, "state") %>
</td>
</tr>
<tr>
<td><b>PostalCode:</b></td>
<td><%# DataBinder.Eval(Container.DataItem, "postalcode") %>
</td>
</tr>
<tr>
<td><b>Country:</b></td>
<td><%# DataBinder.Eval(Container.DataItem, "country") %>
</td>
</tr>
<tr>
<td><b>E-Mail:</b></td>
<td><%# DataBinder.Eval(Container.DataItem, "email") %>
</td>
</tr>
<tr>
<td><b>Phone:</b></td>
<td><%# DataBinder.Eval(Container.DataItem, "phone") %>
</td>
</tr>
<tr>
<td><b>Username:</b></td>
<td><%# DataBinder.Eval(Container.DataItem, "handle") %>
</td>
</tr>
<tr>
<td><b>Password:</b></td>
<td><%# DataBinder.Eval(Container.DataItem, "password") %>
</td>
</tr>
</itemtemplate>
<footertemplate>
</table>
</footertemplate>
</asp:repeater>
<br>
<asp:repeater id=OurRepeater runat="server">
<headertemplate>
<table width="300" cellpadding="2" cellspacing="1" border="0">
<tr>
<td colspan="3"><h3>Employees for Northwind</h3></td>
</tr>
</headertemplate>
<itemtemplate>
<tr bgcolor="#AAAAAA">
<td>
<b>Name</b>
</td>
<td><b>Title</b></td>
<td><b>Hire Date</b></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><%# DataBinder.Eval(Container.DataItem, "fname") %> <%#
DataBinder.Eval(Container.DataItem, "lname") %> </td>
</tr>
<tr bgcolor="#AAAAAA">
<td><b>Address</b></td>
<td><b>City</b></td>
<td><b>Region, Postal Code, Country</b></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><%# DataBinder.Eval(Container.DataItem, "addr1") %>
</td>
<td><%# DataBinder.Eval(Container.DataItem, "city") %> </td>
<td><%# DataBinder.Eval(Container.DataItem, "postalcode") %>
<%# DataBinder.Eval(Container.DataItem, "country") %> </td>
</tr>
</itemtemplate>
<footertemplate>
</table>
</FooterTemplate>
</asp:repeater>
<p align=left&nbsp;</p></td> </tr>
</table>
<!-- End table main_content -->
</TD>
<!-- A transparent spacer cell to the left of the right-side banner -->
<td width=5><IMG height=1 src="/images/1x1transparent.gif" width=5</td>

<td vAlign=top width=120><mz:adthree id=Adthree1 runat="server"
name="Adthree1"></mz:adthree></td>
</TR>
</TBODY>
</TABLE>
<!-- End table banners_n_content -->
<mz:footer id=Footer1 runat="server" name="Footer1"></mz:footer>
</TD>
</TR>
</TBODY>
</TABLE>
<!-- End main_frame_table -->
</div>
</form>
</body>
</html>
In Code Behind file:

private void Page_Load(object sender, System.EventArgs e)

{

if(Session.Keys.Count !=0)

{

bizObj = new Biz_Layer();DataTable dt = new DataTable("CustInfo");

handle = Session["handle"].ToString();

fname = Session["fname"].ToString();

Lbl1.Text="<b>Welcome " + fname + "</b><br><br>";

Lbl1.Text+="The following display summarizes your current
registration information<br>";

Lbl1.Text+="To update any of the information, click the accompanying
edit button.<br><br>";

Repeater1.DataSource =
bizObj.GetCustomer(Session["handle"].ToString() );

OurRepeater.DataSource =
bizObj.GetCustomer(Session["handle"].ToString() );

DataBind();

custInfo = new string[12];

}

else

Response.Redirect("/login.aspx");

}

Thanks in advance for any suggestions

Frank
Feb 10 '06 #1
1 1700
first, verify that you have data when you run bizObj.GetCustomer(), if
there is nothing returned, then you know its a problem in bizObj

if you have data there, just try to print it out to a label first to
see if you can see the data. if you can, then you might have a problem
in your repeater html tags. view the source of the page and see if you
can see html outputted just not displayed. Sometimes, if you mess up
your table tags, it will render but since the browser has a problem
with the tags, it wont display

Feb 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1748
by: mark | last post by:
My problem is I need to have a "nested" repeater. I have an array which I load into a hashtable - that part works great. I can setup the second repeater to work just fine, as long as it's not...
2
3269
by: Stephen Miller | last post by:
I am using the OnItemDataBound event of Repeater control to nest a DataGrid within the Repeater. When I attempt to bind to the DataGrid using the DataSource method I get the error message "Object...
2
2119
by: Colin Nicholls | last post by:
Platform: ASP.NET 1.1 I have a repeater nested inside another repeater. My outer repeater is looping fine. I am manually binding the inner repeater to a DataReader obtained from another...
8
2893
by: I am Sam | last post by:
Hi everyone, This problem is making me old. I don't want to get any older. I have a multi-nested repeater control as follows: <asp:Repeater ID="clubRep1" Runat="server">...
3
4109
by: Shimon Sim | last post by:
I put linkbutton in a repeater header. I attached event handler in makeup as onclick="btnSort_Click". Made btnSort_Click method public. It doesn't fire if I click on it. I tried to attach it in...
2
1898
by: mark | last post by:
(not sure if this is the correct group) My problem is I need to have a "nested" repeater. I have an array which I load into a hashtable - that part works great. I can setup the second repeater...
0
4083
by: uncensored | last post by:
Hello everyone, I'm fairly new at .Net and I have a repeater inside a repeater problem. I will attach my code to this message but basically what I am able to tell when I run my page it tells me...
7
2992
by: | last post by:
I have what's probably a simple page lifecycle question related to dynamically evaluating values that are placed by a repeater and dynmically placing user controls that use those values. I'm...
1
7120
by: jazzart | last post by:
Hi there, I'm fairly new to programming with Asp.Net 2.0 so I'm finding myself regularly fumbling around in the dark a bit, so to speak. I'm currently using Visual Web Developer and have been...
2
1851
by: Hong | last post by:
Hi, I have been scratching my head over this problem for hours, the repeater control I am using would only render the controls specified in HeaderTemplate and FooterTemplate, but the repeater...
0
7103
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7021
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.