Exemple #1
0
        public JsonControl() : base()
        {
            scripts = new Dictionary <string, JsonFunction>();
            requiredScriptFileNames = new List <string>();
            controlToRender         = new HtmlGenericControl();

            AutoRegisterScript = false;
            randomJsonId       = StringExtensions.RandomString(8, false, false);
            DomId = StringExtensions.RandomString(8, false, false);

            attributes    = new JsonAttributes();
            styles        = new JsonStyles();
            renderScripts = true;

            this.Text = string.Empty;
        }
        public JsonControl()
            : base()
        {
            scripts = new Dictionary<string, JsonFunction>();
            requiredScriptFileNames = new List<string>();
            controlToRender = new HtmlGenericControl();

            AutoRegisterScript = false;
            randomJsonId = StringExtensions.RandomString(8, false, false);
            DomId = StringExtensions.RandomString(8, false, false);

            attributes = new JsonAttributes();
            styles = new JsonStyles();
            renderScripts = true;

            this.Text = string.Empty;
        }
Exemple #3
0
 protected static void ApplyAttributesAndStyles(HtmlGenericControl targetControl, JsonStyles styles, JsonAttributes attributes, string cssClass)
 {
     attributes.AddAttributes(targetControl);
     styles.AddStyles(targetControl);
     if (!string.IsNullOrEmpty(cssClass))
     {
         targetControl.Attributes.Add("class", cssClass);
     }
 }
Exemple #4
0
 protected static void ApplyAttributesAndStyles(HtmlGenericControl targetControl, JsonStyles styles, JsonAttributes attributes)
 {
     ApplyAttributesAndStyles(targetControl, styles, attributes, string.Empty);
 }
 protected static void ApplyAttributesAndStyles(HtmlGenericControl targetControl, JsonStyles styles, JsonAttributes attributes, string cssClass)
 {
     attributes.AddAttributes(targetControl);
     styles.AddStyles(targetControl);
     if (!string.IsNullOrEmpty(cssClass))
         targetControl.Attributes.Add("class", cssClass);
 }
 protected static void ApplyAttributesAndStyles(HtmlGenericControl targetControl, JsonStyles styles, JsonAttributes attributes)
 {
     ApplyAttributesAndStyles(targetControl, styles, attributes, string.Empty);
 }