473,231 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Display records similar to Classic ASP using DataList or Repeater


Hi,

I have to display a sequence of records in an Aspx page. The problem
is, i have to display the records by checking conditions like Classic
ASP.

For example, consider an employee table. In my case the employees'
details should be displayed in Alphabetical order.The employee names
starting with "A" should display two extra HTML rows showing some more
details.

I've to display the employee name starting with "B"(Only one row) as
bold and Consequent records(Starting with "C","D","E",...) should be
shown without bold.

The controls may be either Repeater or Datalist, but not DataGrid. I
prefer using Repeater.

This scenario can be well done in ASP. But in ASP.NET it is an
headbreaking issue for me. Is ASP.NET not that powerful like ASP? I
have to migrate at any cost.

Does anyone know how to achieve it?
Thanks in advance


Kas_Aspnet

--
Kas_aspnet
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 19 '05 #1
1 2282
I have no idea how you achieve the goal in classic ASP, but in ASP.NET it is
pretty straightforward.

Repeater is fine. You need to make an ItemTemplate that will suit all your
requirements. It should include two extra rows for the employees with names
starting with 'A'. You need to handle either DataItemBound or PreRender
event. In the event you can access item data to get the employee name.
Depending on the name you will set appropriate visual properties for the
elements in the ItemTemplate. If the name start with 'A', you will hide two
extra rows. If the name start with 'B', you will set item to font to bold.
There are also other ways of achieving the same result, but setting
properties in code-behind events is the most flexible one.

Eliyahu

"Kas_aspnet" <Ka***************@mail.codecomments.com> wrote in message
news:Ka***************@mail.codecomments.com...

Hi,

I have to display a sequence of records in an Aspx page. The problem
is, i have to display the records by checking conditions like Classic
ASP.

For example, consider an employee table. In my case the employees'
details should be displayed in Alphabetical order.The employee names
starting with "A" should display two extra HTML rows showing some more
details.

I've to display the employee name starting with "B"(Only one row) as
bold and Consequent records(Starting with "C","D","E",...) should be
shown without bold.

The controls may be either Repeater or Datalist, but not DataGrid. I
prefer using Repeater.

This scenario can be well done in ASP. But in ASP.NET it is an
headbreaking issue for me. Is ASP.NET not that powerful like ASP? I
have to migrate at any cost.

Does anyone know how to achieve it?
Thanks in advance


Kas_Aspnet

--
Kas_aspnet
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 19 '05 #2

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

Similar topics

3
by: olle | last post by:
Hi everyone. Beging a newbee to asp.net and used to work with traditional asp I have one problem working with a datalist. 1/ I make a dataset as as session variable like session("employees") 2/...
3
by: Jeremy Ames | last post by:
I am trying to use a datagrid to pull information from a database. I prefer to use latebinding to this. Well, I finally got my information to populate the datagrid, but the information came out in...
4
by: darrel | last post by:
I've been working on a few userControls that display data. I've been using datalists and repeater controls for this. I bind the data to the datalist or repeater, then display it. However,...
4
by: Patrick.O.Ige | last post by:
I'm DataBinding a CheckBoxList and i want to get the checkboxes selected when the page is loaded depending on a Boolean value from the Database.. chkDebtor.DataSource = objDR...
16
by: William Buchanan | last post by:
Hi folks I want to show 2 records on a page side by side. Each record has an image which will be displayed and a bit of text. How can I do this? Thanks Will
4
by: Guy | last post by:
I'm a little bit confused as what is the bes way to achieve the following: I have 2 database tables, table 1 product en table 2 image. For every product record there can be 0-1 or more image...
3
by: Augustin Prasanna | last post by:
I need to display some 200 records (dynamic) on the screen.. I need to display records from 2 tables (one to many relationship) output would look like Customer Id Name Phone NO 1 abc ...
6
by: Ken Fine | last post by:
I'm using SQLDataSource, which generates some kind of dataset, and then I attach that datasource to various data display controls such as DataList and repeater which loop through to the end of the...
7
by: Dave | last post by:
I'm stuck on something and I've been trying to find some examples on it. I'm trying to show the data to my users as such: year1 year2 Q1 Q2 Q1 Q2 Smith my dataset...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.