|
#region Copyright(C) M.Shams Mukhtar (shams_mukhtar@yahoo.com)
//
// You are free to use or modify the code, as long as you place
// copyright notice above. Thanks!
//
// Filename: MasterPageFactory.cs
#endregion
#region Instructions
#endregion
#region Remarks
#endregion
#region Namespaces used
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
#endregion
namespace Shams.Web.UI.MasterPages
{
/// <summary>
/// Summary description for MasterPageFactory.
/// </summary>
public class MasterPageFactory
{
public static PageControlBase CreateMasterPageControl()
{
return new MasterPageControl();
}
public static System.Web.UI.Control CreateMasterUserControl(System.Web.UI.Page mainPage)
{
System.Web.UI.Control userControl = null;
try
{
string userControlPtah = System.Configuration.ConfigurationSettings.AppSettings["MasterPageUserControl"];
userControl = mainPage.LoadControl(userControlPtah);
}
catch (Exception ex)
{
throw ex;
}
return userControl;
}
}
}
|
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.
Lead Architect with 20+ years of software design and development experience. Architected and designed many industrial softwares and passed through full software development life-cycle. Strong hold in Object-Oriented software engineering using UML with Design Patterns, C#, .NET, C++/VC++ and Java. Domain expertise are in Distributed Computing along with WCF/Web services, Messaging Systems (MSMQ), Multi-threading, Component developments, Computer Graphics, Embedded Systems, GIS development, framework development, User-Interface designs (WPF .NET), Rule based development (WF .NET), Chemical Engineering and Process Controls. Having both Bachelors and Masters degrees in Engineering with certifications in Obect Oriented Analysis and design.
Email: shams.mukhtar@gmail.com
Blog Link: http://www.geekscafe.net