asp.net - How to remove postback on linkbutton inside gridview? -


i'd ask on how prevent post when linkbutton inside gridview clicked?

my current implementation that, have gridview customer details , button link id link button, once link button clicked customer details shown on respective fields (i.e. textbox, etc), want more interactive , faster when clicking said button removing post back. how can achieve this? thanks.

so confirm answer after our comments, replace this...

<asp:templatefield> <itemtemplate> <asp:linkbutton id="linkview" cssclass="view" text ='<%# eval("id")%>' runat="server"></asp:linkbutton> </itemtemplate> </asp:templatefield> 

...with this...

<asp:templatefield> <itemtemplate> <a href="#" onclick="return loadviaajax();"><%# eval("id")%></a> </itemtemplate> </asp:templatefield> 

...where loadviaajax javascript function populates customer fields via ajax or other means. ensure function returns false prevent browser responding anchor click.

please mark answer if works you.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -