Vb.net - Gridview Datasource Caching?

Sep 16, 2010

I currently have a control that called MyGridview that inherits Gridview. It has a paging template within it for customized paging options, and I'm at the point where I want to cache the initial datasource for better performance. I haven't done this in a long time, so perhaps there is a different solution these days with the newer frameworks. Before, I simply used a Cache object that was named whatever the gridview was named. I couldn't use the same gridview name through the application though. Is there a best way to have a cache object, or some other object like a session within the control to store those unique datasets for paging and sorting?

View 1 Replies


Similar Messages:

DataSource Controls :: Disable SQLDataSource Caching?

Aug 9, 2010

What am I missing here? The data is being cached and I need to turn it off.

[Code]...

View 2 Replies

State Management :: Partial Page Caching (user Control Caching) And Button Events?

Jun 14, 2010

I have a page with a number of user controls, In one of my user controls I have a button event. I turn on output cache for the user control that has the button and vary by control using the ID property of a hidden field control in the user control. whenever I turn on the output cache my button event doesn't fire.

View 2 Replies

WCF / ASMX :: Implement Caching Using System.Web.Caching?

May 15, 2010

how to implement caching in wcf service using System.Web.Caching

View 2 Replies

Caching Gridview Data In Session?

Jan 28, 2011

I have a reporting page with a gridview and a calendar. When the user loads the page, the default date is today and when he clicks on a date in the calendar control, it loads the reporting data for that day. Each user has a different report and the data is between 300-500 rows per day. At the moment, I have a linq query that returns the data for a day in the form of a list. Given the relatively small amount of data per query, I'd like to store the result of the query in the session so that I can do the paging and sorting from the session, without going back to the data store.

What I'm looking to do is a list of lists so that when the query loads, the data is saved until the session times out. For instance, if the user selects 4-5 different dates, each of these queries is saved in the session and then if he clicks on one of those dates again, a function first checks to see if the data is in the session: GetQueryFromSession( DateTime TheDate). I'm stuck on this. How do you create a list of lists that works with the session object.

View 2 Replies

Forms Data Controls :: Gridview Paging And Caching?

May 11, 2010

Background of what I have implmented so far:

I've used datagrid view to show a list on records on page, the list contains huge number of records so paging was required. Since the amount of data was huge it was not advisable to bind the grid with complete data. So, I used custom paging and tweaked the sql statements to get page wise data. Now whenever user clicks next or previous data for current page is fetched from the database and gridview is binded with that much data only.

Now I had to add a checkbox column to the grid so that user can select multiple items on multiple pages and perform an operation (for example send email to selected people in the list). I achieved this by making a template column with checkbox control and keeping a boolean column in the datatable which is binded to the gridview. I've also kept a collection selected checboxes so that the state is maintained on every postback.

I've also used ajax so that user cannot see postback happeneing. Everything works just perfect.Here comes the problem:

Now say I have 5 pages of data to be displayed. I select 3 people from first page and move to next page, this will cause fresh databinding and previous data will be lost.Now I go on and select 3 more people from page 2Finally press the send mail button What is expected here is that the mail should be sent to 6 people but details of only 3 people are available because grid is rebinded.

What is the best way to cach data of selected rows in this case. The number of columns is around 20 out of which I show only 10 columns on screen and others are kept hidden. The values of hidden columns are used while sending the emails.

View 5 Replies

Forms Data Controls :: Gridview Is Caching , Does Not Update

Jan 19, 2010

I've this Gridview of tasks a Hyperlink TemplateField that takes the user to another page where he can accept/reject[buttons] the very task , on clicking accept/reject[buttons] the page redirect the user again to the tasks Gridview , unfortunately , the same task is still there unless if the user manually Press F5[Refresh] I tried the following nothing worked

1- EnableViewState ="false"

2- In the ObjectDataSource , EnableCaching ="false"

3-i tried to use Ajax but it gives me a whole lots of errors from the webconfig ,my website is working ,I can't stop users from accessing my site in order to wrestle with Ajax

the approach I am taking on developing my site is to work in my local machine when I am finished with my changes I literally Copy/Paste the new aspx/aspx.vb overwriting the old file with the new one , this approach is working fine but it causes the server to a bit slow esp. in the first time after change, is there a more Professional way?

View 5 Replies

Data Controls :: Caching Dataset When Binding To GridView

Apr 26, 2012

I have webpage with three dropdown boxes on left side (Country Dropdownbox, State Dropdownbox, City Dropdownbox) and these dropdown works independently or one box will depend on another. I have a gridview in right side and the results will be binding to the gridiew by selecting the left side dropdown boxes.

I need to implement the caching technology here because the web page loading very slow due to large amount of records. For example if i select any country from the first dropdown box and the other two boxes are default (Selected text is "ALL"), then It should display records related to selected country in gridview.

Further if I select country and state from the respective boxes then it should display the related records in the gridview like so on. Now i want do some caching functionality to improve the performance. I tried caching the Dataset while binding to gridview but in my case the results will not be static becasue user every time will select different options from different dropdown boxes and results will come based on the selected options.

View 1 Replies

Forms Data Controls :: Caching Doesn't Improve Gridview Performance?

Feb 17, 2011

I am trying to speed up a Gridview on my page that reads 8,000 records using an AccessDataSource. So I am trying to implement caching. I have used the information given here: [URL] but it has made no difference in the response time. Can anyone direct me on this? Is there something you have to specify in the gridview (besides the datasource). Would it work if I went to SQL Server?

This is my AccessDataSource code. You can see the 3 relevant lines starting 6 lines from the top.

[Code]....

View 1 Replies

Forms Data Controls :: GridView Caching / Updating With The Latest Results Of The SQL Query

Jun 17, 2010

I have 2 gridviews on a webpage that are fully editable. I also have a button, that when clicked, runs some SQL in codebehind to insert new rows into a data table. The gridview should then update with the latest results of the SQL query, which is does.

Then the user clicks on to the next page to do the next thing.The problem is, when they go back to the first page, they're still seeing the old, non-updated data. I've run the SQL from the page manually on the server, and the new data is there, but the GridView doesn't want to pull it.

View 2 Replies

DataSource Controls :: Configure Datasource Using Gridview?

Aug 18, 2010

i have one asp.net textbox control..and one dropdownlist inside gridview itemtemplate textbox..what my problem..?A Textbox36 has values some thing like this A1','A2','A3i wirte this below query in sqldatasource1 and this sqldarasource1 is binded to gridview ItemTemplate Dropdownlist..Select ItemName from Table1 where code in (@C)Here @C im refering to Textbox36..It show me the record if it has one value if its multiple like A1','A2','A3 it not showing/filtering ItemName data..

View 9 Replies

Can Implement Caching In MVC, If So How

Apr 4, 2011

Can I Implement Caching in MVC, If so how? I wanted to implement Cache in Controllers

View 2 Replies

Caching Css And .js Files?

Dec 5, 2010

I want to use caching technique for .js,.css and images( to avoid round trips and to improve performance of page load) .So, on IIS 7 using Http Response Header, i set Content Expriation to 7 days.Now, on browser its caching which is avoiding round trips for static content ...which is good sign.Now, i modified one of the .js file and i deployed that .js file on server and due to caching my new code is not reflecting on client machines .So i tried lot of ways and here is what i tried after deployment of new .js file After deployment of new .js file

1) I manually delete all the browser cache(cookies,urls,forms,page content etc) on internet explorer

2) used ctrl + f5 to get refresh

3) again on IIS i went back Http Response Header section and set Content Expriation to never

4) stopped the website and restarted

5) on web.config file tried this only

<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>

6) Also tried to set this on .aspx page

<HTML>
<HEAD>
<TITLE>---</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
<BODY>

7) tried to set this on .aspx.cs file

<% Response.CacheControl = "no-cache" %>>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>

My target browser is IE.None of them worked,Finally i renamed my .js file to different file name and changed code to make use of that new .js file ..but no luck on this too .Because what i set intially for 7 days still my client machine remembers that.

How do i tell IIS server to refresh cached content code , when some thing got changde on .js or .cssfiles?

View 1 Replies

Caching With Javascript And Asp

Mar 15, 2010

I asked a question a while back on here regarding caching data for a calendar/scheduling web app, and got some good responses. However, I have now decided to change my approach and stat caching the data in javascript. I am directly caching the HTML for each day's column in the calendar grid inside the $('body').data() object, which gives very fast page load times (almost unnoticable). However, problems start to arise when the user requests data that is not yet in the cache. This data is created by the server using an ajax call, so it's asynchronous, and takes about 0.2s per week's data.

My current approach is simply to block for 0.5s when the user requests information from the server, and cache 4 weeks either side in the inital page load (and 1 extra week per page change request), however I doubt this is the optimal method. how to improve the situation? To summarise:

Each week takes 0.2s to retrieve from the server asynchronously. Performance must be as close to real-time as possible. (however the data is not needed to be fully real-time: most appointments are added by the user and so we can re-cache after this) Currently 4 weeks are cached on either side of the inial week loaded: this is not enough. to cache 1 year takes ~ 21s, this is too slow for an initial load.

View 1 Replies

MVC :: Is The Page Caching?

Aug 20, 2010

I am just trying to understand the basics flow to the MVC framework by putting in some breakpoints in the beginning of the actions of a couple of controllers.

One break point is at the HomeController/Index action where it just returns View() of the "Welcome to MVC". The Second break point is at a SecondController/Index action where it uses the Entity Framework and returns a View() of a list from the db.

When I run this in debug, it breaks at the points I expected when I go from Home page to the Second page controller and back to Home. However, when I go to the Second page again, it doesn't break at all? Is the results of the Second page being cached and how and where? How do you trigger for it to get check if data is old?

I check to see if the persistence is done on the db, by changing the value of a field on the db side and it still did not cause it to break on that action and displays old information in the view. I am concerned because it is displaying incorrect values on the UI. I do not have the OutputCache attribute above this action or specified any cache on my web.config.

View 2 Replies

.net - Out Of Process Caching?

Mar 19, 2011

I have a .NET website which queries the DB using Entity Framework every 3 seconds for the status of the transaction using AJAX and updates the page. This status is set by an external client using a RESTful webservice hosted on another server. I want to avoid hitting the DB every 3 seconds for each transaction so want this information cached in memory. The REST webservice updates the cache and website reads from it. Is there any FOSS or commercial Out of Process Shared Cache library that I can use to speed up the performance?

View 3 Replies

C# - Caching, What Would Be A Best Practice

Aug 13, 2010

I have a table that stores songs and plays counter.
Here's the code:

//Increse plays counter
string ip = Request.UserHostAddress;
if (!string.IsNullOrEmpty(ip))
{
if (Cache["plays:" + trackID + ":" + ip] == null)
{
tracks.IncreasePlaysCounter(trackID);
Cache["plays:" + trackID + ":" + ip] = true;
}
}

I wonder what would be a better practice, store many cache items(like this) or store one item like a ArrayList that would contain the users who already heard that song. Is there any difference?

View 2 Replies

DataSource Controls :: SUM From A GridView Displayed In Another Gridview ?

May 18, 2010

I have a Table ShoppingCard_Tbl where the user is able to Edit and Delete a Product

And I have other GridView with my TOTAL from ShoppingCard_tbl, when i edit something ou delete

my GridViewTotal takes a long time to updade .

What i have to do ?There is a easy way to do that ?

View 1 Replies

How To Data Caching In Clientside

Mar 18, 2010

Is it possible to do data caching in client-side in asp.net and c#.net iam planning to cache a dataset.
if so provide a sample?

View 2 Replies

How To Use Data Caching With Sql Dependency

Dec 2, 2010

We store the location information in a table. Numbers of records are over four thousand. This table structure is self-recursive. In our web project, we use dropdownlist control to populate all these locations. We got performance slow problem. So googling about Caching, we consider to use Data Caching with Sql Dependency. However, not found yet a full-covered sample in .NET 2.0 and SQL Server 2005 or 2008.

View 1 Replies

C# Data Caching And How To Invalidate

Mar 17, 2011

My web application is using the asp.net cache object to store data from the database. I am looking for an elegant to invalidate cache objects but haven't come up with anything elegant yet. It is easy to invalidate a single record or a list of all records in a single table, by keeping track of their cache keys. However I may have any number of lists of subsets of a table's data. I would like to invalidate only the cache records of the lists that contain a particular record, when that record changes. I don't want to have to invalidate all the lists of data for that table if only one of the lists contain that record.

View 1 Replies

C# - Image Caching In Application Without IIS?

Dec 6, 2010

I have an application written in asp.net c# and hosted on IIS6. There are an 'Image' folder with 3-subfolders. These folders contained images of type 'jpg','gif','png' etc. Images are very huge in size and in numbers. On the application every page has some images needs to open/show, due to the size of images my application get slower and slower.

I know there are some techniques to Cache image folders at client machine or some other methods. I have no access on IIS. So, I need some httphandler or httpmodules which provide something like Image-caching.

I tried this : codeproject.com/KB/aspnet/CachingImagesInASPNET.aspx The problem is I have to add an extra extension '.ashx' to every image link. There is no problem with images are loading dynamically but it has trouble with images need to embose a manual link. Also, this is working fine upto around 1000s images.

View 2 Replies

What Are The Advantages And Disadvantages Of Using Caching

Jun 30, 2010

What are the advantages and disadvantages of using caching in an asp.net application?

View 2 Replies

C# - How To Implement SQLDependency Caching

Sep 29, 2010

explain me how to implement SQL Dependency Caching in Asp.Net?

View 3 Replies

Caching In Development Server?

Jan 15, 2010

Details:

I am using visual studio 2005 on windows xp sp3. The website is stored on file system. I used subversion to checkout the code from the server.

Here is the issue:

When I run the application for the first time everything is fine. But when I makes changes in the application then I should just be able to see those changes by reloading the page in browser. But it's not happening. I have to stop the development server and re-run the application which will start a new instance of development server and now I can see the changes. This takes like 3-4 minutes and it's a lot of waste of time which I can't afford.

For my fellow developer who is here for a long time everything is just working fine. He can just modify the page and reload the page in browser to see the changes.

Reading some forums on web, I tried to clear the cache of my browser (IE, Firefox) and it's not working. So, it's not a browser's cache issue. It's related to cache in development server.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved