Shufle numbers from a file using C# & ASP.NET

  • Thread starter Thread starter dungdang
  • Start date Start date
D

dungdang

I have a file that contains a single colum per row, about 20,000 rows
like :

2345607
2342374
2434522
1432334
1326514
7768518
7612364
...

On the APS.NET page, I have two buttons:
btnStart,
btnStop,
lblDisplayShuflle
I want to shufle these numbers, and show them shufling either on a
Label, Textbox etc..

How to go about this?


okg,
 
When you say "Shufle" - do you mean "shuffle" like a deck of cards?

Any kind of dynamic display like this needs to be done client-side in the
browser via javascript and dynamic manipulation of the HTML Dom.

Peter
 
All I want is to display the numbers being read either sequentially or
randomly and skipped until btnStop is pressed, also can set timer to
stop and display one number instead of clicking a stop button
(btnStop)....also...the numbers can be read from a file or possibly
can be read from a database table (Access or SQl Server)..whichever
feasible...

any leads is appreciated!

dd;
 
You could try and use AJAX to update a panel with the next value, and pull
each next value from the database through an AJAX call - but its a lot of
queries if you do them one at a time - so you will need to work out an
efficient way of doing this through the cache object.

Regardless, you will have to do some form of client scripting to accomplish
this.

You should have enough information from this thread now to create a solution
for yourself.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
 
Back
Top