- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
在用户控件中,我有一个自定义按钮。我在 aspx 页面上使用这个用户控件。单击用户控件中的按钮时,应清除 aspx 页面中的复选框和标签。你能告诉我如何完成这个吗?
最佳答案
在您的用户控件中,您需要创建一个公共(public)事件处理程序
public event EventHandler UpdateParentPage;
在你的用户控件的按钮点击事件中,放置
protected void btn_Click(object sender, EventArgs e)
{
if (this.UpdateParentPage != null)
UpdateParentPage(sender, e);
}
在您的父页面代码后面,为您的用户控件设置事件处理程序:
userControl.UpdateParentPage+= new EventHandler(userControl_UpdateParentPage);
然后,在您的父页面上实现新的事件处理程序:
protected void userControl_UpdateViewState(object sender, EventArgs e)
{
//clear your checkboxes and label here
}
关于c# - 用户控制点击事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2381732/
有没有办法动态调整贝塞尔路径四曲线的控制点? 我正在为 children 创建一个小型拖放绘图应用程序。我希望他们在 Canvas 上添加一条线,然后通过拖动手指来调整曲线点以创建微笑或皱眉。 我目前
我正在开发一款安卓 UPnP/DLNA 应用程序。我有一个控制点,我可以在其中将文件从媒体服务器流式传输到渲染器。我可以在播放期间暂停/播放和停止文件,但我似乎无法弄清楚如何将搜索栏集成到控制点中以显
我能够使用这个问题的答案在 ggplot 中找到 geom_curve 控制点: How to find the geom_curve control points in ggplot 我现在想知道如
我正在开发一个类似提醒的应用程序,需要在特定时间发送通知。基本上,用户会创建某种提醒,我需要在指定时间发送通知。我正在使用 Firebase Cloud Messaging 发送通知。 我现在的想法是
我正在开发一个类似提醒的应用程序,需要在特定时间发送通知。基本上,用户会创建某种提醒,我需要在指定时间发送通知。我正在使用 Firebase Cloud Messaging 发送通知。 我现在的想法是
我一直在搜索 gcloud 文档和网络,但找不到为 gcloud 应用服务版本设置配置的方法。 在我的其他项目中已经完成,但我忘记了如何再次更新它。我想做的是对单个服务设置最大版本限制 - 例如: 使
我正在尝试为一些 NSView 的 alpha 过渡设置动画。它需要在另一个动画期间发生,特别是它的 super View (边界更改)。解释原因有点复杂,但我需要这些 alpha 转换具有计时功能,
以下怎么可能? ➢ gcloud compute instances list NAME ZONE
以下怎么可能? ➢ gcloud compute instances list NAME ZONE
我想将 Spanner 中现有表的主键从 Col1 修改为 Col1 和 Col2 的组合。可以在 Spanner 中实现吗? 此选项在控制台中不可用。也许可以用脚本来完成! 最佳答案 The key
我想使用 CyberGarage“CyberLink for Java”API 为 Android 编写一个 UPnP 控制点应用程序。为了测试 API,我实现了一个非常简单的应用程序。在此应
我是一名优秀的程序员,十分优秀!