Home All Groups Group Topic Archive Search About

Splitting a Table into 2 Parts.

Author
2 Feb 2007 5:45 PM
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

Author
2 Feb 2007 6:01 PM
Cowboy (Gregory A. Beamer)
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!
********************************************
Show quote
"JohnSouth" <JohnSouth***@gmail.com> wrote in message
news:1170438326.293622.76950@a75g2000cwd.googlegroups.com...
> 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
>
Author
5 Feb 2007 9:07 AM
JohnSouth
Thanks Gregory

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

Cheers

John South


On 2 Feb, 18:01, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo...@comcast.netNoSpamM> wrote:
Show quote
> 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!
> ********************************************"JohnSouth" <JohnSouth***@gmail.com> wrote in message
>
> news:1170438326.293622.76950@a75g2000cwd.googlegroups.com...
>
>
>
> > 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
>
> >JohnSouth
> > Pangbourne UK- Hide quoted text -
>
> - Show quoted text -

AddThis Social Bookmark Button