filmov
tv
Caching multiple versions of user control using VaryByControl Part 124

Показать описание
Text version of the video
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
Slides
All ASP .NET Text Articles
All ASP .NET Slides
All Dot Net and SQL Server Tutorials in English
All Dot Net and SQL Server Tutorials in Arabic
We will be using tblProducts table for this demo. If you need the script to create and populate this table, please refer to Part 122, by clicking here.
Link for code samples used in the demo
Caching multiple responses of a user control declaratively, using "VaryByControl" attribute of the "OutputCache" directive
Caching multiple responses of a user control programatically, using "VaryByControls" property of the PartialCachingAttribute
We can also achieve the same thing, by specifying "PartialCachingAttribute" on the UCProductsControl class as shown below.
[PartialCaching(60, VaryByControls = "DropDownList1")]
public partial class UCProductsControl : System.Web.UI.UserControl
{
//...Rest of the UCProductsControl code
}
In our next video, we will discuss about when and how to use "VaryByParams" to cache multiple versions of a user control.
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
Slides
All ASP .NET Text Articles
All ASP .NET Slides
All Dot Net and SQL Server Tutorials in English
All Dot Net and SQL Server Tutorials in Arabic
We will be using tblProducts table for this demo. If you need the script to create and populate this table, please refer to Part 122, by clicking here.
Link for code samples used in the demo
Caching multiple responses of a user control declaratively, using "VaryByControl" attribute of the "OutputCache" directive
Caching multiple responses of a user control programatically, using "VaryByControls" property of the PartialCachingAttribute
We can also achieve the same thing, by specifying "PartialCachingAttribute" on the UCProductsControl class as shown below.
[PartialCaching(60, VaryByControls = "DropDownList1")]
public partial class UCProductsControl : System.Web.UI.UserControl
{
//...Rest of the UCProductsControl code
}
In our next video, we will discuss about when and how to use "VaryByParams" to cache multiple versions of a user control.
Комментарии