public void CreateHiddenButton(string id, EventHandler clickHandler)
		{
			SubmitButton btn = new SubmitButton();

			btn.ID = id;
			btn.Click += clickHandler;
			btn.Style["display"] = "none";
			btn.RelativeControlID = this.targetControlID;

			this.hiddenButton = btn;
		}
Exemplo n.º 2
0
		/// <summary>
		/// 创建一个隐藏的服务器端SubmitButton。在客户端激活这个Button的Click会通过PostBack
		/// </summary>
		/// <param name="id">Button的ID</param>
		/// <param name="popupCaption">如果指定此参数,会显示量程计,并且显示此标题</param>
		/// <param name="relativeControlID">相关控件ID。Button Click后,会Disable掉相关控件</param>
		/// <param name="clickHandler">Button Click后的服务器端事件</param>
		/// <returns>SubmitButton的实例</returns>
		protected virtual SubmitButton CreateHiddenButton(string id, string popupCaption, string relativeControlID, EventHandler clickHandler)
		{
			SubmitButton btn = new SubmitButton();

			btn.ID = id;
			btn.Click += clickHandler;
			btn.Style["display"] = "none";
			btn.PopupCaption = popupCaption;
			btn.RelativeControlID = relativeControlID;
			btn.ProgressMode = SubmitButtonProgressMode.BySteps;
			btn.MinStep = 0;
			btn.MaxStep = 100;

			return btn;
		}
Exemplo n.º 3
0
		private void CreateButtons()
		{
			this.innerMoveToButton = CreateHiddenButton(
				"innerMoveToButton",
				Translator.Translate(Define.DefaultCulture, "正在流转..."),
				this.ControlIDToMoveTo,
				new EventHandler(innerMoveToButton_Click));
			Controls.Add(this.innerMoveToButton);

			this.innerSaveButton = CreateHiddenButton(
				"innerSaveButton",
				Translator.Translate(Define.DefaultCulture, "正在保存..."),
				this.ControlIDToSave,
				new EventHandler(innerSaveButton_Click));
			Controls.Add(this.innerSaveButton);
		}