更新时间:2023-11-30 15:39:22
您可以做到这一点,以刷新的UpdatePanel没有按钮:
You can do this to refresh your updatepanel without the button:
<script type="text/javascript">
function refreshPanel() {
__doPostBack('<%= updatePanel.UniqueID %>', '');
}
</script>
<label>Search:</label>
<asp:TextBox runat="server" ID="search"
ClientIDMode="Static" OnKeyUp="refreshPanel();" />
<asp:UpdatePanel runat="server" ID="updatePanel">
您只需要给你的UpdatePanel一个ID(这里的UpdatePanel)
You just need to give your updatepanel an ID (updatePanel here)
执行了code在KEYUP或当你已经准备好了。
Execute that code on a keyup or whenever you are ready for it.