:: Home
:: Product Features
:: Featured Sites
:: Resellers
:: Company Information
:: Framework
:: Press Releases
:: Contact Us
 
Developed in .NET
 
Control Development Information

 

Variables that are available in control development:

 

  1. SqlConnection Con = new SqlConnection(ConfigurationSettings.AppSettings["connectionString"]);

    The conection string for the database is in the Configuration Settings of web.config.  To use, you must use the namespace System.Configuration,  and the following will set up your connection to the SQL database.


  2. SiteConfiguration  SiteConfig = (SiteConfiguration) Session["SiteConfig"];

    SiteConfig.SiteID is the key for every site and must be included in any auxiliary tables to identify content as belonging to the site


  3. PageConfiguration PageConfig = (PageConfiguration) Context.Items["PageConfig"];

    PageConfig.SiteID is the same ID as SiteConfig.SiteID above.
    PageConfig.PageID is the database ID of the Page that the control resides within.

 

ControlConfiguration and  PageControl Class

 

 

Three Functions that should be defined to allow the framework to manage Custom Controls


void SaveFunction() – This is the function that is called when the user is editing control information on ‘panelEdit’ and clicks the save button.  Saving of information should

 

void LoadEditFunction() – When the edit button is clicked on the framework, this is the function that loads the necessary information into ‘panelEdit’

 

void DeleteFunction() – Function used by the framework that should be overloaded if auxilary tables are used – and the control only exists on a single page.  The framework will handle deletion of information specific to the control on a page including in the ‘PageControl’ and ‘PageControlSettings’ tables

 

 

Information Available using  this.Config


Because controls all inherit the PageControl Class, they will all have the ControlConfiguration Structure available using this.config, below are some of the properties that are available through the Control Configuration

 

this.Config.PageControlID – The ID of the control on a given page

this.Config.Settings – Hashtable of Key/Value Pairs to hold control configuration

 

 

this.Config.Name – The name that is registered with the framework for the custom control

this.Config.ControlID – The Database ID of the Control information in the ‘Control’ Table

this.Config.Source – The Sorce File for a control as registered with tre framework

Copyright © 2006 COSMIC MANAGEMENT SYSTEM is a division of Solar Velocity, LLC.
All Rights Reserved. • 866.472.1844 • info@solarvelocity.com
Headquarters are located in Atlanta Georgia