Caching multiple versions of user control using VaryByControl Part 124

preview_player
Показать описание
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.
Рекомендации по теме
Комментарии
Автор

Hi Irfan, Thank you very much for taking time to give feedback. I am really glad you found these videos useful. If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel. May I ask you for a favour. I want these tutorials to be helpful for as many people as possible. Please free to share the link with your friends and family who you think would also benefit from them. Good Luck.

Csharp-video-tutorialsBlogspot
Автор

Hi Irfan, we will discuss about cache dependencies and refreshing cache, when the underlying data changes in the upcoming videos. If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel. Good Luck.

Csharp-video-tutorialsBlogspot
Автор

Hi Sir, I am following your videos religiously and in turn, my confidence level boosted tremendously.:)...These days just waiting for your videos.Thanks a lot.

irfanathar
Автор

I have a quick question i haven't understand the difference b/w the setting the value of VarByparam="dropdownlist1" and part 121 you have used VarByparam="dropdownlist1" and know in this video you have set VarByControl="DropDownList1" in usercontrol but the respone for both is same.Is their any difference ?

Amrutham
Автор

Hi Venkat Sir.Could you please solve my query.. How to synchronize cache data with the database if the values are changed in database?. Thank You.

irfanathar