首页 > 代码库 > triggerbox控件
triggerbox控件
ExtAspNetv2.3.2源码ExtAspNet是一组专业的Asp.net控件库,拥有原生的AJAX支持和丰富的UI效果。目标是创建没有JavaScript,没有CSS,没有UpdatePanel,没有WebServices的Web应用...
当前路径:form/triggerbox.aspx.cs using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace ExtAspNet.Examples.form{ public partial class triggerbox : PageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Window1.OnClientCloseButtonClick = Window1.GetHidePostBackReference(); } } /// <summary> /// 点击 TriggerBox 弹出窗口 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void tbxMyBox1_TriggerClick(object sender, EventArgs e) { Window1.Hidden = false; } /// <summary> /// 关闭弹出窗口 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnCloseWindow_Click(object sender, EventArgs e) { Window1.Hidden = true; tbxMyBox1.Text = "Now the popup window is closed."; } /// <summary> /// 点击TwinTriggerBox的取消按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ttbxMyBox2_Trigger1Click(object sender, EventArgs e) { // 执行清空动作 Alert.ShowInParent(String.Format("Cancel search in {0}.", ttbxMyBox2.Text)); ttbxMyBox2.Text = ""; ttbxMyBox2.ShowTrigger1 = false; } /// <summary> /// 点击TwinTriggerBox的搜索按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ttbxMyBox2_Trigger2Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(ttbxMyBox2.Text)) { // 执行搜索动作 Alert.ShowInParent(String.Format("Search in {0}.", ttbxMyBox2.Text)); ttbxMyBox2.ShowTrigger1 = true; } else { Alert.ShowInParent("Please input the keyword you want to search!"); } } }}
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。