C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

maitaining the state of the page


Posted Date: 21 Nov 2008      Posted By: Preet      Member Level: Gold     Points: 1   Responses: 4



I am using menu control for the navigator and populating it from the database at run tme, but as soon as i click at any button, i loose all of them. Now I realise that it is due to the stateless property of the pages, but whay should i do to resolve this.
Is it suggested to call the procedure to populate menu on every postback event?
Many Thanks





Responses

Author: Williams    21 Nov 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 3

Hi,when u get the data using the stored procedure for the first time try storing it in the Cache and then use the data in the cache for subsequent requests instead of calling procedure every time.


Author: Sankar Venkat    21 Nov 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 1

Did you set EnableViewState = True?

Regards,
Sankar



Author: Preet    24 Nov 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 1

Hello Sankar
Yes, EnableViewState is already TRUE.



Author: Preet    24 Nov 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 3

Thanks williams for your reply, I would now store the datatable in session varibale and populate menu on every page load event.
Hope it would work, if i m wrong please let me know



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Add reference to an assembly from GAC
Previous : Creating Virtual Directory
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use