BlogEngine.Net: +1 (plusone) Button

There has been a lot of discussion lately about Google’s +1 service. Google has even made it easy to add a +1 button to your webpage.

It is just as easy to add a +1 button to your BlogEngine.Net posts.

First need to add the following script to the HEAD section of your site.master template.


<script type="text/javascript" src=""></script>


Then you only need to add the following to your PostView.ascx file where you would like the button to be displayed:


<g:plusone size="small" count="false" href="<%=Post.PermaLink %>"></g:plusone>

To display the +1 count for the post change the count attribute to true.


You can see more +1 button options here. StumbleUpon Button

In a previous post I discussed how to display Twitter, Facebook and dotNetKicks buttons in a BlogEngine.Net.  It is also possible to add ad StumbleUpon botton to you BlogEngine.Net post.

Place the following code in your PostView.ascx page.

<script src="<%=Post.PermaLink %>"></script>

The "s" parameter can be changed to a number 1-6 to displacy additional button types. Twitter, FaceBook and DotNetKicks Buttons

Outside of setting up an extension you can easily add Twitter, FaceBook and DotNetKicks buttons to you BlogEngine.Net posts by inserting the following code snippets in the desired location of your theme’s PostView.ascx page:


<a href='' class='twitter-share-button' data-url='<%=Post.PermaLink %>'
                data-count='horizontal'>Tweet</a><script type='text/javascript' src=''></script>



<iframe src='<%=Post.PermaLink %>&layout=button_count&show_faces=false&action=Like&colorscheme=light'
                frameborder="0" scrolling="no" style="border-style: none; height: 20px; width: 90px;
                overflow: hidden;"></iframe>


  • The options for layout are button_count, standard and box_count 
  • The options for action are like and recommend 
  • The options for colorscheme are light and dark



<a href="<%=Post.PermaLink %>&title=<%=Post.Title %>"
                <img src="<%=Post.PermaLink %>"
                    border="0" alt="kick it on" /></a>