0

Hi guys,

I have a dropdownlist binded to a sqldatasource and the result set contains about 394,000 serial no. This is making the page crash and i cannot mess with the table architecture. I would like to know if trhere is a way to limit the results and then retrieving more after the user has scrolled down more. I believe it could be done with sql cursor fetch and previous but i dont know how to implement it to the dropdownlist. If someone could be of help i would appreciate it.

Thanks

6
Contributors
8
Replies
9
Views
5 Years
Discussion Span
Last Post by __avd
0

Is this classic asp or asp.net. I only ask because asp is the only indication in the title. It makes a difference whether we are talking about controls or html with integrated server code.

0

This can be done using a jquery plugin(waypoints) and ajax, i dont thing with out using AJAX or ASP.NET AJAX this cannot be acheived

0

Well actually is asp.net c#, i opted out with a textbox and a ajax autocomplete extender but i will look into the waypoints... I just never used jquery

0

Some way you need to categorize your ids, i think binding those many items to a drop down list will definitely make the page to crash down.

0

binding those many items to a drop down

it did but since i cannot change the database keys etc i opted out with an autocomplete extender

autocomplete extender

0

you could try using the onscroll event (the HTML select control supports this event) to call an ajax function which will trigger your sql cursor.

But due to the sheer quantity of data you are dealing with, you might be better served to use a datalist or something with paging capability to make it easier for your users to work their way through it all.

0

I would like to know if trhere is a way to limit the results and then retrieving more after the user has scrolled down more.

If you've Ms-Sql server database then you may fetch limited rows from the table.

SELECT * FROM 
       ( SELECT *, ROW_NUMBER() OVER (ORDER BY ColumnName) as row FROM TableName)
        a 
       WHERE row >= 1 and row <= 10

If you're working with mysql then use LIMIT clause with SELECT statement.

Have a look at Code project article - Paging of Large Resultsets in ASP.NET

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.