SocialShare - Client-side events

Event log

Isolate this demo as a stand-alone application

Standard third party buttons

The RadSocialShare control exposes the following client-side events:

Styled buttons client events:

  • OnSocialButtonClicking - fired just when a user clicks on a RadSocialButton and the share popup has not been shown yet. This event can be cancelled. Its arguments expose the type of the share button social network and the share url
  • OnSocialButtonClicked - fired when a user has already clicked on a RadSocialButton. Its arguments expose the type of the share button social network, the share url and the popup share dialog.

Standard third party buttons client events:

  • OnFacebookLike - fired when a user clicks Facebook Like button.
  • OnFacebookUnLike - fired when a user clicks Facebook UnLike button.
  • OnFacebookSend - fired when a user sends an url through Facebook Send button.
  • OnTweet - fired when a user clicks Twitter Tweet button
  • OnGooglePlusOneOn - fired when a user votes through Google +1 button
  • OnGooglePlusOneOff - fired when a user unvotes through Google +1 button
  • OnLinkedInShare - fired when a user clicks standard third party LinkedIn button

<%@ Page Language="C#"  %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <script src="scripts.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-containers">
        <div class="demo-container">
            <telerik:RadSocialShare ID="RadSocialShare1" runat="server" OnFacebookLike="OnFacebookLike"
                OnFacebookUnLike="OnFacebookUnLike" OnTweet="OnTweet" OnGooglePlusOneOff="OnGooglePlusOneOff"
                OnGooglePlusOneOn="OnGooglePlusOneOn" OnSocialButtonClicking="OnSocialButtonClicking"
                OnFacebookSend="OnFacebookSend" OnSocialButtonClicked="OnSocialButtonClicked"
                OnLinkedInShare="OnLinkedInShare" UrlToShare="http://www.telerik.com" TitleToShare=".NET UI Controls, Reporting, Visual Studio Tools, Agile Project Management, Automated Testing, ASP.NET Web CMS by Telerik">
                <MainButtons>
                    <telerik:RadSocialButton SocialNetType="ShareOnFacebook"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="ShareOnTwitter"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="ShareOnYammer"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="ShareOnPinterest" UrlToShare="http://demos.telerik.com/aspnet-ajax/Common/Images/SiteNav/telerik-logo.png"
                        TitleToShare=".NET UI Controls, Reporting, Visual Studio Tools, Agile Project Management, Automated Testing, ASP.NET Web CMS by Telerik">
                    </telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="Blogger"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="Delicious"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="Digg"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="GoogleBookmarks"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="ShareOnGooglePlus"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="LinkedIn"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="MySpace"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="Reddit"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="StumbleUpon"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="Tumblr"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="MailTo"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="SendEmail"></telerik:RadSocialButton>
                    <telerik:RadLinkedInButton CounterMode="Horizontal" ShowZeroCount="true"></telerik:RadLinkedInButton>
                    <telerik:RadFacebookButton ButtonType="FacebookLike" ButtonLayout="ButtonCount">
                    </telerik:RadFacebookButton>
                    <telerik:RadFacebookButton ButtonType="FacebookSend"></telerik:RadFacebookButton>
                    <telerik:RadTwitterButton CounterMode="Horizontal"></telerik:RadTwitterButton>
                    <telerik:RadGoogleButton AnnotationType="Bubble"></telerik:RadGoogleButton>
                    <telerik:RadCompactButton></telerik:RadCompactButton>
                </MainButtons>
                <CompactButtons>
                    <telerik:RadSocialButton SocialNetType="ShareOnFacebook"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="ShareOnTwitter"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="ShareOnYammer"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="ShareOnPinterest" UrlToShare="http://demos.telerik.com/aspnet-ajax/Common/Images/SiteNav/telerik-logo.png"
                        TitleToShare=".NET UI Controls, Reporting, Visual Studio Tools, Agile Project Management, Automated Testing, ASP.NET Web CMS by Telerik">
                    </telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="Blogger"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="Delicious"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="Digg"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="GoogleBookmarks"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="ShareOnGooglePlus"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="LinkedIn"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="MySpace"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="Reddit"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="StumbleUpon"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="Tumblr"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="MailTo"></telerik:RadSocialButton>
                    <telerik:RadSocialButton SocialNetType="SendEmail"></telerik:RadSocialButton>
                </CompactButtons>
            </telerik:RadSocialShare>
        </div>
    </div>
    <qsf:EventLogConsole ID="EventLogConsole1" runat="server" AllowClear="true"></qsf:EventLogConsole>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?