473,372 Members | 821 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,372 software developers and data experts.

How can I show 2 records beside each other?

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
Mar 12 '06 #1
16 1739
Do you mean only two records or many records in two by two?

Elton Wang

"William Buchanan" wrote:
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

Mar 12 '06 #2
Thanks for the reply.

I have a table with around 100 records. I want to show the records 2 at a
time.

They need to be beside each other since each one has a large image
associated with it (so each record will occupy half of the page).

PS. I am using ASP.NET 2.0

Will

"Elton W" <El****@discussions.microsoft.com> wrote in message
news:5F**********************************@microsof t.com...
Do you mean only two records or many records in two by two?

Elton Wang

"William Buchanan" wrote:
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


Mar 12 '06 #3
Look into the Repeater object.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in message
news:Op**************@TK2MSFTNGP14.phx.gbl...
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

Mar 12 '06 #4
Again, as suggested earlier, look into the Repeater object.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in message
news:u%****************@tk2msftngp13.phx.gbl...
Thanks for the reply.

I have a table with around 100 records. I want to show the records 2 at a
time.

They need to be beside each other since each one has a large image
associated with it (so each record will occupy half of the page).

PS. I am using ASP.NET 2.0

Will

"Elton W" <El****@discussions.microsoft.com> wrote in message
news:5F**********************************@microsof t.com...
Do you mean only two records or many records in two by two?

Elton Wang

"William Buchanan" wrote:
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


Mar 12 '06 #5
I have looked into the repeater object. As far as I could see, you can bind
it to the data of the current record only.

Are you saying it is possible to bind it to the next record as well?

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Oy*************@TK2MSFTNGP10.phx.gbl...
Look into the Repeater object.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in
message news:Op**************@TK2MSFTNGP14.phx.gbl...
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


Mar 12 '06 #6
re:
I want to show 2 records on a page side by side. Are you saying it is possible to bind it to the next record as well?


That doesn't seem so impossible to do.

See a sample at :
http://www.dotnetjunkies.com/quickst.../Pagelet6.aspx

The source for that is at :
http://www.dotnetjunkies.com/quickst...s/Pagelet6.src


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in message
news:uh**************@tk2msftngp13.phx.gbl...I have looked into the repeater object.
As far as I could see, you can bind it to the data of the current record only.

Are you saying it is possible to bind it to the next record as well? "Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Oy*************@TK2MSFTNGP10.phx.gbl...
Look into the Repeater object.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in message
news:Op**************@TK2MSFTNGP14.phx.gbl...
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

Mar 13 '06 #7
On Sun, 12 Mar 2006 23:38:09 -0000, William Buchanan wrote:
I have looked into the repeater object. As far as I could see, you can bind
it to the data of the current record only.

Are you saying it is possible to bind it to the next record as well?


Stop and think for a moment. How exactly could it be a "repeater" control
if it could only bind to one record?
Mar 13 '06 #8
Hi William,

You can use either Repeater or DataList to do it. Either one can be bound
with data source (DataSource, ObjectDataSource, or DataTable/DataSet which
retireve data). Repeater or DataList will loop thru data records for you and
you can give its layout in a more flexible style (compare to GridView and
DataGrid).

HTH

Elton Wang

"William Buchanan" wrote:
Thanks for the reply.

I have a table with around 100 records. I want to show the records 2 at a
time.

They need to be beside each other since each one has a large image
associated with it (so each record will occupy half of the page).

PS. I am using ASP.NET 2.0

Will

"Elton W" <El****@discussions.microsoft.com> wrote in message
news:5F**********************************@microsof t.com...
Do you mean only two records or many records in two by two?

Elton Wang

"William Buchanan" wrote:
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


Mar 13 '06 #9
That is not what I said. If you read my posting again I said "current
record".

The actual problem is that I want it to bind to the current and the next
record.
"Erik Funkenbusch" <er**@despam-funkenbusch.com> wrote in message
news:hn***************@funkenbusch.com...
On Sun, 12 Mar 2006 23:38:09 -0000, William Buchanan wrote:
I have looked into the repeater object. As far as I could see, you can
bind
it to the data of the current record only.

Are you saying it is possible to bind it to the next record as well?


Stop and think for a moment. How exactly could it be a "repeater" control
if it could only bind to one record?

Mar 13 '06 #10
Thanks for the reply. I am missing something so please bear with me!

I can see how the repeater can be used to repeatedly display all records in
a table (as can a datalist). However, I only want to see 2 records at a
time. This means that I need to show the first 2 records, then when I click
"Next" it will show the next 2 records, and so on.

I know this can be done through lots of code, but I was hoping that there
would be some way of doing it by using the data components.

Will

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
re:
I want to show 2 records on a page side by side.

Are you saying it is possible to bind it to the next record as well?


That doesn't seem so impossible to do.

See a sample at :
http://www.dotnetjunkies.com/quickst.../Pagelet6.aspx

The source for that is at :
http://www.dotnetjunkies.com/quickst...s/Pagelet6.src


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in
message
news:uh**************@tk2msftngp13.phx.gbl...
I have looked into the repeater object.
As far as I could see, you can bind it to the data of the current record
only.

Are you saying it is possible to bind it to the next record as well?

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Oy*************@TK2MSFTNGP10.phx.gbl...
Look into the Repeater object.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in
message
news:Op**************@TK2MSFTNGP14.phx.gbl...
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


Mar 13 '06 #11
Is this (http://aspnet.4guysfromrolla.com/articles/081804-1.aspx) the
sort of thing that you're looking for?

Mar 13 '06 #12
On Mon, 13 Mar 2006 08:53:25 -0000, William Buchanan wrote:
That is not what I said. If you read my posting again I said "current
record".
This is incorrect. The repeater binds to as many records as you have in a
dataset. If your dataset contains one record, it will bind to the current
record. If it contains two records, it will bind to two records, etc..
The actual problem is that I want it to bind to the current and the next
record.


Easily solveable by using a paging algorithm. Sajarki points you to one
example, another is here:

http://weblogs.sqlteam.com/jeffs/arc...3/22/1085.aspx

This returns as many records as you want at a time, and lets you set the
"next" and "previous" controls to get the next or previous set.
Mar 13 '06 #13
That is exactly what I was after!

Many thanks.

Will
"Sajaraki" <iv*********@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Is this (http://aspnet.4guysfromrolla.com/articles/081804-1.aspx) the
sort of thing that you're looking for?

Mar 13 '06 #14
Thanks

"Erik Funkenbusch" <er**@despam-funkenbusch.com> wrote in message
news:1n****************@funkenbusch.com...
On Mon, 13 Mar 2006 08:53:25 -0000, William Buchanan wrote:
That is not what I said. If you read my posting again I said "current
record".


This is incorrect. The repeater binds to as many records as you have in a
dataset. If your dataset contains one record, it will bind to the current
record. If it contains two records, it will bind to two records, etc..
The actual problem is that I want it to bind to the current and the next
record.


Easily solveable by using a paging algorithm. Sajarki points you to one
example, another is here:

http://weblogs.sqlteam.com/jeffs/arc...3/22/1085.aspx

This returns as many records as you want at a time, and lets you set the
"next" and "previous" controls to get the next or previous set.

Mar 13 '06 #15
What you're looking for is Paging.
It doesn't take much coding to implement it.

The reference you were given :
http://aspnet.4guysfromrolla.com/articles/081804-1.aspx
is an excellent guide.

There's other approaches, like :
http://www.411asp.net/func/content?t...gre&id=4628710
and
http://www.vbdotnetheaven.com/Code/Sept2003/2173.asp

Here's a ready-made PagingRepeater control, complete with its free code,
which you could probably easily adapt to your needs :

http://www.codeproject.com/aspnet/pagingrepeater.asp

You'll need to join the Code Project to download the code,
but it's free and they don't bug you with spam.

Good luck!

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@freenet.co.uk> wrote in message
news:OM**************@TK2MSFTNGP14.phx.gbl...
Thanks for the reply. I am missing something so please bear with me!

I can see how the repeater can be used to repeatedly display all records in a table (as can a
datalist). However, I only want to see 2 records at a time. This means that I need to show the
first 2 records, then when I click "Next" it will show the next 2 records, and so on.

I know this can be done through lots of code, but I was hoping that there would be some way of
doing it by using the data components.

Will "Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
re:
I want to show 2 records on a page side by side.
Are you saying it is possible to bind it to the next record as well?


That doesn't seem so impossible to do.

See a sample at :
http://www.dotnetjunkies.com/quickst.../Pagelet6.aspx

The source for that is at :
http://www.dotnetjunkies.com/quickst...s/Pagelet6.src


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in message
news:uh**************@tk2msftngp13.phx.gbl...
I have looked into the repeater object.
As far as I could see, you can bind it to the data of the current record only.

Are you saying it is possible to bind it to the next record as well?

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Oy*************@TK2MSFTNGP10.phx.gbl...
Look into the Repeater object.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in message
news:Op**************@TK2MSFTNGP14.phx.gbl...
> 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



Mar 13 '06 #16
Great - thanks for all your help.

Will
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Ol**************@TK2MSFTNGP11.phx.gbl...
What you're looking for is Paging.
It doesn't take much coding to implement it.

The reference you were given :
http://aspnet.4guysfromrolla.com/articles/081804-1.aspx
is an excellent guide.

There's other approaches, like :
http://www.411asp.net/func/content?t...gre&id=4628710
and
http://www.vbdotnetheaven.com/Code/Sept2003/2173.asp

Here's a ready-made PagingRepeater control, complete with its free code,
which you could probably easily adapt to your needs :

http://www.codeproject.com/aspnet/pagingrepeater.asp

You'll need to join the Code Project to download the code,
but it's free and they don't bug you with spam.

Good luck!

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@freenet.co.uk> wrote in message
news:OM**************@TK2MSFTNGP14.phx.gbl...
Thanks for the reply. I am missing something so please bear with me!

I can see how the repeater can be used to repeatedly display all records
in a table (as can a datalist). However, I only want to see 2 records at
a time. This means that I need to show the first 2 records, then when I
click "Next" it will show the next 2 records, and so on.

I know this can be done through lots of code, but I was hoping that there
would be some way of doing it by using the data components.

Will

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
re:
> I want to show 2 records on a page side by side.
Are you saying it is possible to bind it to the next record as well?

That doesn't seem so impossible to do.

See a sample at :
http://www.dotnetjunkies.com/quickst.../Pagelet6.aspx

The source for that is at :
http://www.dotnetjunkies.com/quickst...s/Pagelet6.src


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in
message
news:uh**************@tk2msftngp13.phx.gbl...
I have looked into the repeater object.
As far as I could see, you can bind it to the data of the current
record only.

Are you saying it is possible to bind it to the next record as well?

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Oy*************@TK2MSFTNGP10.phx.gbl...
> Look into the Repeater object.
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en español : http://asp.net.do/foros/
> ===================================
> "William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in
> message
> news:Op**************@TK2MSFTNGP14.phx.gbl...
>> 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



Mar 13 '06 #17

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

Similar topics

2
by: John Baker | last post by:
Hi: I have a sub form which i would like to show all the records selected from a table. There may well be over 100 of them. For reasons I cant fathom, the form will only show six, and then...
4
by: MLH | last post by:
I have a combo box control on a form and a text box beside it in which I would like to display the number of listings in the combo-box. The combo box lists more or fewer rows depending on the...
0
by: Tom Kaminski [MVP] | last post by:
I want to show a table of master records, with the right most column displayed as a comma (or space) delimited list of details. The practical application of this is a thesaurus, where the master...
2
by: Zeljko | last post by:
I'm creating Address book. Header of the main form (frmAddress) contains combo box (cboFilter) to filter records by Occupation on main Form(Ocupation1). That's working. Combo box also have "Show...
0
by: mingr9 | last post by:
hi, my first post here... i am doing a database system that need VB6 to access the Database. The database is make in MS Access 2003. There is Hyperlink column in one of the table.... i able...
29
AccessIdiot
by: AccessIdiot | last post by:
I'm sure this must be possible but I'm still a newbie and not sure how to do it. Part One: Using the good 'ol customers and orders tables and forms example - how would I go about putting a little...
2
by: banderson | last post by:
Hello, I have a data entry form for a table with information about buildings and am having a problem making a combo box do what I want. I would like to make the combo box show a list of unique bldg...
8
by: jmarcrum | last post by:
Hello all, i have a continuous form that displays about 1000 records and opens when I click a button. When the form opens, the user has the option of checking a checkbox that is located beside...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.