using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using APNSoft.WebControls;

public partial class ComboBox_ServerSelection : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        //Apply event-handling method
        myComboBox.OnItemClick += new APNSoft.WebControls.ComboBoxEventHandler(myComboBox_OnItemClick);
    }


    void myComboBox_OnItemClick(object sender, APNSoft.WebControls.ComboBoxEventArgs e)
    {

        //Get component instance
        APNSoftComboBox myComboBox = (APNSoftComboBox)sender;

        //Get clicked Item
        ComboBoxElement myItem = e.ComboBoxElement;

        //Display clicked item data
        string ClickedItem = "";
        ClickedItem += "Component ID: <b>" + myComboBox.ID + "</b>";
        ClickedItem += "<br/>Item ID: <b>" + myItem.id + "</b>";
        ClickedItem += "<br/>Item title: <b>" + myItem.title + "</b><br/><br/>";
        lblClickedItem.Text = ClickedItem;

    }

}