Initialize Graph API ASP.NET Control
Configuration of the InitFVK ASP.NET control is done in ASPX page by setting optional properties. If dynamic setting of properties is required, they can be also set in the code behind, for example on Page_Load method. Most of the time default control in used, but there are some cases, for example when language has to be explicitly set, when setting of parameters is required. Following table shows the list of all optional parameters.
Following examples show registration and insertion of InitFVK ASP.NET control for initializing of Facebook Graph API in ASPX file. Usage of master pages is preferable option, to make an application easier to maintain. Because of that, examples show master page where the control is used. It is required to insert Resizable iFrame control immediately after <body< tag. To be easier to find, important parts for registration and integration of Facebook control inside ASP.NET page are highlighted.
Integration in ASP.NET master page:
<%@ Master AutoEventWireup="true" Inherits="FVK_Demo.Master" %> <%@ Register TagPrefix="fvk" TagName="initfvk" Src="~/FVK/InitFVK.ascx" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.Facebook.com/2008/fbml"> <head id="Head1" runat="server"> <title>FVK Demo</title> <link rel="stylesheet" type="text/css" href="/FVK/fvk.css" /> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder> </head> <body> <fvk:initfvk ID="initfvk1" runat="server" /> <img src="/Images/banner.png" alt="" /> <br /> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </form> </body> </html>