Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friends i am working on datalist .I have a problem, that i don't want to post back my page on button click , can you please tell me how to avoid post back on button click with datalist.
thanks in advance friends
Posted

1 solution

XML
<asp:UpdatePanel>
        <ContentTemplate>
            <asp:ListView>.....</asp:ListView>
        </ContentTemplate>
    </asp:UpdatePanel>


it will postback but only partial postback.

otherwise if you don't want your button to execute any server side code just add client script in your button tag like
C#
<asp:button id="test" runat="server" onclientclick="alert('boom'); return false;" />
 
Share this answer
 
v3
Comments
Jephunneh Malazarte 18-Jan-12 5:05am    
hello anuja thanks for editing.. was really in a hurry that time... :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900