Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / November 2003

Tip: Looking for answers? Try searching our database.

ViewState vs Cache Which is best in my situation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Reddy - 30 Oct 2003 05:41 GMT
Hi!,
 First I will explain what i am doing.

Basically i have two pages.
1) List all the records he has to do work, and he can sort by anyfield.
2) When he clicks on one of the records in the list of records, he will redirected to a page, to that perticular record, where he can also work them in that sort order. by Clicking next, prev, last, first.

I am creating a array of primarykey, when he enters into the work page. Saving that in viewstate. And when he clicks next or last, i will get that primarykey from the array and query against database. One user can have 1000s of records.

But i read that viewstate can't be used for large memories...

What's the solution in my condition.

Please help me somebody.
Alvin Bruney - 26 Nov 2003 03:28 GMT
Do not store large records in viewstate. The reason is that viewstate
round-trips on every postback so you will be lugging around these 1000
records to and fro. Store little strings. If you have the index as a string,
then that is fine. If you intend to store all the records, consider session
or cache.

Regards
Alvin Bruney
> Hi!,
>   First I will explain what i am doing.
>
> Basically i have two pages.
> 1) List all the records he has to do work, and he can sort by anyfield.
> 2) When he clicks on one of the records in the list of records, he will redirected to a page, to that perticular record, where he can also work them
in that sort order. by Clicking next, prev, last, first.

> I am creating a array of primarykey, when he enters into the work page. Saving that in viewstate. And when he clicks next or last, i will get that
primarykey from the array and query against database. One user can have
1000s of records.

> But i read that viewstate can't be used for large memories...
>
[quoted text clipped - 3 lines]
>
> Reddy

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.