Using Push SQL Cache Dependencies with DataSource
Caching
You also can use Push SQL cache dependencies with both the SqlDataSource
and ObjectDataSource
controls by setting the SqlCacheDependency
property. When using Push rather than Polling dependencies, you need to set the SqlCacheDependency
property to the value CommandNotification
.
For example, the page in Listing 29.47 contains a SqlDataSource
control that has both its EnableCaching
and SqlDependency
properties set.
Listing 29.47. PushSQLDataSourceCache.aspx
In Listing 29.47, the SqlDataSource ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.