repeater

Format Data in an ASP.NET Repeater

Hello, I have an ASP.NET web form that uses an ASP.NET Repeater. The data source for this repeater is a DataTable that includes a column called "City", and one called "State". In the ItemTemplate of the Repeater, I want to call a custom method I've written called "FormatLocation". This method is defined as: protected string FormatLocat...

Problem with ASP Repeater and SQL Data Source

Hi! Here's my data table in my SQL DB, and below that is the code for my Repeater control: ArticleID int NOT NULL, ArticleTitle varchar(100) NOT NULL, ArticleCategory int NOT NULL, ArticleDate datetime NOT NULL, ArticleContent text NOT NULL, DeletedYN char(3) NOT NULL <asp:Repeater runat="server" ID="rptArticles" DataSourceID="dsLates...

How to use asp:placeholder inside a repeater

I have a HTML table that is built with a repeater. Sometimes the table has 5 rows, sometimes it has 8 rows. It was easy to add the header rows. <asp:PlaceHolder runat="server" ID="additionalHeaderColumns" /> In code behind I added controls (htmlheadercells) to the contentholder: Dim tableHeaderCell As New TableHeaderCell() ...

OnItemDataBound doesn't show full list of items bound

I have a repeater that has an OnItemDataBound event on it. For some reason the repeater has three items being bound to it. But then I try the below it only writes '2' at the top of the page. The repeater itself does show the three items but this loop in the ondatabound event doesnt see the last item. Why? protected void colourRepeater_I...

ASP.NET Repeater ItemCreated Event Binds the Same Item Over and Over

I have a Repeater on my page. There's nothing spectacular about it. <asp:Repeater runat="server" ID="rptBusiness"> <HeaderTemplate> <table> <colgroup> <col width="170px" /> <col width="75px" /> <col width="75px" /> </colgroup> <tr> ...

Repeater renders as <div> on first page load and re-renders as <table> after postback

I'm running into a weird issue. I'm using a repeater to render a list of products. On initial page load, my repeater renders as a <div>. After I postback (via jQuery), it comes back as a <table>. Is there some way I can prevent it from coming back as a <table>? As you can imagine, we run into style and selector issues when it come...

Problems passing properties into UserControl Asp.Net

I'm trying to create a UserControl in ASP.NET to display news items based on two values that are passed in, NewsTag and ItemLimit. The problem is that the SQLdatasource is not picking up the properties in SqlDataSource1_Init. Instead the calls to the properties are empty when this is called but after render have values. <script runat="s...

Linq to XML adding to List Problem send to repeater.

I need to get data from a XML file from Node1>Node2 Filter data to group from the xml by X Node where X node is equals A,Y,Z.. Group all elements with same X Node value ordered by date Store first element of the group(as ordered by date would be by the latest), and the rest in a subgroup of the same object. If in the filter fails to ...

asp.net repeater control for displaying images and associated names

Hi, I want to implement an image gallery in asp.net/C#. I am using sql server 2008, visual studio 2010 and .NET 4.0. I have made a webpage and now want to display 6 images as thumbnails (and their names just below the thumbnails) at the center of the page. The format of the display is something like this: img1 img2 img3 `<name...

ASP.NET Repeater Selection

I have a select button(LinkButton) inside the Repeater.When i select the button that row should be appear in ListView control.But Repeater control does not support DataKey,then how can i achieve this? ...

Unable get Label.text in ASP.Net Repeater using FindControl

I can access the text within a textbox within my repeater, but I am unable to pull the text value from a label within my repeater. The repeater is populated from a datatable with row(x) being filled by sqlreader(x), I don't know if that makes a difference. I cannot use javascript for this. I need to access the label value from the codebe...

Databinding two sql tables to one repeater

Hi, I'm very new to using Linq-to-SQL, that's why I'm asking this question. I've searched the site, but can't seem to figure out how to do this. My problem is: I have a database mapped with LINQ to SQL: Table 1: PersonalTasks TaskId Header [Content] IsDone CreatedDate Table 2: Comments CommentId TaskId UserId Comment CreatedDate ...

Creating default templates on Repeater that are overridable by users

I have a webforms control, my:Repeater, that is an asp:Repeater. I want to make a default template, like: <my:Repeater> <HeaderTemplate> My Default Header </HeaderTemplate> <ItemTemplate> My data </ItemTemplate> <FooterTemplate> My Default Footer </FooterTemplate> </my:Repeater> I want this template to be in so...

ASP.NET repeater control overlapping for some users

My whole websites makes use of the ASP.NET(2.0) repeater control and I have been getting some complains from people that they cant view my site as the controls are overlapping. This sounds like a browser issue to me as I never see it in IE8 or IE7 or Chrome or Firefox. Any idea why this is happening? What should I do to prevent this fr...

ASP.NET Repeater not binding after ItemCommand

Hello I have a repeater that is looping a user control, like this: <asp:Repeater ID="repItems" runat="server" EnableViewState="false" OnItemCommand="repItems_ItemCommand"> <ItemTemplate> <dmg:confirmItem runat="server" OnDataBinding="confirmitemItem_DataBindi...

asp.net repeater with usercontrol - setting commandargument

Hello I have the following repeater code: <asp:Repeater ID="repMain" runat="server" OnItemCommand="repMain_ItemCommand" EnableViewState="false"> <ItemTemplate> <dmg:testcontrol runat="server" MyData=<%#Container.DataItem %>> </dmg:testcontrol> </ItemTemplate> </asp:Repeater> The testcontrol usercontrol looks li...