Пример #1
0
		/// <summary>
		/// Creates the child controls.
		/// </summary>
		protected override void CreateChildControls()
		{
			base.CreateChildControls();
			this.childPanel = new Division();
			this.Controls.Add(this.childPanel);
			if (this.ItemCount > -1 && this.childPanel.Visible)
			{
				this.owner.CreateChildHierarchy(this);
			}
		}
Пример #2
0
		/// <summary>
		/// Notifies server controls that use composition-based implementation to create any 
		/// child controls they contain in preparation for posting back or rendering.
		/// </summary>
		protected override void CreateChildControls()
		{
			base.CreateChildControls();

			this.job = new HiddenField();
			base.Controls.Add(this.job);
			this.job.ID = "job";

			this.bar = new Division();
			base.Controls.Add(this.bar);
			this.bar.ID = "bar";
			this.bar.Controls.Add(new LiteralControl("&nbsp;"));
		}
Пример #3
0
        /// <summary>
        /// Raises the <see cref="System.Web.UI.Control.PreRender"/> event.
        /// </summary>
        /// <param name="e">An <see cref="System.EventArgs"/> object that contains the event data.</param>
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            HtmlForm form = this.Page.Form;
            if ((form != null) && (form.Enctype.Length == 0))
            {
                form.Enctype = "multipart/form-data";
            }

            List<HttpPostedFile> postedFiles = null;
            if (this.Page.IsPostBack)
                postedFiles = new List<HttpPostedFile>();

            Division fileContainer;
            string customUniqueID;
            for (int i = 0; i < this.FileCount; i++)
            {
                customUniqueID = this.ClientID + i.ToString();
                if (this.Page.Request.Files[customUniqueID] == null)
                    customUniqueID = null;

                fileContainer = new Division();
                this.Controls.Add(fileContainer);
                fileContainer.CssClass = this.FileCssClass;

                FileUploadEx file = new FileUploadEx(customUniqueID, InputCssClass);
                fileContainer.Controls.Add(file);

                if (file.PostedFile != null && file.PostedFile.FileName.Length > 0)
                    postedFiles.Add(file.PostedFile);
            }

            if (this.Page.IsPostBack)
                this.OnFilesPosted(new FilesPostedEventArgs(postedFiles.ToArray()));

            this.RegisterClientScript();
        }
Пример #4
0
		/// <summary>
		/// Notifies server controls that use composition-based implementation to create any 
		/// child controls they contain in preparation for posting back or rendering.
		/// </summary>
		protected override void CreateChildControls()
		{
			base.CreateChildControls();

			// The input value stores the last known input of the textbox. This way we can check client-side if the 
			// text was actually changed and we should do another callback.
			this.inputValue = new HiddenField();
			this.HiddenControls.Add(this.inputValue);
			this.inputValue.ID = "smartTextBoxHV";

			// Create the results div.
			this.results = new Division();
			this.HiddenControls.Add(this.results);
			this.results.ID = "results";
			this.results.Style.Add(HtmlTextWriterStyle.Display, "none");
		}