Skip to main content

Posts

Showing posts from July, 2012

.NET Mathematics

Loading UserControl on another UserControl & assigning Properties of loaded UserControl Parent UserControl (.ascx) UI: <% @ Control Language ="C#" AutoEventWireup ="true" CodeBehind ="MultiVarientModule.ascx.cs"     Inherits ="Modules.MultiVarientModule" %> < div id ="parent" runat ="server"> </ div > Parent UserControl Code File (.cs) : #region CONSTANTS const string CAROUSAL = "~/Modules/Carousal.ascx" ; const string THREECOLUMNS = "~/Modules/ThreeColumn.ascx" ; const string REGULAR = "~/Modules/Regular.ascx" ; #endregion protected void Page_Load( object sender, EventArgs e) { switch (ControlName) {        case "Carousel" :               parent.Controls.Add(LoadControl(CAROUSAL));               break ;        case "ThreeColumn" :               parent.Controls.Add(LoadControl(THREECOLUMNS));               break ;        ca