how to bind javascript function with OnClientClick event with Eval?
问题 my link button - <asp:LinkButton runat="server" ID="lbtnEdit" Text="edit" OnClientClick="javascript:msgDisp('<%# Eval(LocationId).toString() %>')" /> and the javascript msgDisp is- <script type="text/javascript" language="javascript"> function msgDisp(lid) { alert(lid); } </script> but it is not giiving LocationId in pop but the whole string <%#......%> is comin in popup message. How can I pass Eval values in javascript. 回答1: You can build the entire contents of OnClientClick as a string