APNSoft - Web Controls, components for ASP.NET Home Help Center Contact Us
About UsProductsDownloadsPurchase
Support

ComboBox
Version 1.5



What's New
Overview
Features
Reference Book
Licensing
Support



Design
Layout and Behavior
Programming




Installation

To install APNSoft ComboBox on your machine download and run the distributive APNSoftComboBox.msi. The .MSI installers are intended for easy and automatic installation of a product. The .MSI installs the control on your computer to a folder named APNSoft in your Program Files and automatically creates the necessary virtual folder. After installation procedure you can open the page with Reference Book, Code Samples, Online Examples, etc. by this shortcut:

Start Menu -> Programs -> APNSoft ComboBox ->


Visual Studio .NET Integration

The installer creates Visual Studio .NET toolbox item for APNSoft ComboBox. This item is visible under the APNSoft tab when you open a new or existing ASP.NET Web application and when you create or edit an ASPX page.


Manually adding the ComboBox to your Visual Studio .NET

To add the APNSoft ComboBox control to your Visual Studio project please follow these steps:

  1. Open the toolbox.
  2. Right click it and open Choose Items ... (Add/Remove Items).
  3. Click Browse in the dialog;
  4. Find the APNSoftComboBox.dll assembly, select Open and then Ok. After installation, the file APNSoftComboBox.dll is in the C:\Program Files\APNSoft\APNSoft ComboBox [version] for ASP.NET [version]\bin\ folder by default.

    APNSoftComboBox component will appear in toolbox and you can add it to a page:

Adding ComboBox to your web application using Visual Studio

Drag the APNSoftComboBox component icon from the toolbox and drop it in your web form / web user-control. Visual Studio will automatically copy the APNSoftComboBox.dll to the bin folder of your web application and will create the respective Reference.

All of the properties are listed in the properties panel in Visual Studio and can be grouped:



Manually embedding the Control into the page
  1. Copy the APNSoftComboBox.dll assembly into the bin directory of your web application.
  2. Add the following line of code (without line breaks) to the top of your page:

    <%@ Register TagPrefix="cb" Namespace="APNSoft.WebControls" Assembly="APNSoftComboBox" %>

  3. Add the following line of code anywhere within your page to embed the ComboBox:

    <cb:APNSoftComboBox id="cb1" runat="server" />
    

    Now you can open the page in your browser to see output.

Launching the ComboBox from Code Behind

For more programming flexibility you can use the built-in API of APNSoft ComboBox which provides various methods simplifying dynamic ComboBox creation.

We recommend to use the PlaceHolder as a container to store dynamically added server controls on the Web page.
  1. Put the PlaceHolder somewhere on your Web page

    <asp:PlaceHolder id=PlaceHolder1 runat="server" />
    


  2. Put code in Code Behind

    using APNSoft.WebControls;
    
    //Step #1 - Create component instance
    APNSoftComboBox myComboBox = new APNSoftComboBox();
    
    //Step #2 - Set component properties
    myComboBox.ID = "c1";
    myComboBox.StructureFileURL = "./Structure.xml";
    myComboBox.TransitionEffect =
      APNSoftComboBox.TransitionEffectValues.Fade;
    myComboBox.ImagesFolderURL = "./Images/";
    myComboBox.AutoPostBack = true;
    myComboBox.AutoScrollList = true;
    myComboBox.OpenListEvent =
      APNSoftComboBox.OpenListEventValues.OnMouseOver;
    
    //Step #3 - Add the ComboBox component to PlaceHolder
    PlaceHolder1.Controls.Add(myComboBox);
    




  © 2003-2008 APNSoft. All rights reserved. Table of Contents   Terms of use   Contact Us   Help Center