Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以将OnCheckedChangedASP.NET 复选框的事件触发到 div?所以,当我点击 div 时,OnCheckedChanged事件应该会触发。
OnCheckedChanged
复选框位于中继器内,复选框和标签被 div 包围。
这可能吗?
您可以使 div.onclick() 处理程序手动触发 OnCheckedChanged 事件。像这样的东西:
div_onclick(object sender, eventargs e) { checkbox_OnCheckedChanged(null, null); }