1
我有一個asp:按鈕,它具有onclick
函數。有沒有辦法消除發生的刷新?擺脫刷新按鈕點擊
當前包含HTML的按鈕。
<div id="user" class="font">
<div id="userPanel">
<asp:TextBox ID="txtSearch" runat="server" Width="400px" align="left"></asp:TextBox>
<asp:Button ID="searchbutton" text="enter" runat="server"
onclick="searchbutton_Click" />
<asp:Label ID="test" runat="server"></asp:Label>
</div>
<asp:UpdatePanel ID="userinfoupdatepanel" runat="server">
<ContentTemplate>
<div class="topcontent">
<ul>...</ul>
</div>
</ContentTemplate>
</asp:UpdatePanel>
點擊該按鈕然後調用,填補了UL內容
你想只調用一個javascript函數,但要回發頁面? – 2012-08-03 17:11:23
它實際上在c#中調用一個函數,當前是 – user1512593 2012-08-03 17:21:02
好吧,你希望它什麼都不做? – 2012-08-03 17:23:54