Intersoft WebCombo Documentation
IsDataCached Method
See Also  Example Send Feedback
ISNet.WebUI.WebCombo Namespace > WebCombo Class : IsDataCached Method






Returns whether the Datasource is already cached.

Returns whether the Datasource is already cached.

Syntax

Visual Basic (Declaration) 
Public Function IsDataCached() As Boolean
Visual Basic (Usage)Copy Code
Dim instance As WebCombo
Dim value As Boolean
 
value = instance.IsDataCached()
C# 
public bool IsDataCached()
Delphi 
public function IsDataCached(): Boolean; 
JScript 
public function IsDataCached() : boolean;
Managed Extensions for C++ 
public: bool IsDataCached(); 
C++/CLI 
public:
bool IsDataCached(); 

Return Value

Returns true if DataSource is already cached

Example

With automatic datacaching feature on, the codes in your webform code behind should looks like the example below.
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 method is required to take advantage of built-in datacaching mechanism implemented in WebCombo control. With automatic datacaching feature on, the codes in your webform code behind should looks like the example below.

This method is required to take advantage of built-in datacaching mechanism implemented in WebCombo control. With automatic datacaching feature on, the codes in your webform code behind should looks like the example below.
            private void Page_Load(object sender, System.EventArgs e)
            {
            	if (!WebCombo1.IsDataCached()) 
            	{
            		WebCombo1.DataSource = LookupClass.GetProducts();
            		WebCombo1.DataBind();
            	}
            
///

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

© 2012 Intersoft Solutions Corp. All Rights Reserved.