Tuesday 13 September 2011

Share image with facebook in asp.net

Design page
------------

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Admin_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 runat="server">
    <title>Test Image share with facebook </title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="lblShare" runat="server" Text="Label"></asp:Label>
    </div>
    </form>
</body>
</html>
------------------------
Code page
-----------------------

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Admin_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string str = "";
        str = " <div class='a2a_kit a2a_default_style'><a class='a2a_button_facebook'></a><a class='a2a_button_twitter'></a><a class='a2a_button_email'></a> </div> <script type='text/javascript'> var a2a_config = a2a_config || {};a2a_config.linkname = 'Capture America';a2a_config.linkurl = 'http://www.floripaweb.net/images/DOTNET%20logo.png'; </script> <script type='text/javascript' src='http://static.addtoany.com/menu/page.js'></script>";
        lblShare.Text = str;
    }
}

No comments:

Post a Comment

Get all non-clustered indexes

DECLARE cIX CURSOR FOR     SELECT OBJECT_NAME(SI.Object_ID), SI.Object_ID, SI.Name, SI.Index_ID         FROM Sys.Indexes SI             ...