This project is read-only.

Widget for Adsense

Topics: Controls
Jul 26, 2008 at 8:37 AM

How can i create a sideBar widget for Google Adsense??


Bharat Mudgal
Aug 7, 2008 at 4:29 AM
Edited Aug 7, 2008 at 4:29 AM


In whatever theme you're using, open the file SidePanel.ascx using a simple text editor like notepad.

After the line

<% if (Page.User.Identity.IsAuthenticated)
   { %>

insert the information that comes from adsense.  In the code below, I simply named it "Advertisers"

<div class="links">
    <br />
    <uc1:menu ID="Menu1" runat="server" />
<%} %>

<div id="Advertisers" class="dbx-box widget_categories">
    <h3 class="dbx-handle">
    <div class="dbx-content">
<script type="text/javascript"><!--
google_ad_client = "pub-5825953504944796";
/* Blog 200x200, created 6/15/08 */
google_ad_slot = "4207729069";
google_ad_width = 200;
google_ad_height = 200;
<script type="text/javascript"

Of course, the code you get from google will be different and the pub-.... will be your own identifying number.

Hope this helps or at least leads you in the right direction.

Sep 22, 2008 at 8:24 PM


Thanks for your reposnse. But there is no "sidePanel.ascx" file in the Standard theme folder.

The only files are


Please check the site layout at


Bharat Mudgal

Sep 23, 2008 at 5:15 AM
yeah there is no sidePanel.ascx file in the entire solution.

in spite of i found the following line

    <div id="sidepanel">
      <blog:WidgetZone runat="server" ID="rightzone" />

by this way they are showing widget in the side panel.

even i need ad sense in my site at


Jitendra Singh
Sep 23, 2008 at 6:04 AM
I put a a piece of code after     <div id="sidepanel"> in site.master file. The result "tell a friend" widget can be seen at
however, it still looks weird without the white background like in other side panels.


Bharat Mudgal
Sep 23, 2008 at 6:46 AM
hi Bharat,

i think for the background, u need to create a seperate widget for tell a friend.
for that u just need to copy any of the existing widget and put the code that u put after <div id="sidepanel"> in site.master file.
and add that widget at run time.

i need one favour from your side, can u tell me the code u written for the "dig in, del.i...." after each post.
as before putting any of the content on my site, first i want to satisfy by my site design.


Jitendra Singh
Sep 23, 2008 at 9:01 PM
Hello Jitendra

You can find a detailed tutorial for adding the social-bookmarking at

I found how to add a widget for Tell a Friend on my blog! I feel weird to have not thought of it earlier.

Log in to your blog with your administrator account.
To the right you will see a dropDown Menu. Choose TEXTBOX.
Click on HTML icon and insert the code. Save

thats it!

Do tell me later on how your site looks like. All the best!

take care

Bharat Mudgal    
Sep 24, 2008 at 5:02 AM
Thanks a lot !!