• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UI.UpdatePanel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Web.UI.UpdatePanel的典型用法代码示例。如果您正苦于以下问题:C# UpdatePanel类的具体用法?C# UpdatePanel怎么用?C# UpdatePanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UpdatePanel类属于System.Web.UI命名空间,在下文中一共展示了UpdatePanel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateChildControls

        protected override void CreateChildControls() {
            base.CreateChildControls();

            Control parent;
            Control container;

            // Get a reference to the ScriptManager object for the page
            // if one exists.
            ScriptManager sm = ScriptManager.GetCurrent(Page);

            if (sm == null || !sm.EnablePartialRendering)
            {
                // If partial rendering is not enabled, set the parent
                // and container as a basic control. 
                container = new Control();
                parent = container;
            }
            else
            {
                // If partial rendering is enabled, set the parent as
                // a new UpdatePanel object and the container to the 
                // content template of the UpdatePanel object.
                UpdatePanel up = new UpdatePanel();
                container = up.ContentTemplateContainer;
                parent = up;
            }

            AddDataboundControls(container);

            Controls.Add(parent);
        }
开发者ID:nobled,项目名称:mono,代码行数:31,代码来源:ProductsView.cs


示例2: AddUpdatePanel

        private void AddUpdatePanel(Panel p)
        {
            this.messageLabel = new Label();

            this.updatePanel = new UpdatePanel();
            this.updatePanel.ID = "ScrudUpdatePanel";
            this.updatePanel.ChildrenAsTriggers = true;
            this.updatePanel.UpdateMode = UpdatePanelUpdateMode.Conditional;

            this.updatePanel.ContentTemplateContainer.Controls.Add(this.topCommandPanel.GetCommandPanel("top"));
            this.updatePanel.ContentTemplateContainer.Controls.Add(this.messageLabel);
            this.updatePanel.ContentTemplateContainer.Controls.Add(this.gridPanel);
            this.updatePanel.ContentTemplateContainer.Controls.Add(this.formPanel);
            this.updatePanel.ContentTemplateContainer.Controls.Add(this.bottomCommandPanel.GetCommandPanel("bottom"));

            //Bottom command panel.
            this.userIdHidden = new HiddenField();
            this.userIdHidden.ID = "UserIdHidden";
            this.userIdHidden.Value = this.UserId.ToString(CultureInfo.InvariantCulture);

            this.officeCodeHidden = new HiddenField();
            this.officeCodeHidden.ID = "OfficeCodeHidden";
            this.officeCodeHidden.Value = this.OfficeCode;

            this.updatePanel.ContentTemplateContainer.Controls.Add(this.userIdHidden);
            this.updatePanel.ContentTemplateContainer.Controls.Add(this.officeCodeHidden);
            p.Controls.Add(this.updatePanel);
        }
开发者ID:JonathanValle,项目名称:mixerp,代码行数:28,代码来源:UpdatePanel.cs


示例3: UpdateToolTip

 private void UpdateToolTip(string elementID, UpdatePanel panel)
 {
     Control ctrl = Page.LoadControl("SampleControl1.ascx");
     panel.ContentTemplateContainer.Controls.Add(ctrl);
     SampleControl1 details = (SampleControl1)ctrl;
     details.ProductID = elementID;
 }
开发者ID:vaibhavgeek,项目名称:friendyoke,代码行数:7,代码来源:SampleMenu1.aspx.cs


示例4: CreateChildControls

        /// <summary>
        /// Called by the ASP.NET page framework to notify 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();

            m_MainPanel = new UpdatePanel();
            m_MainPanel.RenderMode = UpdatePanelRenderMode.Inline;

            // The next two lines ensure that nothing is sent to the client,
            // as there's no information to send anyway. This reduces overhead.
            m_MainPanel.UpdateMode = UpdatePanelUpdateMode.Conditional;
            m_MainPanel.ChildrenAsTriggers = false;

            Controls.Add(m_MainPanel);

            m_TypeBox = new TextBox();
            m_TypeBox.ID = "Type";
            m_TypeBox.EnableViewState = false;
            m_TypeBox.ValidationGroup = "Communicator";
            m_MainPanel.ContentTemplateContainer.Controls.Add(m_TypeBox);

            m_MessageBox = new TextBox();
            m_MessageBox.ID = "Message";
            m_MessageBox.EnableViewState = false;
            m_MessageBox.ValidationGroup = "Communicator";
            m_MainPanel.ContentTemplateContainer.Controls.Add(m_MessageBox);

            m_SubmitButton = new Button();
            m_SubmitButton.ID = "Submit";
            m_MessageBox.EnableViewState = false;
            m_SubmitButton.ValidationGroup = "Communicator";
            m_SubmitButton.Click += new EventHandler(SubmitButton_Click);
            m_MainPanel.ContentTemplateContainer.Controls.Add(m_SubmitButton);

        }
开发者ID:ChrisNikkel,项目名称:Umbraco-CMS,代码行数:39,代码来源:Communicator.cs


示例5: CreateChildControls

        // Events /////////////////////////////////////////////////////////
        protected override void CreateChildControls()
        {
            Controls.Clear();
            UIControls.ErrorMessage.Text = string.Empty;

            _masterUpdatePanel = new UpdatePanel();
            _masterUpdatePanel.ID = "ImportExportUpdatePanel";
            _masterUpdatePanel.UpdateMode = UpdatePanelUpdateMode.Conditional;

            _masterUpdatePanel.ContentTemplateContainer.Controls.Clear();

            switch (PortletMode)
            {
                case ImportExportPortletState.Import:
                    CreateImportControls();
                    SetImportPostBackButton();
                    break;
                case ImportExportPortletState.Export:
                    CreateExportControls();
                    break;
                default:
                    CreateImportControls();
                    SetImportPostBackButton();
                    CreateExportControls();
                    CreateToolbar();
                    break;
            }


            Controls.Add(_masterUpdatePanel);

            ChildControlsCreated = true;
        }
开发者ID:maxpavlov,项目名称:FlexNet,代码行数:34,代码来源:ImportExportPortlet.cs


示例6: CreateChildControls

        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            Control parent;
            Control container;

            UpdatePanel up = new UpdatePanel();
            container = up.ContentTemplateContainer;
            parent = up;

            //Doctype picker
            picker = (DropDownList)new DocTypePicker().RenderControl();
            picker.AutoPostBack = true;
            picker.SelectedIndexChanged += new EventHandler(picker_SelectedIndexChanged);
            picker.ID = "doctypepicker";

            locationPicker.ID = "locationpicker";
            locationPicker.AutoPostBack = true;

            p_items.CssClass = "docMapper";
            p_items.Visible = false;

            container.Controls.Add(picker);
            container.Controls.Add(p_items);
            container.Controls.Add(locationPicker);
            Controls.Add(parent);
        }
开发者ID:TimGeyssens,项目名称:LocatorRazorStyle,代码行数:28,代码来源:DocumentMapperControl.cs


示例7: RegisterUpdatePanel

 protected void RegisterUpdatePanel(UpdatePanel panel)
 {
     var sType = typeof(ScriptManager);
     var mInfo = sType.GetMethod("System.Web.UI.IScriptManagerInternal.RegisterUpdatePanel", BindingFlags.NonPublic | BindingFlags.Instance);
     if (mInfo != null)
         mInfo.Invoke(ScriptManager.GetCurrent(Page), new object[] { panel });
 }
开发者ID:jupmasalamanca,项目名称:idisa,代码行数:7,代码来源:FrmArchivoCCSS.aspx.cs


示例8: RegisteredDisposeScript

 internal RegisteredDisposeScript(Control control, string disposeScript, UpdatePanel parentUpdatePanel) {
     Debug.Assert(control != null);
     Debug.Assert(disposeScript != null);
     Debug.Assert(parentUpdatePanel != null);
     _control = control;
     _script = disposeScript;
     _parentUpdatePanel = parentUpdatePanel;
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:8,代码来源:RegisteredDisposeScript.cs


示例9: AjaxStartupScript

 public void AjaxStartupScript(UpdatePanel control)
 {
     ScriptManager.RegisterClientScriptBlock(
         control,
         this.GetType(),
         "key",
         GetScript(),
         true);
 }
开发者ID:hkiaipc,项目名称:yh,代码行数:9,代码来源:UCDanRi.ascx.cs


示例10: HideAjaxinit

 public void HideAjaxinit(UpdatePanel up)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append(" <script language=JavaScript type=text/javascript>");
     sb.Append(" if( document.getElementById('loader_container')) document.getElementById('loader_container').style.display='none';");
     sb.Append("</script>");
     ScriptManager.RegisterClientScriptBlock(up, typeof(UpdatePanel), "Progress", sb.ToString(), false);
     //HttpContext.Current.Response.Flush();
 }
开发者ID:qq5013,项目名称:XJ_WMS,代码行数:9,代码来源:BasePageNoLoading.cs


示例11: CreateUpdatePanel

 public UpdatePanel CreateUpdatePanel(string Prefix, UpdatePanelUpdateMode Upm, int PaneUpdatePanelCount)
 {
     UpdatePanel udp = new UpdatePanel();
     udp.UpdateMode = Upm;
     PaneUpdatePanelCount++;
     udp.ID = "_udp_" + "_" + PaneUpdatePanelCount + Prefix;
     //udp.EnableViewState = true;
     return udp;
 }
开发者ID:electrono,项目名称:veg-web,代码行数:9,代码来源:ctl_Extensions.ascx.cs


示例12: p_Init

 void p_Init(object sender, EventArgs e)
 {
    if(IsInAjaxMode())
    {
        up = new UpdatePanel();
        up.ID = UpdatePanelId;
        up.UpdateMode = UpdatePanelUpdateMode.Always;
        page.Form.Controls.Add(up);
    }
 }
开发者ID:vincentzh,项目名称:nhibernate.burrow-custom,代码行数:10,代码来源:GlobalPlaceHolder.cs


示例13: UpdateToolTip

        private void UpdateToolTip(string elementID, UpdatePanel panel)
        {
           
                Control ctrl = Page.LoadControl("~/user-controls/footer.ascx");
                panel.ContentTemplateContainer.Controls.Add(ctrl);
                // ProductDetails details = (ProductDetails)ctrl;
                //details.ProductID = elementID;
            

        }
开发者ID:vaibhavgeek,项目名称:friendyoke,代码行数:10,代码来源:Default.aspx.cs


示例14: AddControlToBody_WithOtherControl_AddsControlToBodyControl

        public void AddControlToBody_WithOtherControl_AddsControlToBodyControl()
        {
            // arrange
            var updatePanel = new UpdatePanel();
            var control = new UserControl();
            var bodyControl = new UserControl();
            var page = new SubtextMasterPage();

            // act
            page.AddControlToBody("Other", control, updatePanel, bodyControl);

            // assert
            Assert.AreEqual(control, bodyControl.Controls[0]);
        }
开发者ID:ChrisPelatari,项目名称:SubText,代码行数:14,代码来源:SubtextMasterPageTests.cs


示例15: AddSPNotification

 public static void AddSPNotification(UpdatePanel updSettings, string text, bool isRefresh)
 {
     if (String.IsNullOrEmpty(text) == false)
     {
         StringBuilder stringBuilder = new StringBuilder();
         stringBuilder.AppendLine(string.Format("SP.UI.Notify.addNotification(\"{0}\");", text));
         if (isRefresh == true)
         {
             stringBuilder.AppendLine("SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK, 1);");
             stringBuilder.AppendLine("window.frameElement.commitPopup();");
         }
         ScriptManager.RegisterClientScriptBlock(updSettings, updSettings.GetType(), Guid.NewGuid().ToString(), stringBuilder.ToString(), true);
     }
 }
开发者ID:Fabiarm,项目名称:spsmfiles,代码行数:14,代码来源:Helper.cs


示例16: InitOverviewGrid

		internal void InitOverviewGrid(UpdatePanel targetContainer)
		{
			_grdOrders = new GridView {CellPadding = 5, AllowSorting = true, CssClass = "uwbsOrderGridView"};

			const string alternatingRowStylehexValue = "#eeeeee";
			_grdOrders.AlternatingRowStyle.BackColor = ColorTranslator.FromHtml(alternatingRowStylehexValue);

			_grdOrders.RowDataBound += GrdOrdersOnRowDataBound;
			_grdOrders.Sorting += GrdOrdersOnSorting;
			_grdOrders.PageIndexChanging += GrdOrdersOnPageIndexChanging;
			_grdOrders.ShowHeader = true;

			BindData();
			targetContainer.ContentTemplateContainer.Controls.Add(_grdOrders); //targetContainer.Controls.Add(_grdOrders);
		}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:15,代码来源:OrderOverview.cs


示例17: AddControlToBody_WithComments_AddsControlToUpdatePanel

        public void AddControlToBody_WithComments_AddsControlToUpdatePanel()
        {
            // arrange
            var updatePanel = new UpdatePanel();
            var control = new UserControl {Visible = false};
            var bodyControl = new UserControl();
            var page = new SubtextMasterPage();

            // act
            page.AddControlToBody("Comments", control, updatePanel, bodyControl);

            // assert
            Assert.AreEqual(control, updatePanel.ContentTemplateContainer.Controls[0]);
            Assert.IsTrue(control.Visible);
        }
开发者ID:ChrisPelatari,项目名称:SubText,代码行数:15,代码来源:SubtextMasterPageTests.cs


示例18: AddControlToBody_WithPostComment_AddsControlToUpdatePanelAndUpdatePanelToCenterBodyControl

        public void AddControlToBody_WithPostComment_AddsControlToUpdatePanelAndUpdatePanelToCenterBodyControl()
        {
            // arrange
            var updatePanel = new UpdatePanel();
            var postCommentControl = new PostComment();
            var bodyControl = new UserControl();
            var page = new SubtextMasterPage();

            // act
            page.AddControlToBody("PostComment", postCommentControl, updatePanel, bodyControl);

            // assert
            Assert.AreEqual(postCommentControl, updatePanel.ContentTemplateContainer.Controls[0]);
            Assert.AreEqual(updatePanel, bodyControl.Controls[0]);
            Assert.IsTrue(postCommentControl.Visible);
        }
开发者ID:ChrisPelatari,项目名称:SubText,代码行数:16,代码来源:SubtextMasterPageTests.cs


示例19: AddUpdatePanel

        private void AddUpdatePanel(Panel p)
        {
            updatePanel = new UpdatePanel();
            updatePanel.ID = "ScrudUpdatePanel";
            updatePanel.ChildrenAsTriggers = true;
            updatePanel.UpdateMode = UpdatePanelUpdateMode.Conditional;

            updatePanel.ContentTemplateContainer.Controls.Add(this.topCommandPanel.GetCommandPanel());
            updatePanel.ContentTemplateContainer.Controls.Add(this.messageLabel);
            updatePanel.ContentTemplateContainer.Controls.Add(this.gridPanel);
            updatePanel.ContentTemplateContainer.Controls.Add(this.formPanel);
            updatePanel.ContentTemplateContainer.Controls.Add(this.bottomCommandPanel.GetCommandPanel()); //Bottom command panel.

            userIdHidden = new HiddenField();
            officeCodeHidden = new HiddenField();

            updatePanel.ContentTemplateContainer.Controls.Add(userIdHidden);
            updatePanel.ContentTemplateContainer.Controls.Add(officeCodeHidden);
            p.Controls.Add(updatePanel);
        }
开发者ID:n4gava,项目名称:mixerp,代码行数:20,代码来源:UpdatePanel.cs


示例20: CreateChildControls

        protected override int CreateChildControls(System.Collections.IEnumerable dataSource, bool dataBinding)
        {
            if (this.WrapControl != null)
            {
                UpdatePanel up = new UpdatePanel();

                up.ID = String.Format("up_{0}", this.WrapControl.ID);
                up.ChildrenAsTriggers = true;
                up.EnableViewState = true;
                up.UpdateMode = UpdatePanelUpdateMode.Conditional;
                up.ContentTemplateContainer.Controls.Add(this.WrapControl);

                this.Controls.Add(up);
                //this.LoadViewState(HttpContext.Current.Request.Form["__VIEWSTATE"]);
                return 1;
            }
            else
            {
                return 0;
            }
        }
开发者ID:0anion0,项目名称:IBN,代码行数:21,代码来源:IbnWidgetContainer.cs



注:本文中的System.Web.UI.UpdatePanel类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UI.UserControl类代码示例发布时间:2022-05-26
下一篇:
C# UI.TemplateParser类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap