Last post Oct 19, 2016 08:24 AM by PatriceSc
Oct 19, 2016 05:49 AM|Mounesh|LINK
I have property in code behind as shown below
private StundentBusinessEntities vsStudentDetails
return (StundentBusinessEntities )ViewState["StudentDetails"];
ViewState["StudentDetails"] = value;
here StudentBusinessEntities is class which is having entities
Oct 19, 2016 06:14 AM|PatriceSc|LINK
Viewstate is an encrypted hidden field which is just intended to be posted back to the server (ie this is a server side page state). You could:
- if what you need depends on user input (ie you don't know what you'll need when the page loads), you could use Ajax to call a service to deliver or validate the data
Here it seems really a wrong path so I would suggest to just post about what you want to do (rather than about how you think it could be done).
Oct 19, 2016 06:31 AM|Mounesh|LINK
Hi thanks for replying ,
actually we have a gridview we are binding it based on that property data but is taking time , my intention is if we can bring that property values in client side we can display gridview very fast
for your information gridview is opening with modal popup-extender and that is getting open by link button click event of another gridview .
Oct 19, 2016 08:24 AM|PatriceSc|LINK
Then make sure first to understand what is slow. Do you need to keep this in the viewstate? Keep in mind that it is send back and forth with each http request so it's best to keep that as small as possible. Have you tried to just bind again from your db? It
might be quicker to just query your db from your web server rather than to transmit a fair amount of data with each http request between the client browser and the web server. If needed you likely have better options rather than to persist your gridview data
in the viewstate (such as caching data server side).
Another common issue when starting web programming is to show hundreds if not thousands of rows creating a huge HTML page that takes time to download and render. Instead it's best to let the user tell which date he wants using filters and use paging to show
50 or 100 rows at a time.