Click here to Skip to main content
Sign Up to vote bad
good
See more: C#ASP.NET
<asp:LinkButton ID="lbClickPhoto" CssClass="link" ForeColor="Blue" runat="server"
                                        OnClick="lbClickPhoto_Click" OnClientClick="test">Click Photo</asp:LinkButton>
Posted 21 Nov '12 - 22:40
Edited 21 Nov '12 - 22:42


1 solution

in the "OnClientClick" event you should user "return" and then after the OnClientClick event, it will get to the server side and do the OnClick event.
 
example:
 
<asp:LinkButton ID="lbClickPhoto" CssClass="link" ForeColor="Blue" runat="server" OnClick="lbClickPhoto_Click" OnClientClick="return TestFunc();">Click Photo</asp:LinkButton>
  Permalink  
Comments
Member 9463303 - 22 Nov '12 - 4:53
what does this code "xmlns:asp="#unknown" will do?
DanaH85 - 22 Nov '12 - 4:58
Sorry, I copied it wrong. I fixed it now...
Member 9463303 - 22 Nov '12 - 5:25
Okey Thanks :)

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 266
1 Mohammed Hameed 183
2 Sergey Alexandrovich Kryukov 143
3 Santhosh G_ 108
4 CPallini 96
0 Sergey Alexandrovich Kryukov 8,266
1 OriginalGriff 6,306
2 CPallini 3,528
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid