}//public void Server_Index_Changed(Object sender, EventArgs e) 

  /// <summary>ServerSelected()</summary>
  public void ServerSelected()
  {
   bool      system                  =  false;
   bool      user                    =  false;
   string[]  database                =  null;
   string    exceptionMessage        =  null;
   string[]  selectedServer          =  null;
   string    sqlServerLoginUserName  =  null;
   string    sqlServerPassword       =  null;
   
   try
   {
    UtilityWebControl.SelectedItem
    ( 
         ListBoxServer,
     ref selectedServer
    );
    if ( selectedServer == null || selectedServer.Length != 1 )
    {
   	 return;
    }	
    ViewState["SQLServerManagementObjectsSMOPage_ServerSelectedFirst"] = selectedServer[0];
    sqlServerLoginUserName = SQLServerLoginUserName;
    sqlServerPassword      = SQLServerPassword;
    system                 = CheckBoxSystem.Checked;
    user                   = CheckBoxUser.Checked;
    UtilitySQLServerManagementObjectsSMO.DatabaseList
    (
     ref selectedServer[0],
     ref exceptionMessage,
     ref database,
     ref sqlServerLoginUserName,
     ref sqlServerPassword,
     ref system,
     ref user
    );
    if ( exceptionMessage != null )
    {
     Feedback = exceptionMessage;
     return;
    }//if ( exceptionMessage != null )
    if ( database == null || database.Length < 1 )
    {
     return;
    }//if ( database == null || database.Length < 1 )
    ListBoxDatabase.DataSource = database;
    ListBoxDatabase.DataBind();
   }//try
   catch ( System.Exception exception )
   {
    exceptionMessage = "System.Exception: " + exception.Message;
   }//catch ( System.Exception exception )
   if ( exceptionMessage != null )
   {
    Feedback = exceptionMessage;
    return;
   }//if ( exceptionMessage != null )
  }//public void ServerSelected(Object sender, EventArgs e) 
        }//public void ButtonReset_Click()

        /// <summary>WhoIsLookup</summary>
        public void WhoIsLookup()
        {
            string exceptionMessage = null;

            string[]                   registry = null;
            StringBuilder[][]          sbWhoIs  = null;
            StringBuilder              sbJoin   = null;
            UtilityWhoIsPort43Argument utilityWhoIsPort43Argument = null;

            try
            {
                UtilityWebControl.SelectedItem(ListBoxRegistry, ref registry);
                utilityWhoIsPort43Argument = new UtilityWhoIsPort43Argument
                                             (
                    RegistryDomainSuffixOnly,
                    PortWhoIs,
                    new string[] { DomainName },
                    registry
                                             );
                UtilityWhoIsPort43.WhoisLookup
                (
                    ref utilityWhoIsPort43Argument,
                    ref sbWhoIs,
                    ref exceptionMessage
                );
                if (exceptionMessage != null)
                {
                    Feedback = exceptionMessage; return;
                }
                sbJoin = new StringBuilder();
                for (int indexDimension1 = 0; indexDimension1 < sbWhoIs.Length; ++indexDimension1)
                {
                    for (int indexDimension2 = 0; indexDimension2 < sbWhoIs[indexDimension1].Length; ++indexDimension2)
                    {
                        sbJoin.Append(sbWhoIs[indexDimension1][indexDimension2]);
                    } //for ( int indexDimension2 = 0; indexDimension2 < sb[indexDimension1].Length; ++indexDimension2 )
                }     //for ( int indexDimension1 = 0; indexDimension1 < sb.Length; ++indexDimension1 )
            }         //try
            catch (Exception exception) { exceptionMessage = exception.Message; }
            if (exceptionMessage != null)
            {
                Feedback = exceptionMessage;
            }
            Feedback = sbJoin.ToString();
        }//public void WhoIsLookup
  }//public void Database_Index_Changed(Object sender, EventArgs e) 

  /// <summary>DatabaseSelected()</summary>
  public void DatabaseSelected()
  {
   bool      system                  =  false;
   bool      user                    =  false;
   string    serverSelectedFirst     =  null;
   string    exceptionMessage        =  null;
   string[]  defaultName             =  null;
   string[]  rule                    =  null;
   string[]  selectedDatabase        =  null;
   string    sqlServerLoginUserName  =  null;
   string    sqlServerPassword       =  null;
   string[]  storedProcedure         =  null;   
   string[]  table                   =  null;
   string[]  trigger                 =  null;
   string[]  userDefinedDataType     =  null;
   string[]  userDefinedFunction     =  null;
   string[]  view                    =  null;

   try
   {
    serverSelectedFirst = (string) ViewState["SQLServerManagementObjectsSMOPage_ServerSelectedFirst"];
    if ( string.IsNullOrEmpty( serverSelectedFirst ) )
    {
     return;
    }     	
    UtilityWebControl.SelectedItem
    ( 
         ListBoxDatabase,
     ref selectedDatabase
    );
    if ( selectedDatabase == null || selectedDatabase.Length != 1 )
    {
     return;
    }
    sqlServerLoginUserName  =  SQLServerLoginUserName;  
    sqlServerPassword       =  SQLServerPassword;
    system                  =  CheckBoxSystem.Checked;
    user                    =  CheckBoxUser.Checked;    
    UtilitySQLServerManagementObjectsSMO.DatabaseResource
    (
     ref serverSelectedFirst,
     ref selectedDatabase[0],
     ref exceptionMessage,
     ref sqlServerLoginUserName,
     ref sqlServerPassword,
     ref system,
     ref user,
     ref defaultName,
     ref rule,
     ref storedProcedure,
     ref table,
     ref trigger,
     ref userDefinedDataType,
     ref userDefinedFunction,
     ref view
    );
    if ( exceptionMessage != null )
    {
     Feedback = exceptionMessage;
     return;
    }//if ( exceptionMessage != null )
    ListBoxDefault.DataSource = defaultName;
    ListBoxDefault.DataBind();
    ListBoxRule.DataSource = rule;
    ListBoxRule.DataBind();
    ListBoxStoredProcedure.DataSource = storedProcedure;
    ListBoxStoredProcedure.DataBind();
    ListBoxTable.DataSource = table;
    ListBoxTable.DataBind();
    ListBoxTrigger.DataSource = trigger;
    ListBoxTrigger.DataBind();
    ListBoxUserDefinedDataType.DataSource = userDefinedDataType;
    ListBoxUserDefinedDataType.DataBind();
    ListBoxUserDefinedFunction.DataSource = userDefinedFunction;
    ListBoxUserDefinedFunction.DataBind();
    ListBoxView.DataSource = view;
    ListBoxView.DataBind();
   }
   catch ( System.Exception exception )
   {
   	exceptionMessage = "System.Exception: " + exception.Message;
   }
   if ( exceptionMessage != null )
   {
   	Feedback = exceptionMessage;
   	return;
   }
  }//public void DatabaseSelected()
  }//public String public String Feedback

  /// <summary>ButtonSubmit_Click().</summary>
  public void ButtonSubmit_Click
  (
   Object sender, 
   EventArgs e
  )
  {

   string[]                                       defaultName                                    =  null;
   string[]                                       database                                       =  null;
   String                                         exceptionMessage                               =  null;
   string[]                                       rule                                           =  null;
   string[]                                       server                                         =  null;
   string[]                                       storedProcedure                                =  null;
   string[]                                       table                                          =  null;
   string[]                                       trigger                                        =  null;   
   string[]                                       userDefinedDataType                            =  null;
   string[]                                       userDefinedFunction                            =  null;
   string[]                                       view                                           =  null;

   UtilitySQLServerManagementObjectsSMOArgument   UtilitySQLServerManagementObjectsSMOArgument   =  null;
   
   /*
   if( sender == ButtonSubmit )
   {
    Response.Write ( "ButtonSubmit" );
    Feedback = "ButtonSubmit";
   }
   */

   try
   {
    UtilityWebControl.SelectedItem
    ( 
         ListBoxServer,
     ref server
    );

    UtilityWebControl.SelectedItem
    ( 
         ListBoxDatabase,
     ref database
    );

    UtilityWebControl.SelectedItem
    ( 
         ListBoxDefault,
     ref defaultName
    );

    UtilityWebControl.SelectedItem
    ( 
         ListBoxRule,
     ref rule
    );

    UtilityWebControl.SelectedItem
    ( 
         ListBoxStoredProcedure,
     ref storedProcedure
    );

    UtilityWebControl.SelectedItem
    ( 
         ListBoxTable,
     ref table
    );

    UtilityWebControl.SelectedItem
    ( 
         ListBoxTrigger,
     ref trigger
    );

    UtilityWebControl.SelectedItem
    ( 
         ListBoxUserDefinedDataType,
     ref userDefinedDataType
    );

    UtilityWebControl.SelectedItem
    ( 
         ListBoxUserDefinedFunction,
     ref userDefinedFunction
    );

    UtilityWebControl.SelectedItem
    ( 
         ListBoxView,
     ref view
    );

    UtilitySQLServerManagementObjectsSMOArgument = new UtilitySQLServerManagementObjectsSMOArgument
    (
     CheckBoxBackup.Checked,
     database,
     defaultName,
     BackupDirectory,
     MaintenanceDirectory,
     ScriptDirectory,
     CheckBoxMaintenance.Checked,
     rule,
     CheckBoxScript.Checked,
     server,
     SQLServerLoginUserName,
     SQLServerPassword,
     storedProcedure,
     CheckBoxSystem.Checked,
     table,
     trigger,
     CheckBoxUser.Checked,
     userDefinedDataType,
     userDefinedFunction,
     view
    );

    UtilitySQLServerManagementObjectsSMO.UtilitySMO
    (
     ref UtilitySQLServerManagementObjectsSMOArgument,
     ref exceptionMessage
    );

    if ( exceptionMessage != null )
    {
     Feedback = exceptionMessage;
     return;
    }//if ( exceptionMessage != null )

   }//try
   catch ( System.Exception exception )
   {
   	exceptionMessage = exception.Message;
   }
   
   Feedback = exceptionMessage;
   
  }//public void ButtonSubmit_Click()