Intersoft WebCombo Documentation
WebCombo Class
Members  Example  See Also  Send Feedback
ISNet.WebUI.WebCombo Namespace : WebCombo Class






WebCombo is the main control object. WebCombo provides advanced data-bound functionality without additional server pages or components. The LayoutSettings property contains many of the appearance and layout settings for WebCombo. 

WebCombo is the main control object. The LayoutSettings property contains many of the appearance and layout settings for WebCombo. WebCombo provides advanced data-bound functionality without additional server pages or components.

Object Model

WebCombo Class

Syntax

Visual Basic (Declaration) 
<ValidationPropertyAttribute("Value")>
<DescriptionAttribute("Displays combo box or dropdown list control in web page for data entry purpose with advanced input functionality.")>
<ISNet.Serialization.XmlSerializableAttribute("WebCombo.js;Shared\ISCore_UI.js")>
<DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="ISNet.WebUI.WebCombo.WebComboDesigner, ISNet.WebUI.WebCombo, Version=5.0.7200.1, Culture=neutral, PublicKeyToken=c4184ef0d326354b")>
<DefaultEventAttribute("InitializeDataSource")>
<ToolboxDataAttribute("<{0}:WebCombo runat="server" UseDefaultStyle="true"></{0}:WebCombo>")>
<DefaultPropertyAttribute("LayoutSettings")>
<SerializableAttribute()>
<AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand Or  _
    SecurityAction.Deny Or  _
    SecurityAction.LinkDemand, 
   Unrestricted=False)>
<AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand Or  _
    SecurityAction.Assert Or  _
    SecurityAction.Deny Or  _
    SecurityAction.PermitOnly Or  _
    SecurityAction.LinkDemand Or  _
    SecurityAction.InheritanceDemand, 
   Unrestricted=False)>
Public Class WebCombo 
   Inherits ISNet.WebUI.ISNetControl
   Implements ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource 
Visual Basic (Usage)Copy Code
Dim instance As WebCombo
C# 
[ValidationPropertyAttribute("Value")]
[DescriptionAttribute("Displays combo box or dropdown list control in web page for data entry purpose with advanced input functionality.")]
[ISNet.Serialization.XmlSerializableAttribute("WebCombo.js;Shared\ISCore_UI.js")]
[DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="ISNet.WebUI.WebCombo.WebComboDesigner, ISNet.WebUI.WebCombo, Version=5.0.7200.1, Culture=neutral, PublicKeyToken=c4184ef0d326354b")]
[DefaultEventAttribute("InitializeDataSource")]
[ToolboxDataAttribute("<{0}:WebCombo runat="server" UseDefaultStyle="true"></{0}:WebCombo>")]
[DefaultPropertyAttribute("LayoutSettings")]
[SerializableAttribute()]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Deny | 
    SecurityAction.LinkDemand, 
   Unrestricted=false)]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Assert | 
    SecurityAction.Deny | 
    SecurityAction.PermitOnly | 
    SecurityAction.LinkDemand | 
    SecurityAction.InheritanceDemand, 
   Unrestricted=false)]
public class WebCombo : ISNet.WebUI.ISNetControl, ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource  
Delphi 
public class WebCombo = class(ISNet.WebUI.ISNetControl, ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource)
JScript 
ValidationPropertyAttribute("Value")
DescriptionAttribute("Displays combo box or dropdown list control in web page for data entry purpose with advanced input functionality.")
ISNet.Serialization.XmlSerializableAttribute("WebCombo.js;Shared\ISCore_UI.js")
DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="ISNet.WebUI.WebCombo.WebComboDesigner, ISNet.WebUI.WebCombo, Version=5.0.7200.1, Culture=neutral, PublicKeyToken=c4184ef0d326354b")
DefaultEventAttribute("InitializeDataSource")
ToolboxDataAttribute("<{0}:WebCombo runat="server" UseDefaultStyle="true"></{0}:WebCombo>")
DefaultPropertyAttribute("LayoutSettings")
SerializableAttribute()
AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Deny | 
    SecurityAction.LinkDemand, 
   Unrestricted=)
AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Assert | 
    SecurityAction.Deny | 
    SecurityAction.PermitOnly | 
    SecurityAction.LinkDemand | 
    SecurityAction.InheritanceDemand, 
   Unrestricted=)
public class WebCombo extends ISNet.WebUI.ISNetControl implements ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource 
Managed Extensions for C++ 
[ValidationPropertyAttribute("Value")]
[DescriptionAttribute("Displays combo box or dropdown list control in web page for data entry purpose with advanced input functionality.")]
[ISNet.Serialization.XmlSerializableAttribute("WebCombo.js;Shared\ISCore_UI.js")]
[DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="ISNet.WebUI.WebCombo.WebComboDesigner, ISNet.WebUI.WebCombo, Version=5.0.7200.1, Culture=neutral, PublicKeyToken=c4184ef0d326354b")]
[DefaultEventAttribute("InitializeDataSource")]
[ToolboxDataAttribute("<{0}:WebCombo runat="server" UseDefaultStyle="true"></{0}:WebCombo>")]
[DefaultPropertyAttribute("LayoutSettings")]
[SerializableAttribute()]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Deny | 
    SecurityAction.LinkDemand, 
   Unrestricted=false)]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Assert | 
    SecurityAction.Deny | 
    SecurityAction.PermitOnly | 
    SecurityAction.LinkDemand | 
    SecurityAction.InheritanceDemand, 
   Unrestricted=false)]
public __gc class WebCombo : public ISNet.WebUI.ISNetControl, ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource  
C++/CLI 
[ValidationPropertyAttribute("Value")]
[DescriptionAttribute("Displays combo box or dropdown list control in web page for data entry purpose with advanced input functionality.")]
[ISNet.Serialization.XmlSerializableAttribute("WebCombo.js;Shared\ISCore_UI.js")]
[DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="ISNet.WebUI.WebCombo.WebComboDesigner, ISNet.WebUI.WebCombo, Version=5.0.7200.1, Culture=neutral, PublicKeyToken=c4184ef0d326354b")]
[DefaultEventAttribute("InitializeDataSource")]
[ToolboxDataAttribute("<{0}:WebCombo runat="server" UseDefaultStyle="true"></{0}:WebCombo>")]
[DefaultPropertyAttribute("LayoutSettings")]
[SerializableAttribute()]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Deny | 
    SecurityAction.LinkDemand, 
   Unrestricted=false)]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Assert | 
    SecurityAction.Deny | 
    SecurityAction.PermitOnly | 
    SecurityAction.LinkDemand | 
    SecurityAction.InheritanceDemand, 
   Unrestricted=false)]
public ref class WebCombo : public ISNet.WebUI.ISNetControl, ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource  

Example

 

The following example shows you how to create a WebCombo programmatically.
C#Copy Code
private void Page_Load(object sender, System.EventArgs e)
{
    WebCombo wc = new WebCombo();  
    wc.ID = "WebCombo1";  
    wc.InitializeDataSource +=     new DataSourceEventHandler(wc_InitializeDataSource);  
    wc.InitializeLayout +=    new LayoutEventHandler(wc_InitializeLayout);  
    HtmlForm frm = (HtmlForm) Page.FindControl("Form1");  
    frm.Controls.Add(wc);
}

private void wc_InitializeDataSource(object sender, ISNet.WebUI.WebCombo.DataSourceEventArgs e)
{  
    DataSet ds = new DataSet();  
    OleDbDataAdapter da = new OleDbDataAdapter(    
       "SELECT * FROM [Customers]", oleDbConnection1);  
    da.Fill(ds, "Customers");  
    e.DataSource = ds;  
    WebCombo wc = (WebCombo)sender;  
    wc.DataMember = "Customers";  
    wc.DataTextField = "ContactName";  
    wc.DataValueField = "CustomerID";
}

private void wc_InitializeLayout(object sender, ISNet.WebUI.WebCombo.LayoutEventArgs e)
{  
    e.Layout.ComboMode = Mode.MultipleColumns;  
    WebComboColumn colContactName = new WebComboColumn("ContactName");  
    WebComboColumn colContactTitle = new WebComboColumn("ContactTitle");  
    WebCombo wc = (WebCombo) sender;  wc.Columns.Add(colContactName);  
    wc.Columns.Add(colContactTitle); 
}

Remarks

The latest version of WebCombo.NET 4.0 is the successor of the previous version of WebCombo.NET which offer significant improvements and numerous new features. It focus on productivity features design specifically for Visual Studio 2005 development environment, such as ObjectDataSource data binding support and SmartTag Designer. 

WebCombo.NET 4.0 is designed to deliver cleaner and lighter output for faster page rendering. This latest version is able to render work properly in XHTML 1.1 Transitional Doc Type.

WebCombo.NET 4.0 uses Vista style for its background animation support that allow users to deliver greater data input experience to your web application. As a result, the user interface of WebCombo.NET 4.0 is sleeker and smother than ever before.

The latest version of WebCombo.NET solves several problems and limitations that existed in the previous version such as the capability to input free text value and integration with WebMenu or other containers as the dropdown. These new features, along with some others make WebCombo.NET 4.0 the most powerful ComboBox component.

WebCombo.NET 4.0 will introduce a new framework (WebUI.NET Framework 2007 R1). There are some new changes in WebUI.NET Framework 2007 R1 that can improve the performance on your web application. Those new features are:

  1. ViewStateStorage. We have improved the ViewStateStorage feature using new OptimizedState architecture that based on "Delta changes." The default value for this feature is now set to Client instead of PageCache. The reasons we decided to use Client as the default value are to reduce the viewstate size of a control and to confirm standard mechanism as in standard.NET controls. In previous version of framework, there are three kind of storage for saving ViewState (PageCache, Session and Client). In 2007 R1, ViewStateStorage includes new option to save the state to physical disk. The option called FileServer enables the view state to be saved to a physical disk in the local computer or a shared drive in network. The FileServer cache option solved many barriers around view state topic. With FileServer, you no longer have to worry about memory leaks or limited server resources. Some of benefits using FileServer cache are:
    • Highly scalable. You can choose a network drive to store the caches which enable multiple web servers to access the state.
    • Decent performance. With more than dozen of high performance hard drives, you can choose a near-memory speed with high random access and sequential read write hard drive to store the caches.
    • Easily extensible. Unlike memory (RAM), you can easily extend hard drives with larger one when it becomes insufficient.
  2. ViewStateItems. This new feature works in conjunction with ViewStateStorage.  ViewStateItems allow advanced developers to set what type of items that should be saved in ViewState. The default value ViewStateItems is Behavior.

For more information on new features in WebUI.NET Framework 2007 R1, please read the WebUI.NET Framework 2007 R1 documentation.

 

New SmartWebResources™ Framework

Our new products, including WebCombo.NET v4.0, use new framework. The brand-new SmartWebResources Framework is one of the exciting technology that we had to offer in 2007 R1 platform. The key objective of SmartWebResources™ is to eliminate the external physical resources – such as scripts, images, etc – which required by web components to function properly.

SmartWebResources™ takes advantage of custom HTTP Handler extensibility and tightly integrated into WebUI.NET Framework runtime to deliver high performance, secure and highly reusable components.

Some of the features and benefits introduced by SmartWebResources™ :

  • Better throughput: IIS6 Kernel-level Caching
  • More secure: Does not use query string
  • Faster performance: Does not use Reflection. The SmartWebResources does not use WebResourceAttribute mechanism, so avoiding the needs to use Reflection.
  • Smaller output: Simpler path formatting and does not use long-encrypted string.
  • Hassle-free Deployment: No more external client resources are required during deployment. Only one assembly is required to be copied into your app's bin folder.
  • Reduced Complexity: SmartWebResources includes automatic web resources configuration. When in auto mode, the client resources will be retrieved from Web Resources assembly whenever possible. Otherwise, it will automatically fallback the retrieval from traditional external resources which stored in IIS virtual directory (also known as CommonLibrary).
  • Easy to Configure: Easily configure the settings from application level. You can also customize the settings for individual control's instances for more precise control.
  • Flexibility: You can easily switch between SmartWebResources or external resources mode through EnableWebResources setting.
  • Seamless integration with VS 2005: The handlers and resources configuration can seamlessly added to your web application configuration.

To learn more on SmartWebResources™ and how it works, please read SmartWebResources Documentation and How-to: Configure SmartWebResources™ in a web application.

 

Codeless DataBinding

WebCombo.NET version 4.0 also introduce you to a new codeless data binding experience. It will be one of the most important productivity gains that you can experience. Codeless databinding means that you can configure the datasource, its connection and its related property without writing codes. You can do everything by simply using drag, drop and click.

Declaratively, you can create a WebCombo instance and bind it to a table in your Sql database in two simple statements as in the following:

<ISWebCombo:WebCombo ID="WebCombo1" runat="server"
UseDefaultStyle="True" Width="200px" Height="20px"
DataSourceID="SqlDataSource1" DataTextField
="ActivityName"
DataValueField="ActivitiesId">
</ISWebCombo:WebCombo>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:DbConnectionString %>"
SelectCommand="SELECT * FROM [Activities]">
</asp:SqlDataSource>

As you can see with the above statements, the WebCombo1 is bound to a datasource control through DataSourceID property. The WebCombo connects to the specified datasource control and display data from the datasource available in SqlDataSource1.

To learn more about how to bind WebCombo to AccessDataSourceControl, please read Walkthrough: Binding WebCombo to AccessDataSource control.

To learn more about how to bind WebCombo to ObjectDataSourceControl, please read Walkthrough: Binding WebCombo to ObjectDataSource control.

Inheritance Hierarchy

System.Object
   System.Web.UI.Control
      System.Web.UI.WebControls.WebControl
         ISNet.WebUI.ISNetControl
            ISNet.WebUI.WebCombo.WebCombo

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.