Shivang Chauhan

Shivang Chauhan

  • NA
  • 11
  • 497

How to add facebook button for dynamic links in asp.net?

Jan 6 2018 1:57 AM
I am making a website in which i am sending 10 links to all users and i am using 10 panels for every add i am sending, every panel has two buttons one to view the add and one to share the add on their facebook profile so i want to know how can i take the url from that href or link button and put assign it on a facebook share button so user can post that link on their facebook timeline, over that all these links will get refreshed randomly every day automatically. So how can i achieve this ?
 
My code--
 
  1. <asp:Panel ID="Panel1" runat="server">  
  2. <table class="table table-striped table-bordered">              
  3.     <tr>  
  4.         <td>Ads 1</td>  
  5.         <td>  
  6.            Link  
  7.         </td>  
  8.         <td>  
  9.               
  10.             <asp:Button ID="Button21" runat="server" OnClick="Button21_Click" Text="View" CssClass="btn btn-primary btn-sm" />  
  11.             <asp:Button ID="Button2" runat="server" Text="Share" CssClass="btn btn-danger btn-sm" />  
  12.   
  13.         </td>  
  14.     </tr>  
  15. </table>  
  16. </asp:Panel>  
 This is my code for creating the panel and setting two buttons in it, i have 9 more panels like this below this code.
 
How can i make this share button ? which takes the href from link button or hyperlink(i am using button click even to redirect the user but i can change it accordingly) and use that url as a share link ?
 
Thanks 

Answers (1)