how to add google 1 button using asp MVC 4 and add in internet application

how to add google +1 button using asp MVC 4 and add in internet application

Answers


First of all: https://developers.google.com/+/plugins/+1button/

Adding a Google +1 button doesn't have much to do with MVC 4 per se, but a potential implementation looks something like this:

In View/Partial View
<footer>
    <ul>
        <li>
            <div class="g-plusone" data-annotation="none"></div>
        </li>

        @* other buttons/links/whatever *@

    </ul>
</footer>
In _Layout.cshtml corresponding to the View
<script>
    (function() {
        var po = document.createElement( 'script' ); po.type = 'text/javascript'; po.async = true;
        po.src = 'https://apis.google.com/js/plusone.js';
        var s = document.getElementsByTagName( 'script' )[0]; s.parentNode.insertBefore( po, s );
    } )();
</script>

Note that you might load this script conditionally, place it within a @section, etc.


For that firstly you have to create opnID auth key for more informations you can check out this link: http://net.tutsplus.com/tutorials/building-an-asp-net-mvc4-application-with-ef-and-webapi/


Need Your Help

Using local database with Android virtual device

android database connection localhost avd

Following this topic Can an Android App connect directly to an online mysql database I'm trying to approach Android and Database on my studies; The things is, I would like to know if I can or may u...

File viewer with sliding buffer

c# winforms file text buffer

I'd like to make a simple text file viewer and I'd like it to be able to handle large files (possibly larger than the computer's memory).