Splitting a Table into 2 Parts.

  • Thread starter Thread starter JohnSouth
  • Start date Start date
J

JohnSouth

My ASP.Net site gets a Dataset from a SQL Stored procedure and then
binds Table[0] to a Repeater control in order to display the results.
The default is 10 per page.

Here is the resulting page:

http://www.wherecanwego.com/whats_on/London/events.aspx

I want to insert a Google Adsense panel in the middle of the results,
between records 5 and 6.

The first step seems to be creating 2 tables with 5 records in each,
to bind to 2 repeater controls.

Can someone suggest the most efficient way (speed and memory-wise) of
creating 2 Tables, with 5 records in each, from the original Table of
10 records.

Thanks

John South
Pangbourne UK
 
You can filter the results so the second table only pulls records from a
specific spot in the record. You will have to figure out record 6 to do
this, but a DataView filtered works fine.

You can use a repeater, instead, and display the google bits in row 5 (at
bottom) or 6 (at top) and avoid having two tables. Or, inherit from the
table class and create your own output method. The repeater is fast and
flexible, so I would aim that way first.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

********************************************
Think outside the box!
********************************************
 
Thanks Gregory

That worked fine. I just identified record 5 and put the Google bits
at the end. Well done.

Cheers

John South


You can filter the results so the second table only pulls records from a
specific spot in the record. You will have to figure out record 6 to do
this, but a DataView filtered works fine.

You can use a repeater, instead, and display the google bits in row 5 (at
bottom) or 6 (at top) and avoid having two tables. Or, inherit from the
table class and create your own output method. The repeater is fast and
flexible, so I would aim that way first.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBAhttp://gregorybeamer.spaces.live.com

********************************************
Think outside the box!



My ASP.Net site gets a Dataset from a SQL Stored procedure and then
binds Table[0] to a Repeater control in order to display the results.
The default is 10 per page.
Here is the resulting page:

I want to insert a Google Adsense panel in the middle of the results,
between records 5 and 6.
The first step seems to be creating 2 tables with 5 records in each,
to bind to 2 repeater controls.
Can someone suggest the most efficient way (speed and memory-wise) of
creating 2 Tables, with 5 records in each, from the original Table of
10 records.

JohnSouth
Pangbourne UK- Hide quoted text -

- Show quoted text -
 
Back
Top