Step 1: Go to http://www.addthis.com/ and create a new account. You will get an ID that you will need to use in the below code.
Step 2: Select style of social media buttons.
Step 3: Select buttons you like and create a script and use that script in your ASP.NET page.
Here is the code snippet in my ASP.NET page.
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
- <title></title>
- <script type="text/javascript"> var addthis_config = { "data_track_addressbar": true };</script>
- <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-518a46984fa73489"
- temp_src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-518a46984fa73489"></script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- hello testin of add this controls
- </div>
- <div>
- <p>
- Share Buttons</p>
- <div class="addthis_toolbox addthis_default_style ">
- <a class="addthis_button_tweet"></a><a class="addthis_button_pinterest_pinit"></a>
- <a class="addthis_counter addthis_pill_style"></a>
- </div>
- <script type="text/javascript"> var addthis_config = { "data_track_addressbar": true };</script>
- <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-518a46984fa73489"
- temp_src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-518a46984fa73489"></script>
- </div>
- <div>
- <p>
- Follow Us</p>
- <div class="addthis_toolbox addthis_32x32_style addthis_default_style">
- <a class="addthis_button_facebook_follow" addthis:userid="YOUR-PROFILE"></a><a class="addthis_button_twitter_follow"
- addthis:userid="YOUR-USERNAME"></a><a class="addthis_button_linkedin_follow" addthis:userid="ggdfgdf">
- </a><a class="addthis_button_linkedin_follow" addthis:userid="gdfg" addthis:usertype="company">
- </a><a class="addthis_button_google_follow" addthis:userid="gdfgd"></a><a class="addthis_button_youtube_follow"
- addthis:userid="fdgdf"></a><a class="addthis_button_flickr_follow" addthis:userid="dfgdf">
- </a><a class="addthis_button_vimeo_follow" addthis:userid="dfgdf"></a><a class="addthis_button_pinterest_follow"
- addthis:userid="gdfg"></a><a class="addthis_button_instagram_follow" addthis:userid="dfgdf">
- </a><a class="addthis_button_foursquare_follow" addthis:userid="dfgdf">
- </a><a class="addthis_button_tumblr_follow" addthis:userid="dgfgdf"></a><a class="addthis_button_rss_follow"
- addthis:userid="gdfgdf"></a>
- </div>
- <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-518a46984fa73489"
- temp_src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-518a46984fa73489"></script>
- </div>
- <div>
- Trending Content
- <div id="addthis_trendingcontent">
- </div>
- <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-518a46984fa73489"
- temp_src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-518a46984fa73489"></script>
- <script type="text/javascript">
- addthis.box("#addthis_trendingcontent", {
- feed_title: "fsdfsd",
- feed_type: "trending",
- feed_period: "month",
- num_links: 5,
- height: "auto",
- width: "auto"
- });
- </script>
- </div>
- <div>
- </div>
- </form>
- </body>
- </html>
Continue next >> Custom Facebook, Twitter Share Functionality In ASP.NET