473,486 Members | 2,401 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CacheKeyDependency Question on a ObjectDataSource

I am using the ObjectDataSource to bind to a DropDownList. I have
enabled the cache on the ObjectDataSource since the data it is
selecting will most likely not chage in the near future (countries).
Is there a way to access this cache data on a different page?

I figure if I Already have it cached why should I query the database a
agin for this information if I can just cast the cache object to a
DataTable and query it that way.

Please let me know.

Thanks

Jul 28 '07 #1
1 2035
The ObjectDataSource (I assume) is an element in your ASPX page.
Instead of having it as an element in the ASPX page, you should keep an
instance of it in your session (or, if applicable, the Application
collection).

Of course, AFAIK, this would require a manual binding to your
DropDownList through code (I don't think you could do it declaratively at
this point).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nightcrawler" <th************@gmail.comwrote in message
news:11**********************@57g2000hsv.googlegro ups.com...
>I am using the ObjectDataSource to bind to a DropDownList. I have
enabled the cache on the ObjectDataSource since the data it is
selecting will most likely not chage in the near future (countries).
Is there a way to access this cache data on a different page?

I figure if I Already have it cached why should I query the database a
agin for this information if I can just cast the cache object to a
DataTable and query it that way.

Please let me know.

Thanks

Jul 30 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
8664
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press...
5
1968
by: Ole M | last post by:
I'm having some trouble using the ObjectDataSource in ASP.NET 2.0. I have a wrapper that contains the static methods for Select and Update. The Update-method takes the business object as...
3
2630
by: avezina | last post by:
We would like to use those new cool features of Asp.Net 2.0 like the ObjectDataSource in our project. I tried few basics examples and its work well. Let's say I have a page that displays a...
0
1474
by: Eiriken | last post by:
Hello everyone, I am using ASP.NET 2 and trying to bind a objectdatasource to a gridview. By doing this the most common way by adding an objectdatasource to the page and by using the wizard to...
0
1860
by: Northern | last post by:
Hello, I have some trouble to declare and instantiate dynamically an ObjectDataSource in the codebehind file. The idea is to bind the objectdatasource to a gridview and have automate sorting and...
10
4542
by: J055 | last post by:
Hi I've been trying out SqlCacheDependency using the ObjectDataSource and SQL Server 2005. It all works quite well with the minimum of configuration, e.g. <asp:ObjectDataSource...
14
14601
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
5
2620
by: Randy Smith | last post by:
Hi ALL, I wonder if anyone has been using n-tier to bind to a GridView control by using the ObjectDataSource. This is our first OOP web application, and we have no tables. Right now we are...
3
11149
by: btreddy | last post by:
Hii all, I've a problem regarding passing select parameters to objectdatasource from code behind. i would like to pass the select parameters to a objectdatasource ..not in the selecting or...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7132
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7180
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4870
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.