Intersoft WebCombo Documentation
AllowAutoDataCaching Property
See Also  Example Send Feedback
ISNet.WebUI.WebCombo Namespace > WebCombo Class : AllowAutoDataCaching Property






Specifies whether data caching is automatically handled by the control. Specifies whether data caching is automatically handled by the control.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Data")>
<ISNet.Serialization.BinarySerializableAttribute()>
<DefaultValueAttribute()>
<DescriptionAttribute("Specifies whether data caching is automatically handled by the control.")>
Public Property AllowAutoDataCaching As Boolean
Visual Basic (Usage)Copy Code
Dim instance As WebCombo
Dim value As Boolean
 
instance.AllowAutoDataCaching = value
 
value = instance.AllowAutoDataCaching
C# 
[CategoryAttribute("Data")]
[ISNet.Serialization.BinarySerializableAttribute()]
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies whether data caching is automatically handled by the control.")]
public bool AllowAutoDataCaching {get; set;}
Delphi 
public read-write property AllowAutoDataCaching: Boolean; 
JScript 
CategoryAttribute("Data")
ISNet.Serialization.BinarySerializableAttribute()
DefaultValueAttribute()
DescriptionAttribute("Specifies whether data caching is automatically handled by the control.")
public function get,set AllowAutoDataCaching : boolean
Managed Extensions for C++ 
[CategoryAttribute("Data")]
[ISNet.Serialization.BinarySerializableAttribute()]
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies whether data caching is automatically handled by the control.")]
public: __property bool get_AllowAutoDataCaching();
public: __property void set_AllowAutoDataCaching( 
   bool value
);
C++/CLI 
[CategoryAttribute("Data")]
[ISNet.Serialization.BinarySerializableAttribute()]
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies whether data caching is automatically handled by the control.")]
public:
property bool AllowAutoDataCaching {
   bool get();
   void set (    bool value);
}

Example

 

You should use IsDataCached method before assign a DataSource to take advantage the built-in WebCombo datacaching mechanishm.
You should use IsDataCached method before assign a DataSource to take advantage the built-in WebCombo datacaching mechanism.
C#Copy Code
private void Page_Load(object sender, System.EventArgs e) 
{ 
    if (!WebCombo1.IsDataCached())  
    { 
        WebCombo1.DataSource = LookupClass.GetProducts(); 
        WebCombo1.DataBind(); 
    } 
}
C#Copy Code
private void Page_Load(object sender, System.EventArgs e)
{
	if (!WebCombo1.IsDataCached()) 
	{
		WebCombo1.DataSource = LookupClass.GetProducts();
		WebCombo1.DataBind();
	}

Remarks

This property enables the automatic caching of assigned DataSource object. The default value is True which is a powerful and effective approach to reduce server's workload and dramatically increase server response time.

By utilizing the power of .NET caching feature, WebCombo.NET implements advanced datacaching mechanism to reduce server workloads. The scope of the cache is session. This enables a greater and more flexible control to the WebCombo object. The WebCombo control keeps track of each session's cache and will automatically remove the DataSource object from cache when it's no longer accessed.

If the DataSource object is a dynamic object -- means that it is changed or added in less than 5 minutes -- you may consider to set this property to False.

In order to take advantage of this property, you should always use IsDataCached to check whether the DataSource has already been cached before you assign a DataSource. See the example for details.

In some scenarios, you can assign a different DataSource directly from code with just assigning the DataSource property to new datasource. In this case, old cache will be automatically removed and new instance of cache will be created.

This property enables the automatic caching of assigned DataSource object. Always leave this property to True as it's a powerful and effective approach to reduce server's workload and dramatically increase server response time.

By utilizing the power of .NET caching feature, WebCombo.NET implements advanced datacaching mechanism to reduce server workloads. The scope of the cache is session. This enables a greater and more flexible control to the WebCombo object. The WebCombo control keeps track of each session's cache and will automatically remove the DataSource object from cache when it's no longer accessed.

If the DataSource object is a dynamic object -- means that it always been changed or added in less than 5 mins -- you may consider to set this property to False.

In order to take advantage of this property, you should always use IsDataCached to check whether the DataSource already been cached before you assign a DataSource. See the examples for details.

In some scenarios, you can assign a different DataSource directly from code with just assigning the DataSource property to new datasource. In this case, old cache will be automatically removed and new instance of cache will be created.

Default value is True.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Reference

WebCombo Class
WebCombo Members

Tasks

How-to: Disable auto data caching

Concepts

User Interface Elements
Automatic Data Caching Handler
All-new, sleeker User Interface

© 2012 Intersoft Solutions Corp. All Rights Reserved.