<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Sharepoint hit counter web part</title>
	<atom:link href="http://www.fivenumber.com/sharepoint-hit-counter-web-part/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fivenumber.com/sharepoint-hit-counter-web-part/</link>
	<description>It&#039;s all about SharePoint</description>
	<lastBuildDate>Wed, 14 Jul 2010 09:03:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jusuf</title>
		<link>http://www.fivenumber.com/sharepoint-hit-counter-web-part/comment-page-2/#comment-510</link>
		<dc:creator>Jusuf</dc:creator>
		<pubDate>Wed, 14 Jul 2010 09:03:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.fivenumber.com/?p=567#comment-510</guid>
		<description>Hi Vijay,

the purpose i&#039;m willing to put the code  into the button is :
i can count, how many user will be redirect from my Sharepoint system to another url http page.
and those url http page, wasn&#039;t on sharepoint.

is there any way to check, how much user go from my sharepoint page ?</description>
		<content:encoded><![CDATA[<p>Hi Vijay,</p>
<p>the purpose i&#8217;m willing to put the code  into the button is :<br />
i can count, how many user will be redirect from my Sharepoint system to another url http page.<br />
and those url http page, wasn&#8217;t on sharepoint.</p>
<p>is there any way to check, how much user go from my sharepoint page ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carol</title>
		<link>http://www.fivenumber.com/sharepoint-hit-counter-web-part/comment-page-2/#comment-505</link>
		<dc:creator>Carol</dc:creator>
		<pubDate>Tue, 29 Jun 2010 08:03:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.fivenumber.com/?p=567#comment-505</guid>
		<description>Thank you so much for this... :)</description>
		<content:encoded><![CDATA[<p>Thank you so much for this&#8230; <img src='http://www.fivenumber.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ulrich Bernskov</title>
		<link>http://www.fivenumber.com/sharepoint-hit-counter-web-part/comment-page-2/#comment-491</link>
		<dc:creator>Ulrich Bernskov</dc:creator>
		<pubDate>Fri, 04 Jun 2010 10:17:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.fivenumber.com/?p=567#comment-491</guid>
		<description>I just realized that the failing page was in fact in http://web/subsite/subsite2/webpartpage.aspx so after creating another &quot;Statistics&quot; list in that /subsite/subsite2 it worked fine.</description>
		<content:encoded><![CDATA[<p>I just realized that the failing page was in fact in <a href="http://web/subsite/subsite2/webpartpage.aspx" rel="nofollow">http://web/subsite/subsite2/webpartpage.aspx</a> so after creating another &#8220;Statistics&#8221; list in that /subsite/subsite2 it worked fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: G Vijai Kumar</title>
		<link>http://www.fivenumber.com/sharepoint-hit-counter-web-part/comment-page-2/#comment-418</link>
		<dc:creator>G Vijai Kumar</dc:creator>
		<pubDate>Mon, 26 Apr 2010 09:42:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.fivenumber.com/?p=567#comment-418</guid>
		<description>@ Jusufjk: You can place the entire code in button eg:

        void Button_Click(object sender, EventArgs e)
        {
           //Place the entire code here what ever is in the render method
        }
But, why you want to place the hit counter code in a button, if you place the entire code in a button then how you are going to count the user hits, because if you place the entire code in a button the code will execute only when the button is click event is fired hence you cannot get the actual user hits for the pages, so I to get the actual user visit counts you have to run the code when the every time when the page gets loaded instead of in a button click, I am not sure how is your requirement, but consider this as my suggestion, let me know more clearer in case if you are looking for any thing.
Since you are unable to open the solution in VS 2005/2008, better you download a fresh copy from source code from http://hitcounter.codeplex.com/ then open visual studio 2005 &lt;strong&gt;Start &lt;/strong&gt;&gt; &lt;strong&gt;Programs &lt;/strong&gt;&gt; &lt;strong&gt;Microsoft Visual Studio 2005&lt;/strong&gt; then click on &lt;strong&gt;Microsoft Visual Studio 2005&lt;/strong&gt;
Then, click on &lt;strong&gt;File &lt;/strong&gt;&gt; &lt;strong&gt;Open &lt;/strong&gt;&gt;&lt;strong&gt; Project/Solution&lt;/strong&gt;
browse to &lt;strong&gt;HitCounter.sln&lt;/strong&gt; file select and click &lt;strong&gt;Open&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>@ Jusufjk: You can place the entire code in button eg:</p>
<p>        void Button_Click(object sender, EventArgs e)<br />
        {<br />
           //Place the entire code here what ever is in the render method<br />
        }<br />
But, why you want to place the hit counter code in a button, if you place the entire code in a button then how you are going to count the user hits, because if you place the entire code in a button the code will execute only when the button is click event is fired hence you cannot get the actual user hits for the pages, so I to get the actual user visit counts you have to run the code when the every time when the page gets loaded instead of in a button click, I am not sure how is your requirement, but consider this as my suggestion, let me know more clearer in case if you are looking for any thing.<br />
Since you are unable to open the solution in VS 2005/2008, better you download a fresh copy from source code from <a href="http://hitcounter.codeplex.com/" rel="nofollow">http://hitcounter.codeplex.com/</a> then open visual studio 2005 <strong>Start </strong>> <strong>Programs </strong>> <strong>Microsoft Visual Studio 2005</strong> then click on <strong>Microsoft Visual Studio 2005</strong><br />
Then, click on <strong>File </strong>> <strong>Open </strong>><strong> Project/Solution</strong><br />
browse to <strong>HitCounter.sln</strong> file select and click <strong>Open</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jusuf</title>
		<link>http://www.fivenumber.com/sharepoint-hit-counter-web-part/comment-page-2/#comment-409</link>
		<dc:creator>Jusuf</dc:creator>
		<pubDate>Wed, 21 Apr 2010 07:06:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.fivenumber.com/?p=567#comment-409</guid>
		<description>Hello Vijay,

i’m interested with your web part,
i have a need to create Hit Counter web Part, but it will be attached to a Button.

my needs :
in sharepoint page, i have a button.
if the button got clicked, it will be adding to a custom list,   whichis contain : currentDate (date), clickedCounter (int),
than, the button will open new IE /redirect the user to another page, eq : www.fiveNumber.com

so, from that custom list data, i can make a report :
for this month, xx user has been click the button
and also i can create a daily report.
01.01.2010 - 11 clicked
02.01.2010 - 21 clicked
.....
....

i already try to download your sharing code,
but i can not open it with VS 2005 or VS 2008. (the project type is not supported).
can you help me.. 

gladly if you want to help / give hint how to create webpart that fullfill my needs.

thanks...</description>
		<content:encoded><![CDATA[<p>Hello Vijay,</p>
<p>i’m interested with your web part,<br />
i have a need to create Hit Counter web Part, but it will be attached to a Button.</p>
<p>my needs :<br />
in sharepoint page, i have a button.<br />
if the button got clicked, it will be adding to a custom list,   whichis contain : currentDate (date), clickedCounter (int),<br />
than, the button will open new IE /redirect the user to another page, eq : <a href="http://www.fiveNumber.com" rel="nofollow">http://www.fiveNumber.com</a></p>
<p>so, from that custom list data, i can make a report :<br />
for this month, xx user has been click the button<br />
and also i can create a daily report.<br />
01.01.2010 &#8211; 11 clicked<br />
02.01.2010 &#8211; 21 clicked<br />
&#8230;..<br />
&#8230;.</p>
<p>i already try to download your sharing code,<br />
but i can not open it with VS 2005 or VS 2008. (the project type is not supported).<br />
can you help me.. </p>
<p>gladly if you want to help / give hint how to create webpart that fullfill my needs.</p>
<p>thanks&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jusuf</title>
		<link>http://www.fivenumber.com/sharepoint-hit-counter-web-part/comment-page-1/#comment-408</link>
		<dc:creator>Jusuf</dc:creator>
		<pubDate>Wed, 21 Apr 2010 06:59:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.fivenumber.com/?p=567#comment-408</guid>
		<description>Hello Vijay,

i&#039;m interested with your web part, 
i have a need to create Hit Counter web Part, but it will be attached to a Button.

my needs :
in sharepoint page, i have a button.
if the button got clicked, it will be adding to a custom list :</description>
		<content:encoded><![CDATA[<p>Hello Vijay,</p>
<p>i&#8217;m interested with your web part,<br />
i have a need to create Hit Counter web Part, but it will be attached to a Button.</p>
<p>my needs :<br />
in sharepoint page, i have a button.<br />
if the button got clicked, it will be adding to a custom list :</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ahmed Jewahar</title>
		<link>http://www.fivenumber.com/sharepoint-hit-counter-web-part/comment-page-1/#comment-380</link>
		<dc:creator>Ahmed Jewahar</dc:creator>
		<pubDate>Tue, 16 Mar 2010 06:33:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.fivenumber.com/?p=567#comment-380</guid>
		<description>I have deployed the solution as per below and also created a Statistics List with columns advised.
   stsadm -o addsolution -filename HitCounter.wsp

However,  when I try to add Hitcounter webpart to site or page, getting following error !!.  Any idea ?

Unable to add selected web part(s). The file you imported is not valid. Verify that the file is a Web Part description file (*.webpart or *.dwp) and that it contains well-formed XML.</description>
		<content:encoded><![CDATA[<p>I have deployed the solution as per below and also created a Statistics List with columns advised.<br />
   stsadm -o addsolution -filename HitCounter.wsp</p>
<p>However,  when I try to add Hitcounter webpart to site or page, getting following error !!.  Any idea ?</p>
<p>Unable to add selected web part(s). The file you imported is not valid. Verify that the file is a Web Part description file (*.webpart or *.dwp) and that it contains well-formed XML.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soumya</title>
		<link>http://www.fivenumber.com/sharepoint-hit-counter-web-part/comment-page-1/#comment-374</link>
		<dc:creator>Soumya</dc:creator>
		<pubDate>Mon, 08 Mar 2010 10:01:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.fivenumber.com/?p=567#comment-374</guid>
		<description>Thanks vijay. Thanks for yor help.</description>
		<content:encoded><![CDATA[<p>Thanks vijay. Thanks for yor help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: G Vijai Kumar</title>
		<link>http://www.fivenumber.com/sharepoint-hit-counter-web-part/comment-page-1/#comment-371</link>
		<dc:creator>G Vijai Kumar</dc:creator>
		<pubDate>Fri, 05 Mar 2010 05:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.fivenumber.com/?p=567#comment-371</guid>
		<description>@ Soumya: You can pull the list data using CAML query from Statistics list and show the details (username, url, date) as you want
Example:
&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;
                SPSite mysite = new SPSite(&quot;http://&lt;servername&gt;&quot;);
                SPWeb myweb = mysite.OpenWeb();
                SPList mylist = myweb.Lists[&quot;Statistics&quot;];
                SPQuery myquery = new SPQuery();
                myquery.Query = &quot;&lt;OrderBy&gt;&lt;FieldRef Name=&#039;url&#039; /&gt;&lt;FieldRef Name=&#039;dat&#039; /&gt;&lt;FieldRef Name=&#039;uname&#039; /&gt;&lt;/OrderBy&gt;&quot;;//your query here.....
                SPListItemCollection myitemcol = mylist.GetItems(myquery);                
                
                foreach (SPListItem li in myitemcol)
                {                                                        
                    string url = li[&quot;url&quot;].ToString();
                    string date = li[&quot;date&quot;].ToString();
                    string username=li[&quot;uname&quot;].ToString();
		}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@ Soumya: You can pull the list data using CAML query from Statistics list and show the details (username, url, date) as you want<br />
Example:</p>
<pre name="code" class="c-sharp">
                SPSite mysite = new SPSite("http://<servername>");
                SPWeb myweb = mysite.OpenWeb();
                SPList mylist = myweb.Lists["Statistics"];
                SPQuery myquery = new SPQuery();
                myquery.Query = "<orderby><fieldref Name='url' /><fieldref Name='dat' /><fieldref Name='uname' /></orderby>";//your query here.....
                SPListItemCollection myitemcol = mylist.GetItems(myquery);                

                foreach (SPListItem li in myitemcol)
                {
                    string url = li["url"].ToString();
                    string date = li["date"].ToString();
                    string username=li["uname"].ToString();
		}
</servername></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soumya</title>
		<link>http://www.fivenumber.com/sharepoint-hit-counter-web-part/comment-page-1/#comment-370</link>
		<dc:creator>Soumya</dc:creator>
		<pubDate>Thu, 04 Mar 2010 17:37:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.fivenumber.com/?p=567#comment-370</guid>
		<description>You are correct vijay ...

If I place the hit counter web part in master page it will show the count correctly (only I will get the count). But if I want to show the details (username, url, date visited), I need to create a view for the list. (Because it’s storing all the information in the list [&quot;Statistics&quot;] only.)

How can I get the information also in the same web part.

Just to make sure we both are in the same page; provided the URL I have followed http://hitcounter.codeplex.com/ . If not please provide me the correct URL. 

Very much appreciated your help.

Thanks,
Soumya</description>
		<content:encoded><![CDATA[<p>You are correct vijay &#8230;</p>
<p>If I place the hit counter web part in master page it will show the count correctly (only I will get the count). But if I want to show the details (username, url, date visited), I need to create a view for the list. (Because it’s storing all the information in the list ["Statistics"] only.)</p>
<p>How can I get the information also in the same web part.</p>
<p>Just to make sure we both are in the same page; provided the URL I have followed <a href="http://hitcounter.codeplex.com/" rel="nofollow">http://hitcounter.codeplex.com/</a> . If not please provide me the correct URL. </p>
<p>Very much appreciated your help.</p>
<p>Thanks,<br />
Soumya</p>
]]></content:encoded>
	</item>
</channel>
</rss>
