<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>M.Efe Ozer's Weblog</title>
	<atom:link href="http://mefeozer.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mefeozer.wordpress.com</link>
	<description>mostly about .Net</description>
	<lastBuildDate>Mon, 26 Oct 2009 04:47:06 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='mefeozer.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/0589000bd98ad107b0122c3222844b6e?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>M.Efe Ozer's Weblog</title>
		<link>http://mefeozer.wordpress.com</link>
	</image>
			<item>
		<title>Jquery Plugins From Malsup Dot Com</title>
		<link>http://mefeozer.wordpress.com/2009/10/05/jquery-plugins-from-malsup-dot-com/</link>
		<comments>http://mefeozer.wordpress.com/2009/10/05/jquery-plugins-from-malsup-dot-com/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 06:26:45 +0000</pubDate>
		<dc:creator>Mehmet Efe Ozer</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://mefeozer.wordpress.com/2009/10/05/jquery-plugins-from-malsup-dot-com/</guid>
		<description><![CDATA[&#160;
I really like http://malsup.com/jquery/ plugins, here will be mentioned about Jquery.Corner, Jquery.BlockUI and Jquery.cycle. They all are very good documented, developer friendly and got very good demos.
Highly recommend to look their help pages for more information, written below are very limited to compare their capacities.
Jquery.Corner
Add corners easly to your divs with given parameters
$(&#8216;#maintabs&#8217;).corner(); //basic round [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=128&subd=mefeozer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&#160;</p>
<p>I really like <a href="http://malsup.com/jquery/" target="_blank">http://malsup.com/jquery/</a> plugins, here will be mentioned about Jquery.Corner, Jquery.BlockUI and Jquery.cycle. They all are very good documented, developer friendly and got very good demos.</p>
<p>Highly recommend to look their help pages for more information, written below are very limited to compare their capacities.</p>
<p><b>Jquery.Corner</b></p>
<p>Add corners easly to your divs with given parameters</p>
<p>$(&#8216;#maintabs&#8217;).corner(); //basic round shape corners</p>
<p>Demo page shows other styles : <a href="http://malsup.com/jquery/corner/" target="_blank">http://malsup.com/jquery/corner/</a></p>
<p><b>Jquery.BlockUI</b></p>
<p>One of the famous with cycle plugin. Mainly use for blocking user interface. I also used it like loading animation. You can block all page or selected elements. Also can use for modal windows.</p>
<p>Basic use with custom message : $(#containerid).block({ message: msg });</p>
<p>For unblock : $(#containerid).unblock();</p>
<p>If you don’t like default CSS, you can override with:</p>
<p>$.blockUI.defaults.css = {};</p>
<p>With jquery’s extendable structure we can extend $.ajax too. If you aim block all user interface while ajax doing its work, with code below you can handle all of them with one time definition.</p>
<p>$(document).ready(function() {</p>
<p>$().ajaxStart($.blockUI).ajaxStop($.unblockUI);</p>
<p>});</p>
<p>Or you can start blocking in $.ajax.beforeSend and unblock in $.ajax.complete in specific ajax requests. $.ajax.complete is called regardless of if the request was successful, or not. So, for unblock $.ajax.error or $.ajax.success are other options. It is better take a look here: <a href="http://docs.jquery.com/Ajax_Events">http://docs.jquery.com/Ajax_Events</a></p>
<p><b>Jquery.Cycle</b></p>
<p>I guess most known plugin here. You probably saw it in a lot of list of plugins posts in blogs. My beginning times when I was looking for a gallery plugin, i interested more with some complete, fancy solutions than Jquery.Cycle. But after tried others for reasons like no pagination, low performance or no extensibility problems, started to write my own gallery. (My own gallery means here prepare data for cycle and some required modifications)</p>
<p>I was thinking about to put some codes, but its “options”, “tutorials”, “even more demos” pages are already great. </p>
<p align="left">Here my gallery built with cycle <a href="http://www.inaea.org/InAEAGallery.aspx">http://www.inaea.org/InAEAGallery.aspx</a> </p>
<p align="left">I mentioned about that in this post : <a href="http://mefeozer.wordpress.com/2009/10/03/new-image-gallery-work/">http://mefeozer.wordpress.com/2009/10/03/new-image-gallery-work/</a></p>
<p align="left">&#160;</p>
<p align="left">Beside these plugins I used some other authors plugins like prettyPhoto, fitted, hoverintent. I will write about them later.</p>
<p>Note : These plugins are used in non-profit educational organization website’s gallery application and no commercial profit for myself too.</p>
Posted in Asp.Net, jquery Tagged: Asp.Net, jquery <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mefeozer.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mefeozer.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mefeozer.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mefeozer.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mefeozer.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mefeozer.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mefeozer.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mefeozer.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mefeozer.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mefeozer.wordpress.com/128/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=128&subd=mefeozer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mefeozer.wordpress.com/2009/10/05/jquery-plugins-from-malsup-dot-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf30cc2f17f83ff8ca85ad89ceb93f20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mefeozer</media:title>
		</media:content>
	</item>
		<item>
		<title>New Image Gallery Work</title>
		<link>http://mefeozer.wordpress.com/2009/10/03/new-image-gallery-work/</link>
		<comments>http://mefeozer.wordpress.com/2009/10/03/new-image-gallery-work/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 00:19:49 +0000</pubDate>
		<dc:creator>Mehmet Efe Ozer</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[BlogEngineNet]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://mefeozer.wordpress.com/2009/10/03/new-image-gallery-work/</guid>
		<description><![CDATA[Finally i am completing (also still testing) gallery application. There is some visual changes can be in later days. Also more features (like error catching etc.) still in progress.
This is on a BlogEngine based website, used different master page then website general.It got it’s own page, not created by BlogEngine but inherits BlogEngine.Core.Web.Controls.BlogBasePage. User brief’s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=119&subd=mefeozer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Finally i am completing (also still testing) gallery application. There is some visual changes can be in later days. Also more features (like error catching etc.) still in progress.</p>
<p>This is on a BlogEngine based website, used different master page then website general.It got it’s own page, not created by BlogEngine but inherits BlogEngine.Core.Web.Controls.BlogBasePage. User brief’s from BlogEngine profiles, album and photo info saved in xml files.</p>
<p>When you open the page you will see user’s brief summary and their galleries. When you point on users, cursor is pointer, but not linked with another pages yet. I am working on user pages. But important part is clicked on galleries, with this way you can browse related gallery photos.</p>
<p><strong>User Gallery</strong></p>
<p><a href="http://www.inaea.org/InAEAgallery.aspx" target="_blank"><img class="alignnone size-full wp-image-123" title="UserGallery" src="http://mefeozer.files.wordpress.com/2009/10/usergallery1.jpg?w=448&#038;h=280" alt="UserGallery" width="448" height="280" /></a></p>
<p><strong>Gallery Page</strong></p>
<p><strong><a href="http://www.inaea.org/InAEAgallery.aspx" target="_blank"><img class="alignnone size-full wp-image-122" title="BrowseGallery" src="http://mefeozer.files.wordpress.com/2009/10/browsegallery1.jpg?w=448&#038;h=280" alt="BrowseGallery" width="448" height="280" /></a><br />
</strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p>I used jquery and some plugins that i will write about them later days.</p>
<p>It also accepts query strings like:</p>
<p><a title="Go to Gallery Page" href="http://www.inaea.org/inaeagallery.aspx" target="_blank">http://www.inaea.org/inaeagallery.aspx</a> =&gt;start from all user galleries</p>
<p><a title="Go to user's galleries" href="http://www.inaea.org/inaeagallery.aspx?username=sandrine" target="_blank">http://www.inaea.org/inaeagallery.aspx?username=sandrine</a> =&gt;start from specified user’s gallery list</p>
<p><a title="Go to gallery" href="http://www.inaea.org/inaeagallery.aspx?username=sandrine&amp;albumid=sandrinesartwork" target="_blank">http://www.inaea.org/inaeagallery.aspx?username=sandrine&amp;albumid=sandrinesartwork</a> =&gt;start from specified user’s specified gallery</p>
<p>If you found any bug, share any thought or ask any question feel free to comments.</p>
Posted in Asp.Net, BlogEngineNet, News Tagged: Asp.Net, BlogEngineNet, jquery, News <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mefeozer.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mefeozer.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mefeozer.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mefeozer.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mefeozer.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mefeozer.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mefeozer.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mefeozer.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mefeozer.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mefeozer.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=119&subd=mefeozer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mefeozer.wordpress.com/2009/10/03/new-image-gallery-work/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf30cc2f17f83ff8ca85ad89ceb93f20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mefeozer</media:title>
		</media:content>

		<media:content url="http://mefeozer.files.wordpress.com/2009/10/usergallery1.jpg" medium="image">
			<media:title type="html">UserGallery</media:title>
		</media:content>

		<media:content url="http://mefeozer.files.wordpress.com/2009/10/browsegallery1.jpg" medium="image">
			<media:title type="html">BrowseGallery</media:title>
		</media:content>
	</item>
		<item>
		<title>CascadingDropDown ( AjaxControlToolkit ) and PageMethods</title>
		<link>http://mefeozer.wordpress.com/2009/06/27/cascadingdropdown-ajaxcontroltoolkit-and-pagemethods/</link>
		<comments>http://mefeozer.wordpress.com/2009/06/27/cascadingdropdown-ajaxcontroltoolkit-and-pagemethods/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 20:48:29 +0000</pubDate>
		<dc:creator>Mehmet Efe Ozer</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Notes to Myself]]></category>
		<category><![CDATA[AjaxControlToolkit]]></category>

		<guid isPermaLink="false">http://mefeozer.wordpress.com/2009/06/27/cascadingdropdown-ajaxcontroltoolkit-and-pagemethods/</guid>
		<description><![CDATA[&#160;
When i looked cascading dropdowns of AjaxControlToolkit at first i confused so i gave up and wrote my own client scripts. But i found a very easy example in my code sample archive, so here it is.
What i need is 2 pagemethod for populate dropdown items and 1 ( or 2 ) for get values [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=113&subd=mefeozer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&#160;</p>
<p align="left">When i looked cascading dropdowns of <a href="http://www.asp.net/ajax/ajaxcontroltoolkit/samples/" target="_blank">AjaxControlToolkit</a> at first i confused so i gave up and wrote my own client scripts. But i found a very easy example in my code sample archive, so here it is.</p>
<p align="left">What i need is 2 pagemethod for populate dropdown items and 1 ( or 2 ) for get values from them. Values in dropdownlists are type of “CascadingDropDownNameValue” . It needs name and value.</p>
<p align="left">In client side scriptmanager “EnablePageMethods” attribute should set true. Extender codes are below :</p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400"><span style="color:blue;">&lt;</span><span style="color:#a31515;">ajaxToolkit</span><span style="color:blue;">:</span><span style="color:#a31515;">CascadingDropDown </span><span style="color:red;">runat</span><span style="color:blue;">=&quot;server&quot; </span><span style="color:red;">ID</span><span style="color:blue;">=&quot;cdd1&quot;            <br /></span><span style="color:red;">TargetControlID</span><span style="color:blue;">=&quot;ddl1&quot; </span><span style="color:red;">PromptText</span><span style="color:blue;">=&quot;Select Type&quot; </span><span style="color:red;">Category</span><span style="color:blue;">=&quot;type&quot; </span><span style="color:red;">LoadingText</span><span style="color:blue;">=&quot;[Loading]&quot;            <br />&#160;&#160;&#160; </span><span style="color:red;">ServiceMethod</span><span style="color:blue;">=&quot;GetType&quot; /&gt;            <br />&lt;</span><span style="color:#a31515;">ajaxToolkit</span><span style="color:blue;">:</span><span style="color:#a31515;">CascadingDropDown </span><span style="color:red;">runat</span><span style="color:blue;">=&quot;server&quot; </span><span style="color:red;">ID</span><span style="color:blue;">=&quot;cdd2&quot;            <br /></span><span style="color:red;">TargetControlID</span><span style="color:blue;">=&quot;ddl2&quot; </span><span style="color:red;">ParentControlID</span><span style="color:blue;">=&quot;ddl1&quot;            <br />&#160;&#160;&#160; </span><span style="color:red;">PromptText</span><span style="color:blue;">=&quot;Select Content&quot; </span><span style="color:red;">Category</span><span style="color:blue;">=&quot;content&quot;            <br />&#160;&#160;&#160; </span><span style="color:red;">LoadingText</span><span style="color:blue;">=&quot;[Loading]&quot; </span><span style="color:red;">ServiceMethod</span><span style="color:blue;">=&quot;GetContent&quot; /&gt;</span></td>
</tr>
</tbody>
</table>
<p><a href="http://mefeozer.files.wordpress.com/2009/06/start.jpg"><img style="display:inline;border-width:0;" title="start" border="0" alt="start" src="http://mefeozer.files.wordpress.com/2009/06/start_thumb.jpg?w=244&#038;h=83" width="244" height="83" /></a> </p>
<p>Attributes are describe themselves. So there are two dropdownlist (ddl1,ddl2) and two PageMethods (“GetType”,”GetContent”) needed.</p>
<p align="left">My aim is populate <a href="http://www.dotnetblogengine.net/" target="_blank">BlogengineNet</a>’s categories or posts in sub dropdownlist. “CascadingDropDownNameValue[]” is need to returned.</p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400"><span style="color:blue;">using </span>System.Web.Services; <span style="color:blue;">using </span>AjaxControlToolkit;</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<table border="1" cellspacing="0" cellpadding="2" width="478">
<tbody>
<tr>
<td valign="top" width="476">[<span style="color:#2b91af;">WebMethod</span>]           <br />&#160;&#160;&#160; [System.Web.Script.Services.<span style="color:#2b91af;">ScriptMethod</span>]           <br />&#160;&#160;&#160; <span style="color:blue;">public static</span><span style="color:#2b91af;">CascadingDropDownNameValue</span>[]           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; GetType(<span style="color:blue;">string</span>knownCategoryValues, <span style="color:blue;">string</span>category)           <br />&#160;&#160;&#160; {           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">return new</span>[] {           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">new</span><span style="color:#2b91af;">CascadingDropDownNameValue</span>(<span style="color:#a31515;">&quot;category&quot;</span>, <span style="color:#a31515;">&quot;category&quot;</span>),           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">new</span><span style="color:#2b91af;">CascadingDropDownNameValue</span>(<span style="color:#a31515;">&quot;post&quot;</span>, <span style="color:#a31515;">&quot;post&quot;</span>) };           <br />&#160;&#160;&#160;&#160;&#160; }           </p>
<p>&#160;&#160;&#160; [<span style="color:#2b91af;">WebMethod</span>]           <br />&#160;&#160;&#160; [System.Web.Script.Services.<span style="color:#2b91af;">ScriptMethod</span>]           <br />&#160;&#160;&#160; <span style="color:blue;">public static</span><span style="color:#2b91af;">CascadingDropDownNameValue</span>[]           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; GetContent(<span style="color:blue;">string</span>knownCategoryValues, <span style="color:blue;">string</span>category)           <br />&#160;&#160;&#160; {           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">if</span>(knownCategoryValues.Contains(<span style="color:#a31515;">&quot;category&quot;</span>))           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">return</span>(BlogEngine.Core.<span style="color:#2b91af;">Category</span>.Categories           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .Select(c =&gt;           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">new</span><span style="color:#2b91af;">CascadingDropDownNameValue            <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{ value = c.Id.ToString(), name = c.Title }).ToArray());           </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">else if</span>(knownCategoryValues.Contains(<span style="color:#a31515;">&quot;post&quot;</span>))           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">return</span>(BlogEngine.Core.<span style="color:#2b91af;">Post</span>.Posts           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .Select(c =&gt;           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">new</span><span style="color:#2b91af;">CascadingDropDownNameValue            <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{ value = c.Id.ToString(), name = c.Title }).ToArray());           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }           <br />&#160;&#160;&#160; }</td>
</tr>
</tbody>
</table>
<p align="left"> How values populated are below.</p>
<p align="left"><a href="http://mefeozer.files.wordpress.com/2009/06/ddl1.jpg"><img style="display:inline;border-width:0;" title="ddl1" border="0" alt="ddl1" src="http://mefeozer.files.wordpress.com/2009/06/ddl1_thumb.jpg?w=244&#038;h=83" width="244" height="83" /></a> </p>
<p> <a href="http://11011.net/software/vspaste"></a>
<p><a href="http://mefeozer.files.wordpress.com/2009/06/ddl2.jpg"><img style="display:inline;border-width:0;" title="ddl2" border="0" alt="ddl2" src="http://mefeozer.files.wordpress.com/2009/06/ddl2_thumb.jpg?w=244&#038;h=104" width="244" height="104" /></a> </p>
<p>&#160;</p>
<p>Finally, how are we going to take values? I used a client script which communicate with another pagemethod. In client side, dropdowns <em>“onchange”</em> event:</p>
<table border="1" cellspacing="0" cellpadding="2" width="491">
<tbody>
<tr>
<td valign="top" width="489">
<pre class="code"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">DropDownList </span><span style="color:red;">runat</span><span style="color:blue;">=&quot;server&quot; </span><span style="color:red;">ID</span><span style="color:blue;">=&quot;ddl1&quot;
                            </span><span style="color:red;">onchange</span><span style="color:blue;">=&quot;GetSubDDLContent(this.options[this.selectedIndex].value
                            ,this.options[this.selectedIndex].text,'1')&quot;
                                </span><span style="color:red;">Width</span><span style="color:blue;">=&quot;200&quot; /&gt;</span></pre>
<p>        <a href="http://11011.net/software/vspaste"></a></p>
</p>
<pre class="code"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">DropDownList </span><span style="color:red;">runat</span><span style="color:blue;">=&quot;server&quot; </span><span style="color:red;">ID</span><span style="color:blue;">=&quot;ddl2&quot;
</span><span style="color:red;">onchange</span><span style="color:blue;">=&quot;GetSubDDLContent(this.options[this.selectedIndex].value
,this.options[this.selectedIndex].text,'2')&quot;
    </span><span style="color:red;">Width</span><span style="color:blue;">=&quot;200&quot; /&gt;</span></pre>
</td>
</tr>
</tbody>
</table>
<p>GetSubDDLContent takes 3 params (<em>third one is non smart identifier for which dropdown sent to value</em>).</p>
<p>Client side:</p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400">
<p><span style="color:blue;">&lt;</span><span style="color:#a31515;">script</span><span style="color:red;">type</span><span style="color:blue;">=&quot;text/javascript&quot;&gt;<br />
            <br />&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160; function</span>GetSubDDLContent(id, title, controlid) { </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">var </span>param = <span style="color:blue;">new</span>Array(); </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; param[0] = id; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; param[1] = title; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; param[2] = controlid; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; PageMethods.GetSubDDLContent(param, </p>
<p>&#160;&#160;&#160;&#160; OnSubRequestComplete, OnError); </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; } </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">function </span>OnSubRequestComplete(result) { </p>
<p>//do something </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; } </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">function </span>OnError(result) { </p>
<p>&#160;&#160;&#160; //do something&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160; } </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160; <span style="color:blue;">&lt;/</span><span style="color:#a31515;">script</span><span style="color:blue;">&gt;</span></p>
</td>
</tr>
</tbody>
</table>
<p>On Server Side GetSubDDLContent pagemethod: ( return type is not important )</p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400">
<pre class="code">[<span style="color:#2b91af;">WebMethod</span>()]
    [System.Web.Script.Services.<span style="color:#2b91af;">ScriptMethod</span>()]
    <span style="color:blue;">public static </span><span style="color:#2b91af;">Boolean </span>GetSubDDLContent(<span style="color:#2b91af;">IList </span>values)
    {
        <span style="color:blue;">if </span>(values[2].ToString() == <span style="color:#a31515;">&quot;1&quot;</span>)
        {
          //first dropdown sent </pre>
<pre class="code">        }
        <span style="color:blue;">else if </span>(values[2].ToString() == <span style="color:#a31515;">&quot;2&quot;</span>)
        {
          //second dropdown sent</pre>
<pre class="code">        }
        <span style="color:blue;">return true</span>;
    }</pre>
</td>
</tr>
</tbody>
</table>
<pre class="code"><font face="Verdana">At the end cascadingdropdowns work with pagemethods…</font></pre>
Posted in Asp.Net, Notes to Myself Tagged: AjaxControlToolkit, Asp.Net <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mefeozer.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mefeozer.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mefeozer.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mefeozer.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mefeozer.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mefeozer.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mefeozer.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mefeozer.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mefeozer.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mefeozer.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=113&subd=mefeozer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mefeozer.wordpress.com/2009/06/27/cascadingdropdown-ajaxcontroltoolkit-and-pagemethods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf30cc2f17f83ff8ca85ad89ceb93f20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mefeozer</media:title>
		</media:content>

		<media:content url="http://mefeozer.files.wordpress.com/2009/06/start_thumb.jpg" medium="image">
			<media:title type="html">start</media:title>
		</media:content>

		<media:content url="http://mefeozer.files.wordpress.com/2009/06/ddl1_thumb.jpg" medium="image">
			<media:title type="html">ddl1</media:title>
		</media:content>

		<media:content url="http://mefeozer.files.wordpress.com/2009/06/ddl2_thumb.jpg" medium="image">
			<media:title type="html">ddl2</media:title>
		</media:content>
	</item>
		<item>
		<title>BlogEngine Main Menu Extension (just a post, nothing for download)</title>
		<link>http://mefeozer.wordpress.com/2009/06/04/blogengine-main-menu-extension-just-a-post-nothing-for-download/</link>
		<comments>http://mefeozer.wordpress.com/2009/06/04/blogengine-main-menu-extension-just-a-post-nothing-for-download/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 07:02:17 +0000</pubDate>
		<dc:creator>Mehmet Efe Ozer</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[BlogEngineNet]]></category>
		<category><![CDATA[Notes to Myself]]></category>
		<category><![CDATA[AjaxControlToolkit]]></category>
		<category><![CDATA[ReorderList]]></category>

		<guid isPermaLink="false">http://mefeozer.wordpress.com/2009/06/04/blogengine-main-menu-extension-just-a-post-nothing-for-download/</guid>
		<description><![CDATA[&#160;
 

Admin page of DnANavBar Extension

It was an requirement for who wants to change main menu items and its orders of website from admin panel. 
I may publish it, but it is using AjaxControlToolKit and .Net 3.5, so not for now. 
I was not so happy with ReorderList control of AjaxCT. When items reordered, update [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=101&subd=mefeozer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="left">&#160;</p>
<p align="left"><a href="http://mefeozer.files.wordpress.com/2009/06/navlinkextension.jpg"><img style="display:inline;border-width:0;" title="NavLinkExtension" border="0" alt="NavLinkExtension" src="http://mefeozer.files.wordpress.com/2009/06/navlinkextension_thumb.jpg?w=450&#038;h=409" width="450" height="409" /></a> </p>
<p align="left">
<p align="left"><em>Admin page of DnANavBar Extension</em></p>
<p align="left"><em></em></p>
<p align="left">It was an requirement for who wants to change main menu items and its orders of website from admin panel. </p>
<p align="left">I may publish it, but it is using <strong>AjaxControlToolKit and .Net 3.5,</strong> so not for now. </p>
<p align="left">I was not so happy with ReorderList control of AjaxCT. When items reordered, update method triggered without&#160; problem, but when update fields with its edit item template, i couldn’t reach the data of item except than index field. In articles people talk about parameters must match in select and update methods. Anyway, i did my updates in OnItemCommand event.</p>
<p align="left">I am thinking about to look JQuery’s drag and drop features next…</p>
<p> <a href="http://11011.net/software/vspaste"></a></p>
Posted in Asp.Net, BlogEngineNet, Notes to Myself Tagged: AjaxControlToolkit, Asp.Net, BlogEngineNet, ReorderList <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mefeozer.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mefeozer.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mefeozer.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mefeozer.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mefeozer.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mefeozer.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mefeozer.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mefeozer.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mefeozer.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mefeozer.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=101&subd=mefeozer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mefeozer.wordpress.com/2009/06/04/blogengine-main-menu-extension-just-a-post-nothing-for-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf30cc2f17f83ff8ca85ad89ceb93f20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mefeozer</media:title>
		</media:content>

		<media:content url="http://mefeozer.files.wordpress.com/2009/06/navlinkextension_thumb.jpg" medium="image">
			<media:title type="html">NavLinkExtension</media:title>
		</media:content>
	</item>
		<item>
		<title>PrettyPhoto Extension For BlogEngine.Net</title>
		<link>http://mefeozer.wordpress.com/2009/05/06/prettyphoto-extension-for-blogenginenet/</link>
		<comments>http://mefeozer.wordpress.com/2009/05/06/prettyphoto-extension-for-blogenginenet/#comments</comments>
		<pubDate>Thu, 07 May 2009 05:18:13 +0000</pubDate>
		<dc:creator>Mehmet Efe Ozer</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[BlogEngineNet]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[prettyphoto]]></category>

		<guid isPermaLink="false">http://mefeozer.wordpress.com/2009/05/06/prettyphoto-extension-for-blogenginenet/</guid>
		<description><![CDATA[&#160;
I was using Lightbox2 for displaying pictures of posts in a BlogengineNet based website InAEA , but with jquery implementation plans, i decided to use jquery all over the website and found similar Lightbox2 script : PrettyPhoto .
I made little changes on Lightbox2 extension and done. My client websites low traffic and it works well [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=89&subd=mefeozer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&#160;</p>
<p>I was using <a href="http://www.huddletogether.com/projects/lightbox2/" target="_blank">Lightbox2</a> for displaying pictures of posts in a <a href="http://www.dotnetblogengine.net/" target="_blank">BlogengineNet</a> based website <a href="http://www.inaea.org/" target="_blank">InAEA</a> , but with jquery implementation plans, i decided to use jquery all over the website and found similar Lightbox2 script : <a href="http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/" target="_blank">PrettyPhoto</a> .</p>
<p>I made little changes on Lightbox2 extension and done. My client websites low traffic and it works well for now. But some code parts can better, for example “Item_Serving” function. I don’t know could cause performance problem or not.</p>
<p>&#160;</p>
<p><a href="http://www.inaea.org/post.aspx?id=c037e6a2-c881-4fb3-ae45-d17b8f2ce58e" target="_blank"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="prettyphoto" border="0" alt="prettyphoto" src="http://mefeozer.files.wordpress.com/2009/06/prettyphoto1.jpg?w=427&#038;h=309" width="427" height="309" /></a> </p>
<p>&#160;</p>
<p><strong>Some Notes:</strong></p>
<ul>
<li>This extension works with PrettyPhoto Version <strong>2.2.7</strong> </li>
<li><strong>JQuery required.</strong> “jquery-1.3.2.min.js” which i used jquery script, (but i didnt add with this extension, you can find an another extension about add jquery to blogengine, don’t want to my own extension before try with another jquery applications.) </li>
<li>Placed prettyphoto.cs to “app_code/extensions” and “prettyphoto” folder to root. ( wrote in readme.txt ) </li>
<li>I just hardcode default path for folder as; </li>
</ul>
<p>private const string defaultPath = &quot;prettyPhoto&quot;;</p>
<ul>
<li>prettyPhoto.css is not gzipped. </li>
<li>Please look <a href="http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/" target="_blank">PrettyPhoto</a> website to how to use, </li>
</ul>
<p>actually easy that you need to add rel tag to images like</p>
<p>for single photos =&gt; rel=”prettyphoto”</p>
<p>for photos as gallery&#160; =&gt; rel=”prettyphoto[ galleryname ]” (without spaces)</p>
<p><a href="http://cid-199a978d9e2da6b8.skydrive.live.com/self.aspx/Ortak/prettyphoto1.0.zip" target="_blank">DOWNLOAD prettyPhotoExtension</a></p>
<p>Please write comment for any problem or suggestions…</p>
Posted in Asp.Net, BlogEngineNet Tagged: BlogEngineNet, extension, jquery, prettyphoto <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mefeozer.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mefeozer.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mefeozer.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mefeozer.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mefeozer.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mefeozer.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mefeozer.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mefeozer.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mefeozer.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mefeozer.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=89&subd=mefeozer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mefeozer.wordpress.com/2009/05/06/prettyphoto-extension-for-blogenginenet/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf30cc2f17f83ff8ca85ad89ceb93f20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mefeozer</media:title>
		</media:content>

		<media:content url="http://mefeozer.files.wordpress.com/2009/06/prettyphoto1.jpg" medium="image">
			<media:title type="html">prettyphoto</media:title>
		</media:content>
	</item>
		<item>
		<title>Linq and Group By Multiple Columns</title>
		<link>http://mefeozer.wordpress.com/2009/04/09/linq-and-group-by-multiple-columns/</link>
		<comments>http://mefeozer.wordpress.com/2009/04/09/linq-and-group-by-multiple-columns/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 20:08:05 +0000</pubDate>
		<dc:creator>Mehmet Efe Ozer</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Notes to Myself]]></category>
		<category><![CDATA[Linq]]></category>

		<guid isPermaLink="false">http://mefeozer.wordpress.com/2009/04/09/linq-and-group-by-multiple-columns/</guid>
		<description><![CDATA[It is typical master detail group by query.
We have data as List&#60;T&#62; which it contains master and detail columns (“SentData” in query).
Our master and detail classes:




public class Master
    {
        public string MasterID { get; set; }
        public string [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=82&subd=mefeozer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It is typical master detail group by query.</p>
<p>We have data as List&lt;T&gt; which it contains master and detail columns (“SentData” in query).</p>
<p>Our master and detail classes:</p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td width="400" valign="top">
<pre class="code"><span style="color:blue;">public class </span><span style="color:#2b91af;">Master
    </span>{
        <span style="color:blue;">public string </span>MasterID { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
        <span style="color:blue;">public string </span>MasterDisplayValue{ <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
        <span style="color:blue;">public </span><span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">Detail</span>&gt; Details { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
    }</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="color:blue;">public class </span><span style="color:#2b91af;">Detail
    </span>{
        <span style="color:blue;">public string </span>Detail1 { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
        <span style="color:blue;">public string </span>Detail2 { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
        <span style="color:blue;">public string </span>Detail3 { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
    }</pre>
</td>
</tr>
</tbody>
</table>
<p>We define columns for grouping with anonymous type;</p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td width="400" valign="top">
<pre class="code"><span style="color:blue;">var </span>result = SentData.GroupBy(g=&gt;
                <span style="color:blue;">new </span>{OwnerID=g.AlbumOwner,OwnerDisplay=g.AlbumOwnerDisplayName })
                .Select(resultgroup =&gt;
                    <span style="color:blue;">new </span><span style="color:#2b91af;">Master
                               </span>{
                                   MasterID = resultgroup.Key.OwnerID
                                   ,MasterDisplayValue = resultgroup.Key.OwnerDisplay
                                   ,Details = (resultgroup.Select(d =&gt; <span style="color:blue;">new </span><span style="color:#2b91af;">Detail
                                   </span>{
                                        Detail1 = d.Caption
                                       ,Detail2 = d.Description
                                       ,Detail3 = d.Count.ToString()
                                   }).ToList())
                               }).ToList();</pre>
</td>
</tr>
</tbody>
</table>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p><a href="http://11011.net/software/vspaste"> </a></p>
Posted in .Net, C#, Notes to Myself Tagged: C#, Linq <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mefeozer.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mefeozer.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mefeozer.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mefeozer.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mefeozer.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mefeozer.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mefeozer.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mefeozer.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mefeozer.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mefeozer.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=82&subd=mefeozer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mefeozer.wordpress.com/2009/04/09/linq-and-group-by-multiple-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf30cc2f17f83ff8ca85ad89ceb93f20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mefeozer</media:title>
		</media:content>
	</item>
		<item>
		<title>Asp.Net CacheDependency and its Callbacks</title>
		<link>http://mefeozer.wordpress.com/2009/04/01/aspnet-cachedependency-and-its-callbacks/</link>
		<comments>http://mefeozer.wordpress.com/2009/04/01/aspnet-cachedependency-and-its-callbacks/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 05:14:17 +0000</pubDate>
		<dc:creator>Mehmet Efe Ozer</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[cachedependency]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://mefeozer.wordpress.com/2009/04/01/aspnet-cachedependency-and-its-callbacks/</guid>
		<description><![CDATA[&#160;
I am working on a little bit complicated work to reach some information from Second Life.&#160; I need to use a library to do my requests, process them with my classes and need to present on an asp.net website. I will write something about it later.
Just before presentation layer, last callback needed for informed all [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=78&subd=mefeozer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&#160;</p>
<p>I am working on a little bit complicated work to reach some information from Second Life.&#160; I need to use a library to do my requests, process them with my classes and need to present on an asp.net website. I will write something about it later.</p>
<p>Just before presentation layer, last callback needed for informed all requested data saved on a xml file. So find a way to track this file is one of the way to handle this problem. </p>
<p>So i decided use cache dependency and CacheItemRemovedCallback. </p>
<p>With cache dependency you create a dependency on a file, on a folder or cached item or items. When your item or items is changed, your dependent item removed from cache. </p>
<p>And it provides two callback that you can catch your item before removed ( CacheItemUpdateCallback ) or after removed( CacheItemRemovedCallback ) from cache.</p>
<p>An important point that these callbacks work with first change on tracked item.So you need to finish your own jobs on your file before creating dependency.&#160; But it gives some options like start to track after definite time past. You need to take a look its overloads.</p>
<p>In my scenario after i reached my data i save it as xml file. File needs to be there so i will create if not. I send a key value pair that i can use in callback for example to understand what is changed in my data file and what was my datafilepath. Xml file creation part is depends on your needs, i just add a root node and an attribute. 20 minute set here for expiration.</p>
<p><span style="color:blue;">private void </span>SetDependency(<span style="color:blue;">string</span>datafilepath)     <br />&#160;&#160;&#160; {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:#2b91af;">XDocument </span>dataxml = <span style="color:blue;">new</span><span style="color:#2b91af;">XDocument</span>();     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">if</span>(!System.IO.<span style="color:#2b91af;">File</span>.Exists(datafilepath))     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataxml.Declaration     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = <span style="color:blue;">new</span><span style="color:#2b91af;">XDeclaration</span>(<span style="color:#a31515;">&quot;1.0&quot;</span>, <span style="color:#a31515;">&quot;utf-8&quot;</span>, <span style="color:#a31515;">&quot;&quot;</span>);     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataxml.Add(<span style="color:blue;">new</span><span style="color:#2b91af;">XElement</span>(<span style="color:#a31515;">&quot;rootnode&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>, <span style="color:blue;">new</span><span style="color:#2b91af;">XAttribute</span>(<span style="color:#a31515;">&quot;rootnodeattr&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>, <span style="color:#2b91af;">DateTime</span>.Now.ToString())));     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataxml.Save(datafilepath);     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:blue;">else      <br />&#160;&#160;&#160;&#160;&#160;&#160; </span>{     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataxml= <span style="color:#2b91af;">XDocument</span>.Load(datafilepath);     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color:#2b91af;">CacheDependency </span>dep = <span style="color:blue;">new</span><span style="color:#2b91af;">CacheDependency</span>(datafilepath);     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Cache.Insert(<span style="color:#a31515;">&quot;keyforitem&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>, new <span style="color:#2b91af;">KeyValuePair</span>&lt;<span style="color:blue;">string</span>, <span style="color:#2b91af;">XDocument</span>&gt;(datafilepath, dataxml)     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; , dep     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; , <span style="color:#2b91af;">DateTime</span>.Now.AddMinutes(20)     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; , <span style="color:#2b91af;">TimeSpan</span>.Zero     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; , <span style="color:#2b91af;">CacheItemPriority</span>.High     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; , <span style="color:blue;">new</span><span style="color:#2b91af;">CacheItemRemovedCallback</span>(ItemRemovedCallback));     <br />&#160;&#160;&#160; }</p>
<p> <a href="http://11011.net/software/vspaste"></a>
<p>Cachedependency item put in cache with key “keyforitem”, set its value as an keyvaluepair, set 20 mins expiration time. I didn’t try other priority options like “noremove” or else here. (When server resources full server removed items from cache with theirs priority orders.) And finally we assign ItemRemovedCallback.</p>
<p>In my sample i don’t need to use CacheItemUpdateCallback.</p>
<p>Here is <span style="color:#2b91af;">CacheItemRemovedCallback</span></p>
<pre class="code"><span style="color:blue;">private void </span>ItemRemovedCallback(<span style="color:blue;">string </span>key
        , <span style="color:blue;">object </span>prevalue, <span style="color:#2b91af;">CacheItemRemovedReason </span>reason)
    {
        <span style="color:blue;">switch </span>(reason)
        {
            <span style="color:blue;">case </span><span style="color:#2b91af;">CacheItemRemovedReason</span>.DependencyChanged:
                {</pre>
<pre class="code">//my jobs here
                  <span style="color:blue;">break</span>;
                }
        }
    }</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p align="left">Dependency Item could be removed from cache by different reasons. Cache priority can be an answer if item removed by memory problems. This sample works on low traffic website so i didn’t faced with problems, also only person is me who change file here. </p>
<p align="left">At the end, if reason is dependencychanged means in this conditions process works ok.</p>
Posted in Asp.Net, C# Tagged: Asp.Net, C#, cachedependency, XML <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mefeozer.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mefeozer.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mefeozer.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mefeozer.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mefeozer.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mefeozer.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mefeozer.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mefeozer.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mefeozer.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mefeozer.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=78&subd=mefeozer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mefeozer.wordpress.com/2009/04/01/aspnet-cachedependency-and-its-callbacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf30cc2f17f83ff8ca85ad89ceb93f20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mefeozer</media:title>
		</media:content>
	</item>
		<item>
		<title>Create Data File for SlideShow2 From Picasa Web Albums</title>
		<link>http://mefeozer.wordpress.com/2009/03/10/create-data-file-for-slideshow2-from-picasa-web-albums/</link>
		<comments>http://mefeozer.wordpress.com/2009/03/10/create-data-file-for-slideshow2-from-picasa-web-albums/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 00:56:33 +0000</pubDate>
		<dc:creator>Mehmet Efe Ozer</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[BlogEngineNet]]></category>
		<category><![CDATA[Code Stuff]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[Vb.Net]]></category>
		<category><![CDATA[XLinq]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://mefeozer.wordpress.com/2009/03/10/create-data-file-for-slideshow2-from-picasa-web-albums/</guid>
		<description><![CDATA[I was using SlideShow extension of Danny Douglas. I installed, changed it into xml data provider and used with local photo files.  But after start to thinking about membership system, necessity occurred  uploading and crud operations on albums. Even i coded some management features for local data and photo files. But storage of files,web traffic [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=73&subd=mefeozer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was using SlideShow extension of <a href="http://www.dannydouglass.com/post/2008/02/07/New-BlogEngine-Extension-SlideShow-Photo-Gallery.aspx" target="_blank">Danny Douglas</a>. I installed, changed it into xml data provider and used with local photo files.  But after start to thinking about membership system, necessity occurred  uploading and crud operations on albums. Even i coded some management features for local data and photo files. But storage of files,web traffic and one developer dependant management system were other issues that make me stop. So first i start to use Flickr Api. It gives options what i want to do, but for current project i start to work on <a href="http://code.google.com/apis/picasaweb/developers_guide_dotnet.html" target="_blank">Picasa Web Albums Data API</a>.</p>
<p>For BlogEngine application that i modified i tried first <a href="http://rtur.net/blog/post/2009/01/15/Picasa-for-BlogEngine.aspx" target="_blank">Rtur.Net’s Picasa Extension.</a></p>
<p>When you login with your email as in extension’s admin panel you are authenticate to do CRUD options on your albums. But also i was looking for something without login (so no CRUD ) and show it in SlideShow2 which also support Flickr and xml data files.</p>
<p>I like <a href="http://www.codeplex.com/SlideShow2" target="_blank">SlideShow2</a> because customization is so easy in its project structure.</p>
<p>I saw some works for Picasa data provider on project discussions. But this time for some reasons i want to use XML data file for show photos.</p>
<p>So long story short what i did is below. It is based on read Picasa feeds with Google.GData methods and create a xml file with XLinq. I didn’t filter any album or photo, but you can do with using  XLinq.</p>
<p>We need Google.GData.Apps, Google.GData.Client, Google.GData.Extensions, Google.GData.Photos</p>
<p>from here : <a title="http://code.google.com/p/google-gdata/downloads/list" href="http://code.google.com/p/google-gdata/downloads/list">http://code.google.com/p/google-gdata/downloads/list</a></p>
<table border="1" cellspacing="0" cellpadding="2" width="680">
<tbody>
<tr>
<td width="678" valign="top">
<pre class="code"><span style="color:blue;">Public Shared Sub </span>CreatePicasaSlideShowData()</pre>
<pre class="code"><span style="color:blue;">
        Dim </span>service <span style="color:blue;">As </span>PicasaService = <span style="color:blue;">New </span>PicasaService(<span style="color:#a31515;">"myapplicationname"</span>)

        <span style="color:blue;">dim</span><span style="color:blue;"> </span>PicasaUserID as string = <span style="color:#a31515;">"mypicasauserid"

        </span><span style="color:blue;">Dim </span>query <span style="color:blue;">As </span>AlbumQuery = <span style="color:blue;">New </span>AlbumQuery(PicasaQuery.CreatePicasaUri(PicasaUserID))
        <span style="color:blue;">Dim </span>albumfeed <span style="color:blue;">As </span>PicasaFeed = service.Query(query)

        <span style="color:blue;">Dim </span>xdoc <span style="color:blue;">As New </span>XDocument

        xdoc.Declaration = <span style="color:blue;">New </span>XDeclaration(<span style="color:#a31515;">"1.0"</span>, <span style="color:#a31515;">"utf-8"</span>, <span style="color:#a31515;">""</span>)
        xdoc.Add(<span style="color:#6464b9;">&lt;</span><span style="color:#844646;">data </span><span style="color:#b96464;">startalbumindex</span><span style="color:#6464b9;">=</span><span style="color:#555555;">"</span><span style="color:#6464b9;">0</span><span style="color:#555555;">" t</span><span style="color:#b96464;">ransition</span><span style="color:#6464b9;">=</span><span style="color:#555555;">"</span><span style="color:#6464b9;">CrossFadeTransition</span><span style="color:#555555;">"</span><span style="color:#6464b9;">&gt;&lt;/</span><span style="color:#844646;">data</span><span style="color:#6464b9;">&gt;</span>)

        xdoc.Element(<span style="color:#a31515;">"data"</span>).Add(<span style="color:blue;">From </span>albumentry <span style="color:blue;">In </span>albumfeed.Entries _
         <span style="color:blue;">Let </span>albumAccessor <span style="color:blue;">As </span>AlbumAccessor = <span style="color:blue;">New </span>AlbumAccessor(<span style="color:blue;">CType</span>(albumentry, PicasaEntry)) _
         <span style="color:blue;">Let </span>photoquery <span style="color:blue;">As </span>PhotoQuery = <span style="color:blue;">New </span>PhotoQuery(PicasaQuery.CreatePicasaUri(PicasaUserID, albumAccessor.Id)) _
         <span style="color:blue;">Let </span>photofeed <span style="color:blue;">As </span>PicasaFeed = service.Query(photoquery) _
             <span style="color:blue;">Select New </span>XElement(<span style="color:#a31515;">"album" </span>_
                , <span style="color:blue;">New </span>XAttribute(<span style="color:#a31515;">"title"</span>, albumAccessor.AlbumTitle) _
                , <span style="color:blue;">New </span>XAttribute(<span style="color:#a31515;">"description"</span>, albumAccessor.AlbumSummary) _
                , <span style="color:blue;">New </span>XAttribute(<span style="color:#a31515;">"source"</span>, <span style="color:blue;">CType</span>(albumentry, PicasaEntry).Media.Thumbnails(0).Attributes(<span style="color:#a31515;">"url"</span>)) _
                , <span style="color:blue;">New </span>XAttribute(<span style="color:#a31515;">"transition"</span>, <span style="color:#a31515;">"CrossFadeTransition"</span>) _
                    , <span style="color:blue;">From </span>photoentry <span style="color:blue;">In </span>photofeed.Entries _
           <span style="color:blue;">Let </span>photoAccessor <span style="color:blue;">As </span>PhotoAccessor = <span style="color:blue;">New </span>PhotoAccessor(<span style="color:blue;">CType</span>(photoentry, PicasaEntry)) _
                        <span style="color:blue;">Let </span>photoe <span style="color:blue;">As </span>PicasaEntry = <span style="color:blue;">CType</span>(photoentry, PicasaEntry) _
                    <span style="color:blue;">Select New </span>XElement(<span style="color:#a31515;">"slide" </span>_
                        , <span style="color:blue;">New </span>XAttribute(<span style="color:#a31515;">"title"</span>, photoAccessor.PhotoTitle) _
                        , <span style="color:blue;">New </span>XAttribute(<span style="color:#a31515;">"description"</span>, photoAccessor.PhotoSummary) _
                        , <span style="color:blue;">New </span>XAttribute(<span style="color:#a31515;">"source"</span>, photoe.Content.AbsoluteUri) _
                      , <span style="color:blue;">New </span>XAttribute(<span style="color:#a31515;">"thumbnail"</span>, photoe.Media.Thumbnails(1).Attributes(<span style="color:#a31515;">"url"</span>)) _
                      , <span style="color:blue;">New </span>XAttribute(<span style="color:#a31515;">"link"</span>, <span style="color:blue;">String</span>.Empty) _
                      , <span style="color:blue;">New </span>XAttribute(<span style="color:#a31515;">"datetaken"</span>, photoe.Updated.ToShortDateString))))

        xdoc.Save(<span style="color:#a31515;">"mydata.xml"</span>)</pre>
<pre class="code"><span style="color:blue;">End Sub</span></pre>
</td>
</tr>
</tbody>
</table>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>You can change thumbnail formats, add “link” for pictures ( i left empty), and find a sensible date field from feed for “datetaken” field or change transition type.</p>
<pre class="code"></pre>
Posted in .Net, BlogEngineNet, Code Stuff Tagged: .Net, BlogEngineNet, Code Snippet, Vb.Net, XLinq, XML <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mefeozer.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mefeozer.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mefeozer.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mefeozer.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mefeozer.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mefeozer.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mefeozer.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mefeozer.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mefeozer.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mefeozer.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=73&subd=mefeozer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mefeozer.wordpress.com/2009/03/10/create-data-file-for-slideshow2-from-picasa-web-albums/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf30cc2f17f83ff8ca85ad89ceb93f20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mefeozer</media:title>
		</media:content>
	</item>
		<item>
		<title>GateKeeper on BlogEngineNet</title>
		<link>http://mefeozer.wordpress.com/2009/02/27/gatekeeper-on-blogenginenet/</link>
		<comments>http://mefeozer.wordpress.com/2009/02/27/gatekeeper-on-blogenginenet/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 05:37:22 +0000</pubDate>
		<dc:creator>Mehmet Efe Ozer</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[BlogEngineNet]]></category>
		<category><![CDATA[Virtual Earth]]></category>

		<guid isPermaLink="false">http://mefeozer.wordpress.com/2009/02/27/gatekeeper-on-blogenginenet/</guid>
		<description><![CDATA[I was complaining about spiders and crawler entries on my visitor map. It is not only matter of visitor accuracy but also they using traffic. I wrote a http module for blocking some ip numbers which tried my registration page also. But all my works about unwanted visitors were lack of management.
Now I am using GateKeeper of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=67&subd=mefeozer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><blockquote><p>I was complaining about spiders and crawler entries on my visitor map. It is not only matter of visitor accuracy but also they using traffic. I wrote a http module for blocking some ip numbers which tried my registration page also. But all my works about unwanted visitors were lack of management.</p>
<p>Now I am using <a href="http://gatekeeper.codeplex.com/" target="_blank">GateKeeper</a> of <a href="http://www.dscoduc.com/post/2009/01/12/GateKeeper-v10-Released.aspx" target="_blank">Chris Blankenship</a> and it is working good for me. Has easy implementation and very good admin panel. When i checked honeypot violation&#8217;s ip numbers, i found diffrent spider locations than i’ve already know before.</p>
<p>I allowed some known user agents. They are storing in a xml file, so i still could prevent their entires from my visitor map. I added a little extra check to my codes like this :</p>
<p>Add a function to my visitor tracking class that returns ip number is known spider or not:</p>
<pre class="code"><span style="color:blue;">Public Shared Function </span>IsAllowedSpider(<span style="color:blue;">ByVal </span>ip <span style="color:blue;">As String</span>) <span style="color:blue;">As Boolean

        Return </span>XDocument.Load(AllowedSpiderListDataFilePath) _
        .Descendants.Elements(<span style="color:#a31515;">"ipaddress"</span>).Elements(<span style="color:#a31515;">"entry"</span>) _
        .Where(<span style="color:blue;">Function</span>(f) f.Attribute(<span style="color:#a31515;">"ipaddress"</span>).Value = ip).Count &gt; 0

        <span style="color:blue;">Return False
End Function</span></pre>
<p><span style="color:blue;"><span style="color:#777777;">I still suspicious about visitors from some cities but i eliminated a lot.  By the way map is <a href="http://www.inaea.org/other/visitorcities.aspx" target="_blank">here</a> (little patience for loading map <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ). </span></span></p></blockquote>
Posted in Asp.Net, BlogEngineNet Tagged: Asp.Net, BlogEngineNet, Virtual Earth <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mefeozer.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mefeozer.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mefeozer.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mefeozer.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mefeozer.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mefeozer.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mefeozer.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mefeozer.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mefeozer.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mefeozer.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=67&subd=mefeozer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mefeozer.wordpress.com/2009/02/27/gatekeeper-on-blogenginenet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf30cc2f17f83ff8ca85ad89ceb93f20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mefeozer</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple Works on GeoRSS with XLinq</title>
		<link>http://mefeozer.wordpress.com/2008/12/13/simple-works-on-georss-with-xlinq/</link>
		<comments>http://mefeozer.wordpress.com/2008/12/13/simple-works-on-georss-with-xlinq/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 14:54:12 +0000</pubDate>
		<dc:creator>Mehmet Efe Ozer</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Code Stuff]]></category>
		<category><![CDATA[Notes to Myself]]></category>
		<category><![CDATA[GeoRSS]]></category>
		<category><![CDATA[Vb.Net]]></category>
		<category><![CDATA[XLinq]]></category>

		<guid isPermaLink="false">http://mefeozer.wordpress.com/2008/12/13/simple-works-on-georss-with-xlinq/</guid>
		<description><![CDATA[Note to myself
What is written here is not optimized and not ensure security
This is what i did for my visitor map georss format xml file.
a sample node of my georss:



&#60;?xml version=”1.0″ encoding=”utf-8″?&#62;
&#60;rss xmlns:geo=”http://www.w3.org/2003/01/geo/wgs84_pos#”&#62;
&#60;channel&#62;
&#60;title&#62;Locations&#60;/title&#62;
&#60;link&#62;&#60;/link&#62;
&#60;item&#62;
&#60;title&#62;Hudson, OH UNITED STATES&#60;/title&#62;
&#60;city&#62;Hudson&#60;/city&#62;
&#60;country&#62;UNITED STATES&#60;/country&#62;
&#60;description&#62;10 Visits&#60;/description&#62;
&#60;geo:long&#62;-81.4512&#60;/geo:long&#62;
&#60;geo:lat&#62;41.2447&#60;/geo:lat&#62;
&#60;visitorcount&#62;10&#60;/visitorcount&#62;
&#60;/item&#62;
&#60;/channel&#62;
&#60;/rss&#62;



usings:




Imports System.Collections
Imports System.Linq
Imports System.Xml.Linq
'we need it for using :&#60;geo:long&#62;&#60;/geo:long&#62; &#60;geo:lat&#62;&#60;/geo:lat&#62; 
Imports &#60;xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"&#62;









'where is my xml file
   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=44&subd=mefeozer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Note to myself</p>
<p>What is written here is not optimized and not ensure security</p>
<p>This is what i did for <a href="http://www.inaea.org/other/visitorcities.aspx" target="_blank">my visitor map</a> georss format xml file.</p>
<p><strong>a sample node of my georss:</strong></p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td width="400" valign="top">&lt;?xml version=”1.0″ encoding=”utf-8″?&gt;<br />
&lt;rss xmlns:geo=”<a href="http://www.w3.org/2003/01/geo/wgs84_pos#&quot;">http://www.w3.org/2003/01/geo/wgs84_pos#”</a>&gt;<br />
&lt;channel&gt;<br />
&lt;title&gt;Locations&lt;/title&gt;<br />
&lt;link&gt;&lt;/link&gt;<br />
&lt;item&gt;<br />
&lt;title&gt;Hudson, OH UNITED STATES&lt;/title&gt;<br />
&lt;city&gt;Hudson&lt;/city&gt;<br />
&lt;country&gt;UNITED STATES&lt;/country&gt;<br />
&lt;description&gt;10 Visits&lt;/description&gt;<br />
&lt;geo:long&gt;-81.4512&lt;/geo:long&gt;<br />
&lt;geo:lat&gt;41.2447&lt;/geo:lat&gt;<br />
&lt;visitorcount&gt;10&lt;/visitorcount&gt;<br />
&lt;/item&gt;</p>
<p>&lt;/channel&gt;<br />
&lt;/rss&gt;</td>
</tr>
</tbody>
</table>
<p><strong>usings:</strong></p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td width="400" valign="top">
<pre class="code"><span style="color:blue;">Imports </span>System.Collections
<span style="color:blue;">Imports </span>System.Linq
<span style="color:blue;">Imports </span>System.Xml.Linq</pre>
<pre class="code">'we need it for using :<span style="color:#6464b9;">&lt;</span><span style="color:#844646;">geo:long</span><span style="color:#6464b9;">&gt;</span><span style="color:#6464b9;">&lt;/</span><span style="color:#844646;">geo:long</span><span style="color:#6464b9;">&gt; </span><span style="color:#6464b9;">&lt;</span><span style="color:#844646;">geo:lat</span><span style="color:#6464b9;">&gt;</span><span style="color:#6464b9;">&lt;/</span><span style="color:#844646;">geo:lat</span><span style="color:#6464b9;">&gt; </span>
<span style="color:blue;">Imports </span><span style="color:#6464b9;">&lt;</span><span style="color:#b96464;">xmlns:geo</span><span style="color:#6464b9;">=</span><span style="color:#555555;">"</span><span style="color:#6464b9;"><a href="http://www.w3.org/2003/01/geo/wgs84_pos#&quot;&gt;">http://www.w3.org/2003/01/geo/wgs84_pos#</a></span><span style="color:#555555;"><a href="http://www.w3.org/2003/01/geo/wgs84_pos#&quot;&gt;">"</a></span><span style="color:#6464b9;"><a href="http://www.w3.org/2003/01/geo/wgs84_pos#&quot;&gt;">&gt;
</a></span></pre>
</td>
</tr>
</tbody>
</table>
<table border="1" cellspacing="0" cellpadding="2" width="464">
<tbody>
<tr>
<td width="462" valign="top">
<pre class="code">'where is my xml file
    <span style="color:blue;">Public Shared </span>VisitorDataPathURL <span style="color:blue;">As String</span></pre>
<pre class="code"><span style="color:blue;">'class that store some info
    Public Class </span>UserIpInfo

<span style="color:blue;">        Public Property </span>IPAddress() <span style="color:blue;">As String</span><span style="color:blue;">...</span><span style="color:blue;">End Property</span><span style="color:blue;">
        Public Property </span>Location() <span style="color:blue;">As String...</span><span style="color:blue;">End Property</span><span style="color:blue;">
        Public Property </span>Longitude() <span style="color:blue;">As Double...</span><span style="color:blue;">End Property</span><span style="color:blue;">
        Public Property </span>Latitude() <span style="color:blue;">As Double...</span><span style="color:blue;">End Property</span><span style="color:blue;">
        Public Property </span>Country() <span style="color:blue;">As String...</span><span style="color:blue;">End Property
</span><span style="color:blue;">        Public Property </span>City() <span style="color:blue;">As String...</span><span style="color:blue;">End Property
</span></pre>
<pre class="code"><span style="color:blue;">'constructors
        Public Sub New</span>(<span style="color:blue;">ByVal </span>iPAddress <span style="color:blue;">As String</span>, _
                       <span style="color:blue;">ByVal </span>location <span style="color:blue;">As String</span>, _
                       <span style="color:blue;">ByVal </span>cityname <span style="color:blue;">As String</span>, _
                       <span style="color:blue;">ByVal </span>countryname <span style="color:blue;">As String</span>, _
                       <span style="color:blue;">ByVal </span>lon <span style="color:blue;">As Double</span>, _
                       <span style="color:blue;">ByVal </span>lat <span style="color:blue;">As Double</span></pre>
<pre class="code"><span style="color:blue;">...</span></pre>
<pre class="code">        <span style="color:blue;">End Sub

        Public Sub New</span>()
        <span style="color:blue;">End Sub

    End Class</span></pre>
</td>
</tr>
</tbody>
</table>
<p>we provide some info from our application and here are <strong>methods :</strong></p>
<table border="1" cellspacing="0" cellpadding="2" width="703">
<tbody>
<tr>
<td width="701" valign="top">
<pre class="code"><span style="color:blue;">Public Shared Sub </span>DoVisitorWork(<span style="color:blue;">ByVal </span>uinfo <span style="color:blue;">As </span>UserIpInfo)</pre>
<pre class="code">'look for city if already exists</pre>
<pre class="code"><span style="color:blue;">            Dim </span>xdoc <span style="color:blue;">As </span>XDocument = XDocument.Load(VisitorDataPathURL)
           <span style="color:blue;">Dim </span>searched <span style="color:blue;">As </span>XElement = (<span style="color:blue;">From </span>xel <span style="color:blue;">As </span>XElement <span style="color:blue;">In </span>xdoc.Descendants.Elements(<span style="color:#a31515;">"item"</span>) _
                                  <span style="color:blue;">Where </span>xel.Element(<span style="color:#a31515;">"city"</span>).Value.ToString.Trim.ToLowerInvariant _
                                    = uinfo.City.Trim.ToLowerInvariant _
                                     <span style="color:blue;">Select </span>xel).FirstOrDefault</pre>
<pre class="code">'if city is new , new xelement creating by vb.net xml literal
            <span style="color:blue;">If </span>searched <span style="color:blue;">Is Nothing Then
                </span>searched = _
                <span style="color:#6464b9;">&lt;</span><span style="color:#844646;">item</span><span style="color:#6464b9;">&gt;
                    &lt;</span><span style="color:#844646;">title</span><span style="color:#6464b9;">&gt;</span><span style="background:#fffebf;color:#555555;">&lt;%=</span> uinfo.Location <span style="background:#fffebf;color:#555555;">%&gt;</span><span style="color:#6464b9;">&lt;/</span><span style="color:#844646;">title</span><span style="color:#6464b9;">&gt;
                    &lt;</span><span style="color:#844646;">description</span><span style="color:#6464b9;">&gt;</span><span style="background:#fffebf;color:#555555;">&lt;%=</span> uinfo.Location <span style="background:#fffebf;color:#555555;">%&gt;</span><span style="color:#6464b9;">&lt;/</span><span style="color:#844646;">description</span><span style="color:#6464b9;">&gt;
                    &lt;</span><span style="color:#844646;">city</span><span style="color:#6464b9;">&gt;</span><span style="background:#fffebf;color:#555555;">&lt;%=</span> uinfo.City <span style="background:#fffebf;color:#555555;">%&gt;</span><span style="color:#6464b9;">&lt;/</span><span style="color:#844646;">city</span><span style="color:#6464b9;">&gt;
                    &lt;</span><span style="color:#844646;">country</span><span style="color:#6464b9;">&gt;</span><span style="background:#fffebf;color:#555555;">&lt;%=</span> uinfo.Country <span style="background:#fffebf;color:#555555;">%&gt;</span><span style="color:#6464b9;">&lt;/</span><span style="color:#844646;">country</span><span style="color:#6464b9;">&gt;
                    &lt;</span><span style="color:#844646;">geo:long</span><span style="color:#6464b9;">&gt;</span><span style="background:#fffebf;color:#555555;">&lt;%=</span> uinfo.Longitude <span style="background:#fffebf;color:#555555;">%&gt;</span><span style="color:#6464b9;">&lt;/</span><span style="color:#844646;">geo:long</span><span style="color:#6464b9;">&gt;
                    &lt;</span><span style="color:#844646;">geo:lat</span><span style="color:#6464b9;">&gt;</span><span style="background:#fffebf;color:#555555;">&lt;%=</span> uinfo.Latitude <span style="background:#fffebf;color:#555555;">%&gt;</span><span style="color:#6464b9;">&lt;/</span><span style="color:#844646;">geo:lat</span><span style="color:#6464b9;">&gt;
                    &lt;</span><span style="color:#844646;">visitorcount</span><span style="color:#6464b9;">&gt;</span><span style="color:#555555;">1</span><span style="color:#6464b9;">&lt;/</span><span style="color:#844646;">visitorcount</span><span style="color:#6464b9;">&gt;
                &lt;/</span><span style="color:#844646;">item</span><span style="color:#6464b9;">&gt;
</span></pre>
<p>&#8216;other methods to create xelement :</p>
<pre class="code"><span style="color:#6464b9;">                </span><span style="color:green;">'Dim myxml As String = "&lt;item&gt;" &amp; System.Environment.NewLine &amp; _
                '"&lt;title&gt;&lt;%= uinfo.Location %&gt;&lt;/title&gt;" &amp; System.Environment.NewLine _
        '    &amp; " &lt;description&gt;" &amp; uinfo.Location &amp; "&lt;/description&gt;" &amp; System.Environment.NewLine _
                '    &amp; "&lt;city&gt;" &amp; uinfo.City &amp; "&lt;/city&gt;" &amp; System.Environment.NewLine _
                '    &amp; "&lt;country&gt;" &amp; uinfo.Country &amp; "&lt;/country&gt;" &amp; System.Environment.NewLine _
             '    &amp; "&lt;geo:long&gt;" &amp; uinfo.Longitude &amp; "&lt;/geo:long&gt;" &amp; System.Environment.NewLine _
                '    &amp; "&lt;geo:lat&gt;" &amp; uinfo.Latitude &amp; "&lt;/geo:lat&gt;" &amp; System.Environment.NewLine _
                '    &amp; "&lt;visitorcount&gt;1&lt;/visitorcount&gt;&lt;/item&gt;"
                'searched = XElement.Parse(myxml)

                'searched = New XElement("item")
                'searched.Add(New XElement("title", uinfo.Location))
                'searched.Add(New XElement("description", uinfo.Location))
                'searched.Add(New XElement("city", uinfo.Location))
                'searched.Add(New XElement("country", uinfo.Location))
                'searched.Add(New XElement("geo:long", uinfo.Longitude))
                'searched.Add(New XElement("geo:lat", uinfo.Latitude))
                'searched.Add(New XElement("visitorcount", 1))

              </span><span style="color:green;">
</span></pre>
<p>&#8216;add our new city</p>
<pre class="code"><span style="color:green;">                </span>xdoc.Element(<span style="color:#a31515;">"rss"</span>).Element(<span style="color:#a31515;">"channel"</span>).Add(searched)
            <span style="color:blue;">Else</span></pre>
<p>&#8216;if city is already exists we add 1 more to visitor count</p>
<pre class="code"><span style="color:blue;">                </span>searched.Element(<span style="color:#a31515;">"visitorcount"</span>).Value = _
                (<span style="color:blue;">CType</span>(searched.Element(<span style="color:#a31515;">"visitorcount"</span>).Value.Trim _
                                                          , Int64) + 1).ToString
        searched.Element(<span style="color:#a31515;">"description"</span>).Value = searched.Element(<span style="color:#a31515;">"visitorcount"</span>).Value &amp; <span style="color:#a31515;">" Visits"
            </span><span style="color:blue;">End If</span></pre>
<p>&#8217;save document</p>
<pre class="code"><span style="color:blue;">            </span>xdoc.Save(VisitorDataPathURL)
<span style="color:blue;">    End Sub</span></pre>
</td>
</tr>
</tbody>
</table>
<p>show records on gridview,return value can be diffrent than ilist</p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td width="400" valign="top">
<pre class="code"><span style="color:blue;">  Public Shared Function </span>GetVisitorList() <span style="color:blue;">As </span>IList

        <span style="color:blue;">Dim </span>MyList = (<span style="color:blue;">From </span>ui <span style="color:blue;">As </span>XElement _
                      <span style="color:blue;">In </span>XDocument.Load(VisitorDataPathURL).Descendants.Elements(<span style="color:#a31515;">"item"</span>) _
                       <span style="color:blue;">Order By </span>ui.Element(<span style="color:#a31515;">"country"</span>).Value _
                      <span style="color:blue;">Select </span>Place = ui.Element(<span style="color:#a31515;">"title"</span>).Value _
                        , City = ui.Element(<span style="color:#a31515;">"city"</span>).Value _
                        , Country = ui.Element(<span style="color:#a31515;">"country"</span>).Value _
                        , Count = <span style="color:blue;">CInt</span>(ui.Element(<span style="color:#a31515;">"visitorcount"</span>).Value)).ToList</pre>
<pre class="code">'got visitorcount property, will be shown in footer of gridview
        VisitorCount = MyList.Select(<span style="color:blue;">Function</span>(count) count.Count).Sum

        <span style="color:blue;">Return </span>MyList
    <span style="color:blue;">End Function</span></pre>
<pre class="code"><span style="color:blue;">    Public Shared Property </span>VisitorCount() <span style="color:blue;">As Integer...</span><span style="color:blue;">End Property</span></pre>
</td>
</tr>
</tbody>
</table>
<p>All this stuff in a class&#8230;</p>
<p>In virtual earth show this file with VEDataType.GeoRSS method.  Here is <a href="http://www.inaea.org/other/visitorcities.aspx" target="_blank">EXAMPLE PAGE</a></p>
<p>In the future clustured pushpins and rich content pushpin descriptions will be there&#8230;</p>
Posted in .Net, Code Stuff, Notes to Myself Tagged: GeoRSS, Vb.Net, XLinq <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mefeozer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mefeozer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mefeozer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mefeozer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mefeozer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mefeozer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mefeozer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mefeozer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mefeozer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mefeozer.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mefeozer.wordpress.com&blog=4794352&post=44&subd=mefeozer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mefeozer.wordpress.com/2008/12/13/simple-works-on-georss-with-xlinq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf30cc2f17f83ff8ca85ad89ceb93f20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mefeozer</media:title>
		</media:content>
	</item>
	</channel>
</rss>