Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » Ajax » General » Downloads
 
Add your own
alternative version

Context Sensitive Help using Client Callbacks - AJAX Style

, 25 Sep 2006
This article is all about providing Context Sensitive Help in a web page, asynchronously or AJAX style, using Client Callbacks in .NET 2.0.
contextsensitivehelp_src.zip
ContextSensitiveHelpCode
ContextSensitiveHelp_src
ContextSensitiveHelp
App_Code
App_Themes
ControlsTheme
ContextSensitiveHelp.skin
CSS
Database
SampleDataBase.mdb
IMG
ContextSensitiveHelp.gif
Scripts
UserControls
Xml
Messages.dtd
/*
 * Page Management Class
 * ==============================================================
 * Creator 			Ch.V.L.Mahendra
 * Created			17-Sep-2006
 * Environments		IIS 5.0, IIS 6.0, .Net Framework 2.0
 * Description 
 *
 * Sets up the application cache, and XML settings for the 
 * application. This class is inherited by all other web form 
 * pages and provides common functionality and properties.
 *
 * Change Log
 * ==============================================================
 * Version	Date		Author		    Changes
 * 0.1		17-Sep-2006	Ch.V.L.Mahendra	Created
 */

/*
 * Page Management Class
 * ==============================================================
 * Creator 			Ch.V.L.Mahendra
 * Created			17-Sep-2006
 * Environments		IIS 5.*, IIS 6.0, .Net Framework 2.0
 * Description 
 *
 * Responsible for managing the application cache. If cache
 * elements need updating, this class fetches information to
 * populate them from the database or XML file as applicable.
 *
 * Change Log
 * ==============================================================
 * Version	Date		Author		    Changes
 * 0.1		17-Sep-2006	Ch.V.L.Mahendra	Created
 */


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Xml;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using ContextSensitiveHelp.Pages.Xml;



namespace ContextSensitiveHelp.Pages.Common
{
    /// <summary>
    /// This is an inherited class for every page. Inherits from the .NET
    /// Page class.
    /// </summary>
    public class PageManager : System.Web.UI.Page
    {
        #region Variables
        /// <summary>
        /// Stores a reference to the cache manager
        /// </summary>
        private CacheManager objCache;    
        /// <summary>
        /// Stores an XML message structure for usage in the application
        /// </summary>
        protected MessageEntry objMessage;
        /// <summary>
        /// Stores whether page has been redirected
        /// </summary>
        protected bool IsAborted = false;
        #endregion

        #region Init method
        /// <summary>
        /// Method to run every time a page is loaded.
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">Event Arguments</param>
        protected virtual void Page_Init(object sender, EventArgs e)
        {           
            SetupComponents();
        }

        /// <summary>
        /// Method to setup the, cache, xml files needed througout
        /// the application.
        /// </summary>
        protected void SetupComponents()
        {
            /* set up the application cache */
            objCache = new CacheManager(Page.Cache);

            /* load the xml messages file path */
            XmlMessage.XmlFile = Page.MapPath(System.Configuration.ConfigurationManager.AppSettings["MessagesFile"]);
            /* Load the Messages Xml */
            objCache.LoadMessages();
        }

        #endregion

        #region Methods for retrieving cached info
      

     

    

  
        #endregion

        #region Properties
                  
        #endregion

        #region AutoGenCode

        /// <summary>
        /// Entry point
        /// </summary>
        /// <param name="e">Event arguments</param>
        override protected void OnInit(EventArgs e)
        {
            InitializeComponent(e);
        }

        /// <summary>
        /// Call required by ASP.NET web form designer
        /// </summary>
        /// <param name="e"></param>
        private void InitializeComponent(EventArgs e)
        {
            Page_Init(this, e);
        }

        #endregion

    }

}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Mahi2407
Web Developer
India India
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140821.2 | Last Updated 25 Sep 2006
Article Copyright 2006 by Mahi2407
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid