Facebook Bookmark Button for ASP.NET

Facebook Bookmark Button is easy and fast way to save interesting websites and applications inside Facebook environment so they can be quickly found from the list of bookmarks. Implementation of bookmark button increases the possibility that the user which likes some website or application will come again. There is lot of interesting content on the Internet which is hard to find again if it is not bookmarked. People usually forgot to make bookmarks in their Internet browsers, but if there is Facebook bookmark button placed on visible place on the website, it increases the chance that the user will bookmark that website or Facebook application.

Facebook Bookmark Button ASP.NET control is the easiest way to integrate this feature in your ASP.NET web page. It also has an event handler to inform an application that bookmark is made, so you can execute some additional code. Compiled version and source code version of this ASP.NET control are available in C# and VB.NET programming languages, as part of Facebook ASP.NET (C# and VB.NET) Control library.




Picture of Bookmark button, and the popup shown when it's pressed:
bookmarkbutton



Facebook Bookmark Button ASP.NET control has a demo page inside Demo Website that show how it works. The most important fact is that the Demo website is contained in package with the library, which is very useful resource for code examples in both C# and VB.NET, for each control from the library. Look at the Facebook Bookmark Button demo.



Configuration

Configuration of the Facebook Bookmark Button ASP.NET control is done in ASPX page by setting optional properties and the event handler. If dynamic setting of properties is required, they can be also set in the code behind, for example in Page_Load method. If an event handler is used, new method should be created in the code behind to execute additional code after the bookmark is added.

There is only one optional event handler that is executed on added bookmark. If user previously bookmarked an application or website, message that reminds user about that will be showed in a popup dialog. In both cases, event handler is executed to run additional code.


Optional Properties:
facebook login button asp.net
Property Name
Type
Description
facebook login button asp.net
OffFacebook
Bool
Set to true if the bookmark button is used on external website. Default value is false.


Event Handlers:
facebook login button asp.net
Event Name
Description
facebook login button asp.net
AddedBookmark
Name of protected method that is implemented inside the code behind and which will be called after the bookmark is added.




Usage Examples:

Following examples demonstrate usage of Facebook Bookmark Button ASP.NET control inside external website. To use bookmark button inside Facebook iFrame application, parameter OffFacebook can be omitted. Code behind in C# and VB.NET is also shows how to implement event handler that runs when user makes bookmark.

Examples of ASPX files show only the code required for registration and integration of ASP.NET control in a web page. To see all requirements for registered components, including JavaScript, CSS style and header setting, please look at the manual. For following examples, all page requirements are placed in ASP.NET master page. Important parts for registration and integration of Facebook Bookmark Button inside ASP.NET page are highlighted.


Bookmark Button in ASPX file:
 <%@ Page MasterPageFile="~/Master.Master" AutoEventWireup="true" Inherits="FVK_Demo.BookmarkButton" %>
 <%@ Register TagPrefix="fvk" TagName="bookmark" Src="~/FVK/BookmarkButton.ascx" %>
 <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Facebook Connect Bookmark Button control for ASP.NET</title>
    <meta name="description" content="ASP.NET Implementation of Facebook Bookmark Button" />
 </asp:Content>
 <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <fvk:bookmark ID="bookmark1" runat="server" OnAddedBookmark="BookmarkAdded" OffFacebook="true" />
 </asp:Content>


Code behind in C#:
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Web;
 using System.Web.UI;
 using System.Web.UI.WebControls;
 using Facebook;

 namespace FVK_Demo
 {
    public partial class BookmarkButton : System.Web.UI.Page
    {
       protected void Page_Load(object sender, EventArgs e)
       {
            
       }

       protected void BookmarkAdded(object sender, EventArgs e)
       {
          // Add some code to execute on bookmark added
       }
    }
 }


Code behind in VB.NET:
 Imports System.Collections.Generic
 Imports System.Linq
 Imports System.Web
 Imports System.Web.UI
 Imports System.Web.UI.WebControls
 Imports Facebook

 Namespace FVK_Demo
    Public Partial Class BookmarkButton
       Inherits System.Web.UI.Page
       Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load

       End Sub

       Protected Sub BookmarkAdded(sender As Object, e As EventArgs)
          ' Add some code to execute on bookmark added
       End Sub
    End Class
 End Namespace

 

Customer Testimonials

"I personally use it in both of my apps too and it's WONDERFUL. Saves a LOT of time. Get the source code license. It's well worth it. The best part is that the dev is constantly updating it to keep up with any facebook changes, so we never have to worry about that part of it. Get this product. If you're serious about facebook development using asp.net, then this product isn't merely a luxury, it's a must have. Get it. You'll be glad you did.Excellent product."

Terence McGhee, Bonafide Diversions Inc.

Customer Spotlight



Vote for your favorites

Facebook development platform
Contact   |  Refund Policy   |  Privacy Policy   |  EULA