<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>DAN FOLKES &#187; Code</title>
	<atom:link href="http://danfolkes.com/index.php/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://danfolkes.com</link>
	<description>programmers blog</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:58:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<atom:link rel="next" href="http://danfolkes.com/index.php/category/code/feed/?page=2" />

		<item>
		<title>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</title>
		<link>http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/</link>
		<comments>http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 15:57:31 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[?callback]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[available]]></category>
		<category><![CDATA[callbackName]]></category>
		<category><![CDATA[cross site]]></category>
		<category><![CDATA[cross site script]]></category>
		<category><![CDATA[dataType]]></category>
		<category><![CDATA[dataType: jsonp]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[External]]></category>
		<category><![CDATA[External Domain]]></category>
		<category><![CDATA[getJSON]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery.ajax]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[JSONP]]></category>
		<category><![CDATA[jsonpCallback]]></category>
		<category><![CDATA[onJSONPLoad]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[success]]></category>
		<category><![CDATA[Web Service]]></category>
		<category><![CDATA[Webservice]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1482</guid>
		<description><![CDATA[You may want to look at this previous post where I setup a PHP Webservice that uses JSON PDO – Accessed by JQuery AJAX OK, so this code will use php to generate the JSON code that will get delivered over the internet to the JSONP (JSON Padding) client on an external domain. This allows [...]


Related posts:<ol><li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Permanent Link: Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You may want to look at this previous post where I setup a <a href="http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/">PHP Webservice that uses JSON PDO – Accessed by JQuery AJAX</a></p>
<p>OK, so this code will use php to generate the JSON code that will get delivered over the internet to the JSONP (JSON Padding) client on an external domain.  This allows your webservice to be available too whoever wants to call it.</p>
<p>Here is the PHP Code: (Not all of it, but enough to get the idea)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//http://SERVER_domain.com/webservice.php</span>
<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> GetTriviaTag<span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$t</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$t</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$t</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">triviaid</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'triviaid'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$t</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tagid</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tagid'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$t</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GetWhere<span style="color: #009900;">&#40;</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM trivia_tags WHERE <span style="color: #006699; font-weight: bold;">{$where}</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pdo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$retArray</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetTriviaTag</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$where</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot; (1 = 1)&quot;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// THIS WILL SELECT ALL</span>
<span style="color: #000088;">$tarray</span> <span style="color: #339933;">=</span> GetWhere<span style="color: #009900;">&#40;</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//OUTPUT JSON:</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: application/json'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'callback'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// &lt;-- THIS IS IMPORTANT FOR EXTERNAL DOMAIN ACCESS!!!</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;(&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tarray</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;)&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And now, to access it from javascript in an external domain (non &#8211; SERVER_domain.com ):</p>
<p>http://CLIENT_domain.com/Test.html:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>html<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span>Test<span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://code.jquery.com/jquery-latest.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;triviaQuestions&quot;</span><span style="color: #339933;">&gt;</span> loading<span style="color: #339933;">...</span> <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #666666; font-style: italic;">// THE 'callback=?' in this request is IMPORTANT FOR EXTERNAL DOMAIN ACCESS!!!</span>
				$<span style="color: #339933;">.</span>getJSON<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://SERVER_domain.com/webservice.php&amp;callback=?'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #000000; font-weight: bold;">var</span> items <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
					<span style="color: #000000; font-weight: bold;">var</span> htmlResult <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
					$<span style="color: #339933;">.</span><span style="color: #990000;">each</span><span style="color: #009900;">&#40;</span>data<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">key</span><span style="color: #339933;">,</span> val<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
						htmlResult <span style="color: #339933;">+=</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;Q: &quot;</span><span style="color: #339933;">+</span> val<span style="color: #339933;">.</span>id <span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;, '&quot;</span><span style="color: #339933;">+</span> val<span style="color: #339933;">.</span>question <span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#triviaQuestions'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>html<span style="color: #009900;">&#40;</span>htmlResult<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
	<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Permanent Link: Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</title>
		<link>http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/</link>
		<comments>http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 15:25:58 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[application/json]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Content-type]]></category>
		<category><![CDATA[Content-type: application/json]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[getJSON]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json_encode]]></category>
		<category><![CDATA[Request]]></category>
		<category><![CDATA[Response]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1470</guid>
		<description><![CDATA[You may want to look at this previous post where I setup a Web Service using JSONP from External Domain – PHP – JQuery The HTML that calls the Javascript: &#60;div id=&#34;taglist&#34;&#62;&#60;/div&#62; &#60;input name=&#34;searchTags&#34; id=&#34;searchTags&#34; type=&#34;text&#34; /&#62; &#60;input type=&#34;button&#34; name=&#34;searchtags&#34; onclick=&#34;getTags()&#34; value=&#34;search&#34;/&#62; &#60;div id=&#34;tagresult&#34;&#62; &#60;/div&#62; The JavaScript (JQuery) AJAX Request and Response Processing: function getTags&#40;&#41; [...]


Related posts:<ol><li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Permanent Link: Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/' rel='bookmark' title='Permanent Link: jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success'>jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You may want to look at this previous post where I setup a <a href="http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/">Web Service using JSONP from External Domain – PHP – JQuery</a></p>
<p>The HTML that calls the Javascript:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;taglist&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchTags&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchTags&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;button&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchtags&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;getTags()&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;search&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tagresult&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p><strong>The JavaScript </strong>(JQuery) AJAX Request and Response Processing:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> getTags<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> q <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#searchTags'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ws.php?type=tag&amp;wN=name&amp;wO=like&amp;wV='</span> <span style="color: #339933;">+</span> q<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> items <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> htmlResult <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
			$.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>data<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>key<span style="color: #339933;">,</span> val<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #006600; font-style: italic;">//As you can see, you can access the JSON (at the bottom of the page) by doing val.PROPERTYNAME:</span>
				htmlResult <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&lt;br /&gt;Add : &lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>#<span style="color: #000099; font-weight: bold;">\&quot;</span> onclick=<span style="color: #000099; font-weight: bold;">\&quot;</span>addTag(&quot;</span><span style="color: #339933;">+</span> val.<span style="color: #660066;">id</span> <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;, '&quot;</span><span style="color: #339933;">+</span> val.<span style="color: #660066;">getfullname</span> <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'); return false;<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #339933;">+</span> val.<span style="color: #660066;">getfullname</span> <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tagresult'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>htmlResult<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>PHP Code</strong> that returns JSON in the PHP file called by the AJAX: (ws.php)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000088;">$ta</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TagAccess<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$tarray</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ta</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetTagsWhere</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; <span style="color: #006699; font-weight: bold;">{$whereName}</span> LIKE '%<span style="color: #006699; font-weight: bold;">{$whereVariable}</span>%'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: application/json'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span>  <span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tarray</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The GetTagsWhere Helper Function:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GetTagsWhere<span style="color: #009900;">&#40;</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    	<span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
&nbsp;
    	<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM tags WHERE <span style="color: #006699; font-weight: bold;">{$where}</span>&quot;</span><span style="color: #339933;">;</span>
    	<span style="color: #666666; font-style: italic;">// THE PDO Object was created previously</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pdo</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$retArray</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetTag</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$retArray</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>JSON</strong> Returned:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;4&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;FICTION&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;parentid&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;3&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;getfullname&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;BOOKS &gt; FICTION&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;5&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;NON-FICTION&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;parentid&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;3&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;getfullname&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;BOOKS &gt; NON-FICTION&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Permanent Link: Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/' rel='bookmark' title='Permanent Link: jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success'>jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</title>
		<link>http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/</link>
		<comments>http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 19:38:47 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[end]]></category>
		<category><![CDATA[end Request]]></category>
		<category><![CDATA[endRequest]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Page Request Manager]]></category>
		<category><![CDATA[PageRequest Manager]]></category>
		<category><![CDATA[PageRequestManager]]></category>
		<category><![CDATA[Request]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1437</guid>
		<description><![CDATA[I needed to add a onclick event to a textbox in asp.net to change it to remove text from a textbox onClick when it is clicked. The normal code would look something like this: 1 &#60;asp:TextBox ID=&#34;txtStoreLocatorZip&#34; ValidationGroup=&#34;CustomerServiceEmail&#34; runat=&#34;server&#34; Text=&#34;Enter Zip&#34; CssClass=&#34;txtStoreLocatorZip_CssClass&#34; /&#62; 1 2 3 4 5 6 7 8 9 &#60;script&#62; if &#40;$&#40;'.txtStoreLocatorZip_CssClass'&#41;.val&#40;&#41; [...]


Related posts:<ol><li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Permanent Link: Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Permanent Link: Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I needed to add a onclick event to a textbox in asp.net to change it to remove text from a textbox onClick when it is clicked.<br />
The normal code would look something like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>TextBox  ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;txtStoreLocatorZip&quot;</span> ValidationGroup<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CustomerServiceEmail&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Enter Zip&quot;</span> CssClass<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;txtStoreLocatorZip_CssClass&quot;</span> <span style="color: #006600; font-weight: bold;">/&gt;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'Enter Zip'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'Enter Zip'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>But, this won&#8217;t quite work because my textbox is in a UpdatePanel&#8217;s ContentTemplate and the javascript is not read on postback.</p>
<p>So, This is what I ended up doing (a simplified version):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>UpdatePanel ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;UpdatePanel2&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span> UpdateMode<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Conditional&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
	<span style="color: #006600; font-weight: bold;">&lt;</span>ContentTemplate<span style="color: #006600; font-weight: bold;">&gt;</span>
		<span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>TextBox  ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;txtStoreLocatorZip&quot;</span> ValidationGroup<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CustomerServiceEmail&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Enter Zip&quot;</span> CssClass<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;txtStoreLocatorZip_CssClass&quot;</span> <span style="color: #006600; font-weight: bold;">/&gt;</span>
	<span style="color: #006600; font-weight: bold;">&lt;/</span>ContentTemplate<span style="color: #006600; font-weight: bold;">&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>UpdatePanel<span style="color: #006600; font-weight: bold;">&gt;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
	Sys.<span style="color: #660066;">WebForms</span>.<span style="color: #660066;">PageRequestManager</span>.<span style="color: #660066;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">add_endRequest</span><span style="color: #009900;">&#40;</span>endRequestHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">function</span> endRequestHandler<span style="color: #009900;">&#40;</span>sender<span style="color: #339933;">,</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'Enter Zip'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'Enter Zip'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.txtStoreLocatorZip_CssClass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>This will add an endRequest handler to the end of the partial page postback so that you can call a nice little function at the end of it.</p>
<p>Hope this helps some people!</p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Permanent Link: Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
<li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Permanent Link: Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Asp.Net &#8211; Adding Parameters to CommandType.Text</title>
		<link>http://danfolkes.com/2011/09/21/asp-net-adding-parameters-to-commandtype-text/</link>
		<comments>http://danfolkes.com/2011/09/21/asp-net-adding-parameters-to-commandtype-text/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 21:35:05 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[AddWithValue]]></category>
		<category><![CDATA[CommandType.Text]]></category>
		<category><![CDATA[Parameters]]></category>
		<category><![CDATA[Parameters.AddWithValue]]></category>
		<category><![CDATA[SELECT]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[where]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1411</guid>
		<description><![CDATA[This is how you add parameters to a standard CommandType.Text SQL call. This should prevent sql injection attacks. Using conSQL = New SqlConnection(&#34;CONNECTION STRING TO DATABASE&#34;) Try str = &#34;SELECT * FROM TableName where customerid = @CustomerID and CartType = @CartType&#34; cmdSQL = New SqlCommand(str, conSQL) cmdSQL.CommandType = CommandType.Text cmdSQL.Parameters.AddWithValue(&#34;@CustomerID&#34;, CustomerID) cmdSQL.Parameters.AddWithValue(&#34;@CartType&#34;, cartType) cartcount = [...]


Related posts:<ol><li><a href='http://danfolkes.com/2011/08/01/asp-net-vb-listview-itemcommand-datakeys-commandname-sql/' rel='bookmark' title='Permanent Link: Asp.Net VB &#8211; Listview &#8211; ItemCommand &#8211; DataKeys &#8211; CommandName &#8211; SQL'>Asp.Net VB &#8211; Listview &#8211; ItemCommand &#8211; DataKeys &#8211; CommandName &#8211; SQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is how you add parameters to a standard CommandType.Text SQL call.</p>
<p>This should prevent sql injection attacks.</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">        Using conSQL = <span style="color: #E56717; font-weight: bold;">New</span> SqlConnection(<span style="color: #800000;">&quot;CONNECTION STRING TO DATABASE&quot;</span>)
            Try
                str = <span style="color: #800000;">&quot;SELECT * FROM TableName where customerid = @CustomerID and CartType = @CartType&quot;</span>
                cmdSQL = <span style="color: #E56717; font-weight: bold;">New</span> SqlCommand(str, conSQL)
                cmdSQL.CommandType = CommandType.Text
                cmdSQL.Parameters.AddWithValue(<span style="color: #800000;">&quot;@CustomerID&quot;</span>, CustomerID)
                cmdSQL.Parameters.AddWithValue(<span style="color: #800000;">&quot;@CartType&quot;</span>, cartType)
                cartcount = cmdSQL.ExecuteScalar()
            Catch ex <span style="color: #151B8D; font-weight: bold;">As</span> Exception
                cartcount = 0
            <span style="color: #8D38C9; font-weight: bold;">End</span> Try
        <span style="color: #8D38C9; font-weight: bold;">End</span> Using</pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2011/08/01/asp-net-vb-listview-itemcommand-datakeys-commandname-sql/' rel='bookmark' title='Permanent Link: Asp.Net VB &#8211; Listview &#8211; ItemCommand &#8211; DataKeys &#8211; CommandName &#8211; SQL'>Asp.Net VB &#8211; Listview &#8211; ItemCommand &#8211; DataKeys &#8211; CommandName &#8211; SQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/09/21/asp-net-adding-parameters-to-commandtype-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Asp DropDownList &#8211; States &#8211; ListItem Example</title>
		<link>http://danfolkes.com/2011/08/09/asp-dropdownlist-states-listitem-example/</link>
		<comments>http://danfolkes.com/2011/08/09/asp-dropdownlist-states-listitem-example/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 19:18:17 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[AL]]></category>
		<category><![CDATA[Alabama]]></category>
		<category><![CDATA[Asp]]></category>
		<category><![CDATA[asp:DropDownList]]></category>
		<category><![CDATA[asp:ListItem]]></category>
		<category><![CDATA[Drop Down List]]></category>
		<category><![CDATA[DropDown]]></category>
		<category><![CDATA[DropDownList]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[Item]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[List Item]]></category>
		<category><![CDATA[ListItem]]></category>
		<category><![CDATA[States]]></category>
		<category><![CDATA[United States]]></category>
		<category><![CDATA[US States]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1392</guid>
		<description><![CDATA[Compiled List of US State Drop Downs for Asp.Net Forms: Hope this helps! &#60;asp:DropDownList ID=&#34;ddlState&#34; runat=&#34;server&#34;&#62; &#60;asp:ListItem Value=&#34;&#34; Selected=&#34;True&#34;&#62;Select a State&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;AL&#34;&#62;Alabama&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;AK&#34;&#62;Alaska&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;AZ&#34;&#62;Arizona&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;AR&#34;&#62;Arkansas&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;CA&#34;&#62;California&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;CO&#34;&#62;Colorado&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;CT&#34;&#62;Connecticut&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;DC&#34;&#62;D.C.&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;DE&#34;&#62;Delaware&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;FL&#34;&#62;Florida&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;GA&#34;&#62;Georgia&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;HI&#34;&#62;Hawaii&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;ID&#34;&#62;Idaho&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;IL&#34;&#62;Illinois&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;IN&#34;&#62;Indiana&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;IA&#34;&#62;Iowa&#60;/asp:ListItem&#62; &#60;asp:ListItem value=&#34;KS&#34;&#62;Kansas&#60;/asp:ListItem&#62; [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/08/Asp-DropDownList-States-ListItem-Example.jpg" alt="Asp DropDownList - States - ListItem Example" title="Asp DropDownList - States - ListItem Example" width="355" height="377" class="alignnone size-full wp-image-1397" /><br />
<strong>Compiled List of US State Drop Downs for Asp.Net Forms:</strong></p>
<p>Hope this helps!</p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ddlState&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;&quot;</span> Selected<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;True&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Select a State<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AL&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Alabama<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AK&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Alaska<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AZ&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Arizona<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AR&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Arkansas<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>California<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CO&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Colorado<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CT&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Connecticut<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DC&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>D.<span style="color: #9900cc;">C</span>.<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DE&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Delaware<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;FL&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Florida<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;GA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Georgia<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;HI&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Hawaii<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ID&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Idaho<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IL&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Illinois<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IN&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Indiana<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Iowa<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KS&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Kansas<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KY&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Kentucky<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;LA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Louisiana<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ME&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Maine<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MD&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Maryland<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Massachusetts<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MI&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Michigan<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MN&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Minnesota<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MS&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Mississippi<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MO&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Missouri<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MT&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Montana<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NE&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Nebraska<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NV&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Nevada<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NH&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>New Hampshire<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NJ&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>New Jersey<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NM&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>New Mexico<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NY&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>New York<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NC&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>North Carolina<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ND&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>North Dakota<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OH&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Ohio<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OK&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Oklahoma<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OR&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Oregon<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;PA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Pennsylvania<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;RI&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Rhode Island<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SC&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>South Carolina<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SD&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>South Dakota<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TN&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Tennessee<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TX&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Texas<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;UT&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Utah<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VT&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Vermont<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Virginia<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WA&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Washington<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WV&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>West Virginia<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WI&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Wisconsin<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WY&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Wyoming<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList<span style="color: #006600; font-weight: bold;">&gt;</span></pre></div></div>

<p>More State Drop Downs After the fold:<br />
<span id="more-1392"></span><br />
<strong>Using the Text Property:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ddlState&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;&quot;</span> Selected<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;True&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Select a State<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AL&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alabama&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AK&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alaska&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AZ&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arizona&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AR&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arkansas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;California&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CO&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Colorado&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CT&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Connecticut&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DC&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;D.C.&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DE&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Delaware&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;FL&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Florida&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;GA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Georgia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;HI&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Hawaii&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ID&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Idaho&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IL&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Illinois&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IN&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Indiana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Iowa&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KS&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kansas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KY&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kentucky&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;LA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Louisiana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ME&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maine&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MD&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maryland&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Massachusetts&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MI&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Michigan&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MN&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Minnesota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MS&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Mississippi&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MO&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Missouri&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MT&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Montana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NE&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nebraska&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NV&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nevada&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NH&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Hampshire&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NJ&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Jersey&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NM&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Mexico&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NY&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New York&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NC&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Carolina&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ND&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Dakota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OH&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Ohio&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OK&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oklahoma&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OR&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oregon&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;PA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Pennsylvania&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;RI&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Rhode Island&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SC&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Carolina&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SD&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Dakota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TN&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Tennessee&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TX&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Texas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;UT&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Utah&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VT&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Vermont&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Virginia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WA&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Washington&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WV&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;West Virginia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WI&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wisconsin&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WY&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wyoming&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList<span style="color: #006600; font-weight: bold;">&gt;</span></pre></div></div>

<p><strong>Using the Text Property Reversed:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ddlState&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;&quot;</span> Selected<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;True&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>Select a State<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem<span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alabama&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alaska&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AK&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arizona&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AZ&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arkansas&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AR&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;California&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Colorado&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CO&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Connecticut&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;D.C.&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Delaware&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DE&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Florida&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;FL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Georgia&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;GA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Hawaii&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;HI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Idaho&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ID&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Illinois&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Indiana&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Iowa&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kansas&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KS&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kentucky&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Louisiana&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;LA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maine&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ME&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maryland&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MD&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Massachusetts&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Michigan&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Minnesota&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Mississippi&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MS&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Missouri&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MO&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Montana&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nebraska&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NE&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nevada&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NV&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Hampshire&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NH&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Jersey&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NJ&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Mexico&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NM&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New York&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Carolina&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Dakota&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ND&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Ohio&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OH&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oklahoma&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OK&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oregon&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OR&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Pennsylvania&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;PA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Rhode Island&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;RI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Carolina&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Dakota&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SD&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Tennessee&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Texas&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TX&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Utah&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;UT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Vermont&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Virginia&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Washington&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;West Virginia&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WV&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wisconsin&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wyoming&quot;</span> Text<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList<span style="color: #006600; font-weight: bold;">&gt;</span></pre></div></div>

<p><strong>States with just Long Names:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ddlState&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alabama&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Alaska&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arizona&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Arkansas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;California&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Colorado&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Connecticut&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;D.C.&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Delaware&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Florida&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Georgia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Hawaii&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Idaho&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Illinois&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Indiana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Iowa&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kansas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Kentucky&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Louisiana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maine&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Maryland&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Massachusetts&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Michigan&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Minnesota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Mississippi&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Missouri&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Montana&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nebraska&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Nevada&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Hampshire&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Jersey&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New Mexico&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;New York&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Carolina&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;North Dakota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Ohio&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oklahoma&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Oregon&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Pennsylvania&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Rhode Island&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Carolina&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;South Dakota&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Tennessee&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Texas&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Utah&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Vermont&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Virginia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Washington&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;West Virginia&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wisconsin&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;Wyoming&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList<span style="color: #006600; font-weight: bold;">&gt;</span></pre></div></div>

<p><strong>States with just Short Names:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList ID<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ddlState&quot;</span> runat<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;server&quot;</span><span style="color: #006600; font-weight: bold;">&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AK&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AZ&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;AR&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CO&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;CT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;DE&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;FL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;GA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;HI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ID&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IL&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;IA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KS&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;KY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;LA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ME&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MD&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MS&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MO&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;MT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NE&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NV&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NH&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NJ&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NM&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;NC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;ND&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OH&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OK&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;OR&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;PA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;RI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SC&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;SD&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TN&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;TX&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;UT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VT&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;VA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WA&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WV&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WI&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
    <span style="color: #006600; font-weight: bold;">&lt;</span>asp<span style="color: #006600; font-weight: bold;">:</span>ListItem Value<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;WY&quot;</span><span style="color: #006600; font-weight: bold;">/&gt;</span>
<span style="color: #006600; font-weight: bold;">&lt;/</span>asp<span style="color: #006600; font-weight: bold;">:</span>DropDownList<span style="color: #006600; font-weight: bold;">&gt;</span></pre></div></div>



<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/08/09/asp-dropdownlist-states-listitem-example/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/08/Asp-DropDownList-States-ListItem-Example-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2011/08/Asp-DropDownList-States-ListItem-Example.jpg" medium="image">
			<media:title type="html">Asp DropDownList &#8211; States &#8211; ListItem Example</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/08/Asp-DropDownList-States-ListItem-Example-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>Asp.Net VB &#8211; Listview &#8211; ItemCommand &#8211; DataKeys &#8211; CommandName &#8211; SQL</title>
		<link>http://danfolkes.com/2011/08/01/asp-net-vb-listview-itemcommand-datakeys-commandname-sql/</link>
		<comments>http://danfolkes.com/2011/08/01/asp-net-vb-listview-itemcommand-datakeys-commandname-sql/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 16:56:59 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Asp]]></category>
		<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[CommandName]]></category>
		<category><![CDATA[ConnectionString]]></category>
		<category><![CDATA[DataBind]]></category>
		<category><![CDATA[dataItem.DataItemIndex]]></category>
		<category><![CDATA[DataKeys]]></category>
		<category><![CDATA[e.CommandName]]></category>
		<category><![CDATA[e.Item]]></category>
		<category><![CDATA[e.Item.FindControl]]></category>
		<category><![CDATA[e.Item.ItemType]]></category>
		<category><![CDATA[FindControl]]></category>
		<category><![CDATA[ItemCommand]]></category>
		<category><![CDATA[ItemDataBound]]></category>
		<category><![CDATA[Listview]]></category>
		<category><![CDATA[ListViewItemEventArgs]]></category>
		<category><![CDATA[Parameters]]></category>
		<category><![CDATA[Parameters.Add]]></category>
		<category><![CDATA[SelectCommand]]></category>
		<category><![CDATA[SelectParameters]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SqlDataSource]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[WebControls]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1384</guid>
		<description><![CDATA[Here is a basic Listview that has an ItemCommand and ItemDataBound: Frontend Code: &#60;asp:ListView ID=&#34;lvAddresses&#34; runat=&#34;server&#34; DataKeyNames=&#34;AddressID,BillingAddressID,ShippingAddressID&#34;&#62; &#60;LayoutTemplate&#62; &#60;asp:PlaceHolder ID=&#34;itemPlaceholder&#34; runat=&#34;server&#34;&#62;&#60;/asp:PlaceHolder&#62; &#60;/LayoutTemplate&#62; &#60;ItemTemplate&#62; &#60;table class=&#34;noborder address_book&#34; cellpadding=&#34;0&#34; cellspacing=&#34;0&#34;&#62;&#60;tbody&#62; &#60;tr&#62; &#60;td colspan=&#34;2&#34;&#62; &#60;%#DataBinder.Eval(Container.DataItem, &#34;FirstName&#34;)%&#62; &#60;%#DataBinder.Eval(Container.DataItem, &#34;LastName&#34;)%&#62;&#60;br&#62; &#60;%#DataBinder.Eval(Container.DataItem, &#34;Address1&#34;)%&#62;&#60;br&#62; &#60;%#DataBinder.Eval(Container.DataItem, &#34;City&#34;)%&#62;, &#60;%#DataBinder.Eval(Container.DataItem, &#34;State&#34;)%&#62;, &#60;%#DataBinder.Eval(Container.DataItem, &#34;Zip&#34;)%&#62;&#60;br&#62; &#60;%#DataBinder.Eval(Container.DataItem, &#34;Phone&#34;)%&#62;&#60;br&#62; &#60;span class=&#34;caption&#34;&#62;&#60;asp:LinkButton ID=&#34;lnkMakeDefault_Billing&#34; CommandName=&#34;MakeDefault_Billing&#34; runat=&#34;server&#34;&#62;Click to make Default Billing Address&#60;/asp:LinkButton&#62;&#60;/span&#62; [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/08/Asp.Net-VB-Listview-ItemCommand-DataKeys-CommandName-SQL.jpg" alt="Asp.Net VB - Listview - ItemCommand - DataKeys - CommandName - SQL" title="Asp.Net VB - Listview - ItemCommand - DataKeys - CommandName - SQL" width="221" height="190" class="alignnone size-full wp-image-1388" /></p>
<p><strong>Here is a basic Listview that has an ItemCommand and ItemDataBound:</strong></p>
<p>Frontend Code:</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">&lt;asp:ListView ID=<span style="color: #800000;">&quot;lvAddresses&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span> DataKeyNames=<span style="color: #800000;">&quot;AddressID,BillingAddressID,ShippingAddressID&quot;</span>&gt;
        &lt;LayoutTemplate&gt;
            &lt;asp:PlaceHolder ID=<span style="color: #800000;">&quot;itemPlaceholder&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span>&gt;&lt;/asp:PlaceHolder&gt;
        &lt;/LayoutTemplate&gt;
        &lt;ItemTemplate&gt;
            &lt;table class=<span style="color: #800000;">&quot;noborder address_book&quot;</span> cellpadding=<span style="color: #800000;">&quot;0&quot;</span> cellspacing=<span style="color: #800000;">&quot;0&quot;</span>&gt;&lt;tbody&gt;
                &lt;tr&gt;
                    &lt;td colspan=<span style="color: #800000;">&quot;2&quot;</span>&gt;
                        &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;FirstName&quot;</span>)%&gt; &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;LastName&quot;</span>)%&gt;&lt;br&gt;
                        &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;Address1&quot;</span>)%&gt;&lt;br&gt;
                        &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;City&quot;</span>)%&gt;, &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;State&quot;</span>)%&gt;, &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;Zip&quot;</span>)%&gt;&lt;br&gt;
                        &lt;%#DataBinder.Eval(Container.DataItem, <span style="color: #800000;">&quot;Phone&quot;</span>)%&gt;&lt;br&gt;
                        &lt;span class=<span style="color: #800000;">&quot;caption&quot;</span>&gt;&lt;asp:LinkButton ID=<span style="color: #800000;">&quot;lnkMakeDefault_Billing&quot;</span> CommandName=<span style="color: #800000;">&quot;MakeDefault_Billing&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span>&gt;Click <span style="color: #8D38C9; font-weight: bold;">to</span> make Default Billing Address&lt;/asp:LinkButton&gt;&lt;/span&gt;
                        &lt;span class=<span style="color: #800000;">&quot;caption&quot;</span>&gt;&lt;asp:Literal ID=<span style="color: #800000;">&quot;litMakeDefault_Billing&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span> Text=<span style="color: #800000;">&quot;Default Billing Address&quot;</span>&gt;&lt;/asp:Literal&gt;&lt;/span&gt;
                        &lt;br /&gt;
                        &lt;span class=<span style="color: #800000;">&quot;caption&quot;</span>&gt;&lt;asp:LinkButton ID=<span style="color: #800000;">&quot;lnkMakeDefault_Shipping&quot;</span> CommandName=<span style="color: #800000;">&quot;MakeDefault_Shipping&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span>&gt;Click <span style="color: #8D38C9; font-weight: bold;">to</span> make Default Shipping Address&lt;/asp:LinkButton&gt;&lt;/span&gt;
                        &lt;span class=<span style="color: #800000;">&quot;caption&quot;</span>&gt;&lt;asp:Literal ID=<span style="color: #800000;">&quot;litMakeDefault_Shipping&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span> Text=<span style="color: #800000;">&quot;Default Shipping Address&quot;</span>&gt;&lt;/asp:Literal&gt;&lt;/span&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                        &lt;asp:Button ID=<span style="color: #800000;">&quot;Button1&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span> Text=<span style="color: #800000;">&quot;EDIT&quot;</span> CommandName=<span style="color: #800000;">&quot;EDITAddress&quot;</span>/&gt;
                    &lt;/td&gt;
                    &lt;td&gt;
                        &lt;asp:Button ID=<span style="color: #800000;">&quot;btnREMOVE&quot;</span> runat=<span style="color: #800000;">&quot;server&quot;</span> Text=<span style="color: #800000;">&quot;REMOVE&quot;</span> CommandName=<span style="color: #800000;">&quot;REMOVEAddress&quot;</span>/&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/tbody&gt;&lt;/table&gt;
&nbsp;
        &lt;/ItemTemplate&gt;
    &lt;/asp:ListView&gt;</pre></div></div>

<p>Backend Code:</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">Protected <span style="color: #E56717; font-weight: bold;">Sub</span> Page_PreRender(<span style="color: #151B8D; font-weight: bold;">ByVal</span> sender <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Object</span>, <span style="color: #151B8D; font-weight: bold;">ByVal</span> e <span style="color: #151B8D; font-weight: bold;">As</span> System.EventArgs) Handles Me.PreRender
&nbsp;
        FindIt()
&nbsp;
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span>
    <span style="color: #E56717; font-weight: bold;">Private</span> <span style="color: #E56717; font-weight: bold;">Sub</span> FindIt()
&nbsp;
        lblAddresses.Text = <span style="color: #800000;">&quot;&quot;</span>
&nbsp;
        <span style="color: #151B8D; font-weight: bold;">Dim</span> sqlDataConnection <span style="color: #151B8D; font-weight: bold;">As</span> System.Data.SqlClient.SqlConnection = CDataAccess.OpenDatabase
        <span style="color: #151B8D; font-weight: bold;">Dim</span> conStr <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span> = sqlDataConnection.ConnectionString
        sqlDataConnection.<span style="color: #8D38C9; font-weight: bold;">Close</span>()
&nbsp;
        <span style="color: #151B8D; font-weight: bold;">Dim</span> selectCommand <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span> = <span style="color: #800000;">&quot;SELECT Address.*, Customer.BillingAddressID, Customer.ShippingAddressID&quot;</span>
        selectCommand &amp;= <span style="color: #800000;">&quot; FROM Address INNER JOIN Customer ON Address.CustomerID = Customer.CustomerID&quot;</span>
        selectCommand &amp;= <span style="color: #800000;">&quot; WHERE Address.CustomerID = @CustomerID AND Address.Deleted = 0&quot;</span>
&nbsp;
        <span style="color: #151B8D; font-weight: bold;">Dim</span> sds <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> SqlDataSource()
        sds.ConnectionString = conStr
        sds.SelectParameters.Clear()
&nbsp;
        sds.SelectParameters.Add(<span style="color: #800000;">&quot;CustomerID&quot;</span>, 12345)
        sds.SelectCommand = selectCommand
&nbsp;
        lvAddresses.DataSource = sds
        lvAddresses.DataBind()
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span>
&nbsp;
    Protected <span style="color: #E56717; font-weight: bold;">Sub</span> lvAddresses_ItemCommand(<span style="color: #151B8D; font-weight: bold;">ByVal</span> sender <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Object</span>, <span style="color: #151B8D; font-weight: bold;">ByVal</span> e <span style="color: #151B8D; font-weight: bold;">As</span> System.Web.UI.WebControls.ListViewCommandEventArgs) Handles lvAddresses.ItemCommand
        <span style="color: #151B8D; font-weight: bold;">Dim</span> dataItem <span style="color: #151B8D; font-weight: bold;">As</span> ListViewDataItem = e.Item
        <span style="color: #151B8D; font-weight: bold;">Dim</span> currentDataKey <span style="color: #151B8D; font-weight: bold;">As</span> DataKey = lvAddresses.DataKeys(dataItem.DataItemIndex)
        <span style="color: #151B8D; font-weight: bold;">Dim</span> AddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;AddressID&quot;</span>)
        <span style="color: #151B8D; font-weight: bold;">Dim</span> BillingAddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;BillingAddressID&quot;</span>)
        <span style="color: #151B8D; font-weight: bold;">Dim</span> ShippingAddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;ShippingAddressID&quot;</span>)
&nbsp;
        <span style="color: #008000;">'MakeDefault_Billing
</span>        <span style="color: #008000;">'MakeDefault_Shipping
</span>        <span style="color: #008000;">'EDITAddress
</span>        <span style="color: #008000;">'REMOVEAddress
</span>        <span style="color: #8D38C9; font-weight: bold;">If</span> <span style="color: #F660AB; font-weight: bold;">String</span>.Equals(e.CommandName, <span style="color: #800000;">&quot;MakeDefault_Billing&quot;</span>) <span style="color: #8D38C9; font-weight: bold;">Then</span>
            MakeDefault(AddressID, <span style="color: #00C2FF; font-weight: bold;">True</span>)
        <span style="color: #8D38C9; font-weight: bold;">ElseIf</span> <span style="color: #F660AB; font-weight: bold;">String</span>.Equals(e.CommandName, <span style="color: #800000;">&quot;MakeDefault_Shipping&quot;</span>) <span style="color: #8D38C9; font-weight: bold;">Then</span>
            MakeDefault(AddressID, <span style="color: #00C2FF; font-weight: bold;">False</span>)
        <span style="color: #8D38C9; font-weight: bold;">ElseIf</span> <span style="color: #F660AB; font-weight: bold;">String</span>.Equals(e.CommandName, <span style="color: #800000;">&quot;EDITAddress&quot;</span>) <span style="color: #8D38C9; font-weight: bold;">Then</span>
            EditAddress(AddressID)
        <span style="color: #8D38C9; font-weight: bold;">ElseIf</span> <span style="color: #F660AB; font-weight: bold;">String</span>.Equals(e.CommandName, <span style="color: #800000;">&quot;REMOVEAddress&quot;</span>) <span style="color: #8D38C9; font-weight: bold;">Then</span>
            RemoveAddress(AddressID)
        <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span>
&nbsp;
    Protected <span style="color: #E56717; font-weight: bold;">Sub</span> lvAddresses_ItemDataBound(<span style="color: #151B8D; font-weight: bold;">ByVal</span> sender <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Object</span>, <span style="color: #151B8D; font-weight: bold;">ByVal</span> e <span style="color: #151B8D; font-weight: bold;">As</span> System.Web.UI.WebControls.ListViewItemEventArgs) Handles lvAddresses.ItemDataBound
        <span style="color: #151B8D; font-weight: bold;">Dim</span> dataItem <span style="color: #151B8D; font-weight: bold;">As</span> ListViewDataItem = e.Item
&nbsp;
        <span style="color: #8D38C9; font-weight: bold;">If</span> e.Item.ItemType = ListViewItemType.DataItem <span style="color: #8D38C9; font-weight: bold;">Then</span>
            <span style="color: #151B8D; font-weight: bold;">Dim</span> currentDataKey <span style="color: #151B8D; font-weight: bold;">As</span> DataKey = lvAddresses.DataKeys(dataItem.DataItemIndex)
            <span style="color: #151B8D; font-weight: bold;">Dim</span> AddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;AddressID&quot;</span>)
            <span style="color: #151B8D; font-weight: bold;">Dim</span> BillingAddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;BillingAddressID&quot;</span>)
            <span style="color: #151B8D; font-weight: bold;">Dim</span> ShippingAddressID <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = currentDataKey(<span style="color: #800000;">&quot;ShippingAddressID&quot;</span>)
            lit = e.Item.FindControl(<span style="color: #800000;">&quot;litMakeDefault_Billing&quot;</span>)
            <span style="color: #151B8D; font-weight: bold;">Dim</span> lit2 <span style="color: #151B8D; font-weight: bold;">As</span> Literal = e.Item.FindControl(<span style="color: #800000;">&quot;litMakeDefault_Shipping&quot;</span>)
            lnk = e.Item.FindControl(<span style="color: #800000;">&quot;lnkMakeDefault_Billing&quot;</span>)
            <span style="color: #151B8D; font-weight: bold;">Dim</span> lnk2 <span style="color: #151B8D; font-weight: bold;">As</span> LinkButton = e.Item.FindControl(<span style="color: #800000;">&quot;lnkMakeDefault_Shipping&quot;</span>)
&nbsp;
            lit.Visible = <span style="color: #8D38C9; font-weight: bold;">Not</span> lnk.Visible
        <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
&nbsp;
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span></pre></div></div>



<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/08/01/asp-net-vb-listview-itemcommand-datakeys-commandname-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/08/Asp.Net-VB-Listview-ItemCommand-DataKeys-CommandName-SQL-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2011/08/Asp.Net-VB-Listview-ItemCommand-DataKeys-CommandName-SQL.jpg" medium="image">
			<media:title type="html">Asp.Net VB &#8211; Listview &#8211; ItemCommand &#8211; DataKeys &#8211; CommandName &#8211; SQL</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/08/Asp.Net-VB-Listview-ItemCommand-DataKeys-CommandName-SQL-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>ASPDotNetStoreFront: Adding Topic to XML Packages or .aspx Pages</title>
		<link>http://danfolkes.com/2011/07/18/aspdotnetstorefront-adding-topic-to-xml-packages-or-aspx-pages/</link>
		<comments>http://danfolkes.com/2011/07/18/aspdotnetstorefront-adding-topic-to-xml-packages-or-aspx-pages/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 19:07:22 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[ASP Dot Net Store Front]]></category>
		<category><![CDATA[aspdnsf]]></category>
		<category><![CDATA[aspdnsf:Topic]]></category>
		<category><![CDATA[AspDotNetStorefront]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[DotNetStoreFront]]></category>
		<category><![CDATA[Store Front]]></category>
		<category><![CDATA[StoreFront]]></category>
		<category><![CDATA[Topic]]></category>
		<category><![CDATA[Topics]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[Xml Package]]></category>
		<category><![CDATA[XMLPackage]]></category>
		<category><![CDATA[XMLPackages]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1369</guid>
		<description><![CDATA[This is how you add a DotNetStoreFront&#8217;s Topic into a XMLPackage: &#60;xsl:value-of select=&#34;aspdnsf:Topic('TOPIC_NAME')&#34; disable-output-escaping=&#34;yes&#34;/&#62; Now, if you want to add it to a .aspx or .ascx page on dnsf: &#60;aspdnsf:Topic runat=&#34;server&#34; ID=&#34;Topic1&#34; TopicName=&#34;TOPIC_NAME&#34; /&#62; Related posts:AspDotNetStorefront &#8211; Changing Max File Upload Size Quick n Easy &#8211; Forms Authentication &#8211; Web.conf Python: Wunderground Todays Weather to [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/02/23/aspdotnetstorefront-changing-max-file-upload-size/' rel='bookmark' title='Permanent Link: AspDotNetStorefront &#8211; Changing Max File Upload Size'>AspDotNetStorefront &#8211; Changing Max File Upload Size</a></li>
<li><a href='http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/' rel='bookmark' title='Permanent Link: Quick n Easy &#8211; Forms Authentication &#8211; Web.conf'>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>This is how you add a DotNetStoreFront&#8217;s Topic into a XMLPackage:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">&lt;xsl:value-of <span style="color: #8D38C9; font-weight: bold;">select</span>=<span style="color: #800000;">&quot;aspdnsf:Topic('TOPIC_NAME')&quot;</span> disable-output-escaping=<span style="color: #800000;">&quot;yes&quot;</span>/&gt;</pre></div></div>

<p><strong>Now, if you want to add it to a .aspx or .ascx page on dnsf:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">&lt;aspdnsf:Topic runat=<span style="color: #800000;">&quot;server&quot;</span> ID=<span style="color: #800000;">&quot;Topic1&quot;</span> TopicName=<span style="color: #800000;">&quot;TOPIC_NAME&quot;</span> /&gt;</pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/02/23/aspdotnetstorefront-changing-max-file-upload-size/' rel='bookmark' title='Permanent Link: AspDotNetStorefront &#8211; Changing Max File Upload Size'>AspDotNetStorefront &#8211; Changing Max File Upload Size</a></li>
<li><a href='http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/' rel='bookmark' title='Permanent Link: Quick n Easy &#8211; Forms Authentication &#8211; Web.conf'>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/07/18/aspdotnetstorefront-adding-topic-to-xml-packages-or-aspx-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Simple PHP Pseudo Proxy</title>
		<link>http://danfolkes.com/2011/07/06/simple-php-pseudo-proxy/</link>
		<comments>http://danfolkes.com/2011/07/06/simple-php-pseudo-proxy/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 11:51:56 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[fopen]]></category>
		<category><![CDATA[PHP Proxy]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Simple PHP Proxy]]></category>
		<category><![CDATA[stream_get_contents]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1363</guid>
		<description><![CDATA[This is the code for a simple php pseudo proxy. If you are blocked by a firewall and google cache isn&#8217;t working for some reason. You can use a url with this php file in it: &#60;?php $filename = $_GET&#91;&#34;url&#34;&#93;; if &#40;isset&#40;$filename&#41;&#41; &#123; $handle = fopen&#40;$filename, &#34;rb&#34;&#41;; $contents = stream_get_contents&#40;$handle&#41;; print $contents; fclose&#40;$handle&#41;; &#125; else [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/07/php_simple_fake_proxy.jpg" alt="php proxy simple pseudo" title="php_simple_fake_proxy" width="335" height="74" class="alignnone size-full wp-image-1364" /></p>
<p>This is the code for a simple php pseudo proxy.  If you are blocked by a firewall and google cache isn&#8217;t working for some reason.  You can use a url with this php file in it:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$handle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;rb&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$contents</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stream_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">print</span> <span style="color: #000088;">$contents</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;form method=&quot;GET&quot;&gt;
&lt;input type=&quot;text&quot; name=&quot;url&quot; /&gt;&lt;input type=&quot;submit&quot;/&gt;
&lt;/form&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Then you can go to where the url is hosted and try something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">index.php?url=http%3A%2F%2Fwww.last.fm%2Fuser%2Fdanfolkes%2Fcharts%3Frangetype%3D6month%26subtype%3Dartists</pre></div></div>



<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/07/06/simple-php-pseudo-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/07/php_simple_fake_proxy-150x74.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2011/07/php_simple_fake_proxy.jpg" medium="image">
			<media:title type="html">php_simple_fake_proxy</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/07/php_simple_fake_proxy-150x74.jpg" />
		</media:content>
	</item>
		<item>
		<title>Facebook Website Integration &#8211; HTML</title>
		<link>http://danfolkes.com/2011/05/25/facebook-website-integration-html/</link>
		<comments>http://danfolkes.com/2011/05/25/facebook-website-integration-html/#comments</comments>
		<pubDate>Wed, 25 May 2011 15:40:03 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[a website]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook app]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[Feedburner]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[integrate]]></category>
		<category><![CDATA[integrate Facebook]]></category>
		<category><![CDATA[rss feed]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1310</guid>
		<description><![CDATA[To integrate Facebook on to a website without the use of a facebook app you need these things: Facebook Page RSS Feed (can be tricky) Feedburner Account (free,easy) (here) Once you have both of those things you can do this in feedburner: Add a new feed (your facebook url) Go to the publicize tab Go [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
<li><a href='http://danfolkes.com/2008/03/17/facebot-my-facebook-robot/' rel='bookmark' title='Permanent Link: Facebot &#8211; My Facebook Robot'>Facebot &#8211; My Facebook Robot</a></li>
<li><a href='http://danfolkes.com/2010/04/20/jquery-example-documents-for-presentation/' rel='bookmark' title='Permanent Link: JQuery &#8211; Example Documents for Presentation'>JQuery &#8211; Example Documents for Presentation</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/2011/05/25/facebook-website-integration-html/facebook-website-integration-%e2%80%93-html-3/" rel="attachment wp-att-1321"><img src="http://danfolkes.com/wp-content/uploads/2011/05/Facebook-Website-Integration-–-HTML2.jpg" alt="" title="Facebook-Website-Integration-–-HTML" width="400" height="252" class="alignnone size-full wp-image-1321" /></a><br />
To integrate Facebook on to a website without the use of a facebook app you need these things:</p>
<ul>
<li>Facebook Page RSS Feed (<a href="http://www.google.com/search?q=find+your+facebook+rss+feed&#038;ie=utf-8&#038;oe=utf-8&#038;aq=t">can be tricky)</a></li>
<li>Feedburner Account (free,easy) (<a href="http://feedburner.google.com/">here</a>)</li>
</ul>
<p>Once you have both of those things you can do this in feedburner:</p>
<ul>
<li>Add a new feed (your facebook url)</li>
<li>Go to the publicize tab</li>
<li>Go to BuzzBoost</li>
<li>Sroll down and fill out the form, you will be given html code.</li>
<li>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script src=&quot;http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates?format=sigpro&quot; type=&quot;text/javascript&quot; &gt;&lt;/script&gt;
&lt;noscript&gt;&lt;p&gt;Subscribe to RSS headline updates from: 
&lt;a href=&quot;http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates&quot;&gt;&lt;/a&gt;
&lt;br/&gt;Powered by FeedBurner&lt;/p&gt; 
&lt;/noscript&gt;</pre></div></div>

</li>
<li>Preview:<script src="http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates?format=sigpro" type="text/javascript" ></script><noscript>
<p>Subscribe to RSS headline updates from: <a href="http://feeds.feedburner.com/DanielFolkessFacebookStatusUpdates"></a><br/>Powered by FeedBurner</p>
<p> </noscript></li>
</ul>
<p>And that&#8217;s it!<br />
You can now style it up a little bit with some CSS and stuff.</p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
<li><a href='http://danfolkes.com/2008/03/17/facebot-my-facebook-robot/' rel='bookmark' title='Permanent Link: Facebot &#8211; My Facebook Robot'>Facebot &#8211; My Facebook Robot</a></li>
<li><a href='http://danfolkes.com/2010/04/20/jquery-example-documents-for-presentation/' rel='bookmark' title='Permanent Link: JQuery &#8211; Example Documents for Presentation'>JQuery &#8211; Example Documents for Presentation</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/05/25/facebook-website-integration-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/05/Facebook-Website-Integration-–-HTML2-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2011/05/Facebook-Website-Integration-–-HTML2.jpg" medium="image">
			<media:title type="html">Facebook-Website-Integration-–-HTML</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/05/Facebook-Website-Integration-–-HTML2-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>Java &#8211; Singleton / Global &#8211; Data Access &#8211; SQLite</title>
		<link>http://danfolkes.com/2011/05/20/java-singleton-global-data-access-sqlite/</link>
		<comments>http://danfolkes.com/2011/05/20/java-singleton-global-data-access-sqlite/#comments</comments>
		<pubDate>Fri, 20 May 2011 16:21:10 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[DataAccess]]></category>
		<category><![CDATA[Global]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JAVA Global]]></category>
		<category><![CDATA[Java Singleton]]></category>
		<category><![CDATA[Singleton]]></category>
		<category><![CDATA[SingletonHolder.INSTANCE]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[sqlite4java]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1071</guid>
		<description><![CDATA[This will make a Java global object: import java.io.File; import java.io.IOException; &#160; import com.almworks.sqlite4java.SQLite; import com.almworks.sqlite4java.SQLiteConnection; import com.almworks.sqlite4java.SQLiteException; import com.almworks.sqlite4java.SQLiteJob; import com.almworks.sqlite4java.SQLiteQueue; import com.almworks.sqlite4java.SQLiteStatement; &#160; public final class DataAccess &#123; // Singleton Stuff private static class SingletonHolder &#123; public static final DataAccess INSTANCE = new DataAccess&#40;&#41;; &#125; public static DataAccess getInstance&#40;&#41; &#123; return SingletonHolder.INSTANCE; &#125; [...]


Related posts:<ol><li><a href='http://danfolkes.com/2008/08/11/python-cell-phone-number-pad-input/' rel='bookmark' title='Permanent Link: Python &#8211; Cell Phone Number Pad Input'>Python &#8211; Cell Phone Number Pad Input</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Permanent Link: Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This will make a Java global object:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.File</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.IOException</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLite</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLiteConnection</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLiteException</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLiteJob</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLiteQueue</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.almworks.sqlite4java.SQLiteStatement</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> DataAccess <span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">// Singleton Stuff</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">class</span> SingletonHolder <span style="color: #009900;">&#123;</span> 
	     <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> DataAccess INSTANCE <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DataAccess<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> DataAccess getInstance<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	     <span style="color: #000000; font-weight: bold;">return</span> SingletonHolder.<span style="color: #006633;">INSTANCE</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #666666; font-style: italic;">// End Singleton Stuff</span>
&nbsp;
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> HomePath <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">File</span> DBFile<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> SQLiteQueue queue<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">boolean</span> initalized <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> DataAccess<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>initalized<span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			initDB<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			initalized <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> initDB<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		DBFile <span style="color: #339933;">=</span> locateDBFile<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		DeleteDatabaseContents<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">File</span> locateDBFile<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #003399;">File</span> f <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
			HomePath <span style="color: #339933;">=</span> <span style="color: #003399;">System</span>.<span style="color: #006633;">getProperty</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;user.home&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    	    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;HomePath: &quot;</span> <span style="color: #339933;">+</span> HomePath<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    	    f <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">File</span><span style="color: #009900;">&#40;</span>HomePath <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;/database.sqlite&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    	    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>f.<span style="color: #006633;">canRead</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    	    	<span style="color: #000000; font-weight: bold;">return</span> f<span style="color: #339933;">;</span>
    	    <span style="color: #000000; font-weight: bold;">else</span>
    	    <span style="color: #009900;">&#123;</span>
        	    <span style="color: #000066; font-weight: bold;">boolean</span> success <span style="color: #339933;">=</span> f.<span style="color: #006633;">createNewFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        	    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>success<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        	        <span style="color: #666666; font-style: italic;">// File did not exist and was created</span>
        	    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
        	        <span style="color: #666666; font-style: italic;">// File already exists</span>
&nbsp;
        	    <span style="color: #009900;">&#125;</span>
    	    <span style="color: #009900;">&#125;</span>
    	<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    		<span style="color: #666666; font-style: italic;">//Maybe try a new directory.</span>
    	<span style="color: #009900;">&#125;</span>
		<span style="color: #000000; font-weight: bold;">return</span> f<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> DeleteDatabaseContents<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		queue.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> SQLiteJob<span style="color: #339933;">&lt;</span>Object<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
		<span style="color: #009900;">&#123;</span>
		    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #003399;">Object</span> job<span style="color: #009900;">&#40;</span>SQLiteConnection connection<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> SQLiteException 
		    <span style="color: #009900;">&#123;</span>
		      <span style="color: #666666; font-style: italic;">// this method is called from database thread and passed the connection</span>
				StringBuilder sb <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> StringBuilder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DROP TABLE IF EXISTS Playlist;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DROP TABLE IF EXISTS Settings;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #666666; font-style: italic;">//sb.append(&quot;DELETE FROM someTable;&quot;);</span>
				<span style="color: #666666; font-style: italic;">//sb.append(&quot;DELETE FROM someTable;&quot;);</span>
&nbsp;
&nbsp;
				connection.<span style="color: #006633;">exec</span><span style="color: #009900;">&#40;</span>sb.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
		    <span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getHomePath<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> HomePath<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Now you can run this from anywhere:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">DataAccess da<span style="color: #339933;">;</span>
da <span style="color: #339933;">=</span> DataAccess.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Source: http://en.wikipedia.org/wiki/Singleton_pattern</p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2008/08/11/python-cell-phone-number-pad-input/' rel='bookmark' title='Permanent Link: Python &#8211; Cell Phone Number Pad Input'>Python &#8211; Cell Phone Number Pad Input</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/' rel='bookmark' title='Permanent Link: Override the window.onload javascript function'>Override the window.onload javascript function</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/05/20/java-singleton-global-data-access-sqlite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>PHP API &#8211; Google Calendar &#8211; Updating Visibility</title>
		<link>http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/</link>
		<comments>http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/#comments</comments>
		<pubDate>Fri, 13 May 2011 15:02:15 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Calendar]]></category>
		<category><![CDATA[ClientLogin]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[event.private]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[gcalendar]]></category>
		<category><![CDATA[Gdata]]></category>
		<category><![CDATA[http://schemas.google.com/g/2005#event.private]]></category>
		<category><![CDATA[http://www.google.com/calendar/feeds/default/private]]></category>
		<category><![CDATA[newEventQuery]]></category>
		<category><![CDATA[private]]></category>
		<category><![CDATA[save()]]></category>
		<category><![CDATA[setVisibility]]></category>
		<category><![CDATA[Visibility]]></category>
		<category><![CDATA[visibility->value]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Zend_Gdata]]></category>
		<category><![CDATA[Zend_Gdata_Calendar]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1053</guid>
		<description><![CDATA[The Privacy / Visibility Part: $event-&#62;visibility-&#62;value = &#34;http://schemas.google.com/g/2005#event.private&#34;; Here it is in context: require_once 'Zend/Gdata/Extension/Visibility.php'; require_once 'Zend/Loader.php'; Zend_Loader::loadClass&#40;'Zend_Gdata'&#41;; Zend_Loader::loadClass&#40;'Zend_Gdata_AuthSub'&#41;; Zend_Loader::loadClass&#40;'Zend_Gdata_ClientLogin'&#41;; Zend_Loader::loadClass&#40;'Zend_Gdata_Calendar'&#41;; &#160; $user = 'GOOGLEUSERNAME@gmail.com'; $pass = 'GOOGLEPASSWORD'; $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined service name for calendar $client = Zend_Gdata_ClientLogin::getHttpClient&#40;$user,$pass,$service&#41;; &#160; function outputCalendarByURL&#40;$client,$url&#41; &#123; $retVal = false; $gdataCal = new Zend_Gdata_Calendar&#40;$client&#41;; $query = $gdataCal-&#62;newEventQuery&#40;&#41;; $query-&#62;setUser&#40;'default'&#41;; [...]


Related posts:<ol><li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='Permanent Link: PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/' rel='bookmark' title='Permanent Link: Pitchfork &#039;Best New Albums&#039; Torrent Search'>Pitchfork &#039;Best New Albums&#039; Torrent Search</a></li>
<li><a href='http://danfolkes.com/2009/03/31/cws-chord-web-service/' rel='bookmark' title='Permanent Link: CWS &#8211; Chord Web Service'>CWS &#8211; Chord Web Service</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>The Privacy / Visibility Part:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">visibility</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://schemas.google.com/g/2005#event.private&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Here it is in context:<span id="more-1053"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'Zend/Gdata/Extension/Visibility.php'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'Zend/Loader.php'</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata_AuthSub'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata_ClientLogin'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Gdata_Calendar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GOOGLEUSERNAME@gmail.com'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$pass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GOOGLEPASSWORD'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$service</span> <span style="color: #339933;">=</span> Zend_Gdata_Calendar<span style="color: #339933;">::</span><span style="color: #004000;">AUTH_SERVICE_NAME</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// predefined service name for calendar</span>
<span style="color: #000088;">$client</span> <span style="color: #339933;">=</span> Zend_Gdata_ClientLogin<span style="color: #339933;">::</span><span style="color: #004000;">getHttpClient</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #339933;">,</span><span style="color: #000088;">$pass</span><span style="color: #339933;">,</span><span style="color: #000088;">$service</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> outputCalendarByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$retVal</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newEventQuery</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setUser</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'default'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setVisibility</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'private'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setProjection</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'full'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setOrderby</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'starttime'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$eventFeed</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventFeed</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$eventFeed</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$event</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Title: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span>  <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">//print_r($event);</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">when</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$when</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">//print_r($when);</span>
		  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Starts: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$when</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">startTime</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Ends: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$when</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">endTime</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;/ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Content: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;li&gt;Link: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;input type=<span style="color: #000099; font-weight: bold;">\&quot;</span>hidden<span style="color: #000099; font-weight: bold;">\&quot;</span> value=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> name=<span style="color: #000099; font-weight: bold;">\&quot;</span>eid<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$retVal</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$retVal</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> getEventByURL <span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$eventOld</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$service</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventEntry</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Title: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eventOld</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> updateEventsByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$newTitle</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$eventFeed</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventFeed</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$eventFeed</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$event</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newTitle</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$newTitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newContent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Updated by: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">visibility</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://schemas.google.com/g/2005#event.private&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> getEventByURL <span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$eventOld</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$service</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventEntry</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Title: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eventOld</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> updateEventsByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #000088;">$newTitle</span><span style="color: #339933;">,</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$gdataCal</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Gdata_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$eventFeed</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendarEventFeed</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$eventFeed</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$event</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$EventURL</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newTitle</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$newTitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gdataCal</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">newContent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Updated by: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">visibility</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://schemas.google.com/g/2005#event.private&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$event</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
updateEventsByURL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Events New Title&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;http://www.google.com/calendar/feeds/default/private/full/URLOFeventFROMevent_ID&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='Permanent Link: PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/' rel='bookmark' title='Permanent Link: Pitchfork &#039;Best New Albums&#039; Torrent Search'>Pitchfork &#039;Best New Albums&#039; Torrent Search</a></li>
<li><a href='http://danfolkes.com/2009/03/31/cws-chord-web-service/' rel='bookmark' title='Permanent Link: CWS &#8211; Chord Web Service'>CWS &#8211; Chord Web Service</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
	</item>
		<item>
		<title>Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart</title>
		<link>http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/</link>
		<comments>http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 23:57:12 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=975</guid>
		<description><![CDATA[This is the script I use that will: Automatically backup minecraft map Automatically update minecraft server Automatically restart the server if it stops or dies #!/bin/bash while &#91; true &#93;; do # make md5 of current file for update check. md5sum minecraft_server.jar &#62; minecraft_server.jar.md5 wget -o updatelog.log -N --trust-server-names http://www.minecraft.net/download/minecraft_server.jar # display updated status if [...]


Related posts:<ol><li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='Permanent Link: PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Permanent Link: Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/' rel='bookmark' title='Permanent Link: PHP API &#8211; Google Calendar &#8211; Updating Visibility'>PHP API &#8211; Google Calendar &#8211; Updating Visibility</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is the script I use that will: </p>
<ul>
<li>Automatically backup minecraft map</li>
<li>Automatically update minecraft server</li>
<li>Automatically restart the server if it stops or dies</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #c20cb9; font-weight: bold;">true</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span>
   <span style="color: #666666; font-style: italic;"># make md5 of current file for update check.</span>
   md5sum minecraft_server.jar <span style="color: #000000; font-weight: bold;">&gt;</span> minecraft_server.jar.md5
   <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-o</span> updatelog.log <span style="color: #660033;">-N</span> <span style="color: #660033;">--trust-server-names</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.minecraft.net<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>minecraft_server.jar
   <span style="color: #666666; font-style: italic;"># display updated status</span>
   <span style="color: #000000; font-weight: bold;">if</span> md5sum <span style="color: #660033;">-c</span> <span style="color: #660033;">--status</span> minecraft_server.jar.md5 
   <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Server Up to Date.&quot;</span>
   <span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Updated Server!&quot;</span>
   <span style="color: #000000; font-weight: bold;">fi</span>
   java <span style="color: #660033;">-Xmx1024M</span> <span style="color: #660033;">-Xms1024M</span> <span style="color: #660033;">-jar</span> minecraft_server.jar nogui
   rsync <span style="color: #660033;">-a</span> <span style="color: #660033;">--delete</span> <span style="color: #660033;">--progress</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>dan<span style="color: #000000; font-weight: bold;">/</span>serv<span style="color: #000000; font-weight: bold;">/</span>minecraft<span style="color: #000000; font-weight: bold;">/</span>world <span style="color: #ff0000;">&quot;/home/dan/serv/minecraft/bak/world&quot;</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #000000; font-weight: bold;">%</span>d<span style="color: #000000; font-weight: bold;">`</span><span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>Code Explained: </p>
<p>This will put the server in an infinite loop.  You can kill it by hitting Control+C a couple times in a row.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #c20cb9; font-weight: bold;">true</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span></pre></div></div>

<p>This will make a hash of the current minecraft_server.jar and then download the newest copy using wget.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">md5sum minecraft_server.jar <span style="color: #000000; font-weight: bold;">&gt;</span> minecraft_server.jar.md5
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-o</span> updatelog.log <span style="color: #660033;">-N</span> <span style="color: #660033;">--trust-server-names</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.minecraft.net<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>minecraft_server.jar</pre></div></div>

<p>This will run minecraft in headless mode and with a limit on RAM.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">java <span style="color: #660033;">-Xmx1024M</span> <span style="color: #660033;">-Xms1024M</span> <span style="color: #660033;">-jar</span> minecraft_server.jar nogui</pre></div></div>

<p>This will create a backup of the minecraft world folder in a backup folder. You probably should work on this part.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">-a</span> <span style="color: #660033;">--delete</span> <span style="color: #660033;">--progress</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>minecraft<span style="color: #000000; font-weight: bold;">/</span>world <span style="color: #ff0000;">&quot;/path/to/minecraft/bak/world&quot;</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #c20cb9; font-weight: bold;">date</span></pre></div></div>

<p>Well, hope this helps someone.  Have a good day.</p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='Permanent Link: PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Permanent Link: Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/' rel='bookmark' title='Permanent Link: PHP API &#8211; Google Calendar &#8211; Updating Visibility'>PHP API &#8211; Google Calendar &#8211; Updating Visibility</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Rsync &#8211; Speed Limit &#8211; Trickle &#8211; Slow</title>
		<link>http://danfolkes.com/2011/03/03/rsync-speed-limit-trickle-slow/</link>
		<comments>http://danfolkes.com/2011/03/03/rsync-speed-limit-trickle-slow/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 16:25:58 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[auvPe]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[decrease]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[increase]]></category>
		<category><![CDATA[KB/s]]></category>
		<category><![CDATA[Limit]]></category>
		<category><![CDATA[Limit Speed]]></category>
		<category><![CDATA[newer]]></category>
		<category><![CDATA[Rsync]]></category>
		<category><![CDATA[skip]]></category>
		<category><![CDATA[Slow]]></category>
		<category><![CDATA[Speed]]></category>
		<category><![CDATA[Speed Limit]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Trickle]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=864</guid>
		<description><![CDATA[Install rsync and trickle: sudo apt-get install rsync sudo apt-get install trickle Now you can run rsync: This will download at a limit of 80 KB/s from host: rsync -auvPe &#34;trickle -d 80 ssh&#34; user@host:/src/ /dst/ Explanation of Commands: -a, --archive archive mode; equals -rlptgoD &#40;no -H,-A,-X&#41; -u, --update skip files that are newer on [...]


Related posts:<ol><li><a href='http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/' rel='bookmark' title='Permanent Link: Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart'>Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart</a></li>
<li><a href='http://danfolkes.com/2011/09/03/free-webcam-security-dorgem-winscp/' rel='bookmark' title='Permanent Link: Free Webcam Security &#8211; Dorgem &#8211; WinSCP'>Free Webcam Security &#8211; Dorgem &#8211; WinSCP</a></li>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Permanent Link: Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Install rsync and trickle:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> rsync
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> trickle</pre></div></div>

<p>Now you can run rsync:<br />
This will download at a limit of 80 KB/s from host:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">-auvPe</span> <span style="color: #ff0000;">&quot;trickle -d 80 ssh&quot;</span> user<span style="color: #000000; font-weight: bold;">@</span>host:<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>dst<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Explanation of Commands:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">-a, <span style="color: #660033;">--archive</span>               archive mode; equals <span style="color: #660033;">-rlptgoD</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>no -H,-A,-X<span style="color: #7a0874; font-weight: bold;">&#41;</span>
-u, <span style="color: #660033;">--update</span>                skip files that are newer on the receiver
-v, <span style="color: #660033;">--verbose</span>               increase verbosity
<span style="color: #660033;">-P</span>  <span style="color: #660033;">--progress</span>              show progress during transfer
-e, <span style="color: #660033;">--rsh</span>=COMMAND           specify the remote shell to use
trickle <span style="color: #660033;">-d</span> <span style="color: #000000;">80</span>  = <span style="color: #660033;">-d</span> rate    Limit the download bandwidth consumption to rate KB<span style="color: #000000; font-weight: bold;">/</span>s.</pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/' rel='bookmark' title='Permanent Link: Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart'>Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart</a></li>
<li><a href='http://danfolkes.com/2011/09/03/free-webcam-security-dorgem-winscp/' rel='bookmark' title='Permanent Link: Free Webcam Security &#8211; Dorgem &#8211; WinSCP'>Free Webcam Security &#8211; Dorgem &#8211; WinSCP</a></li>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Permanent Link: Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/03/03/rsync-speed-limit-trickle-slow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Outlook Rule : Only at Specific Times</title>
		<link>http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/</link>
		<comments>http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 16:20:29 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[after]]></category>
		<category><![CDATA[after hour]]></category>
		<category><![CDATA[after time]]></category>
		<category><![CDATA[certain time]]></category>
		<category><![CDATA[create rule]]></category>
		<category><![CDATA[creating a rule]]></category>
		<category><![CDATA[creating a rule in outlook]]></category>
		<category><![CDATA[forward outlook]]></category>
		<category><![CDATA[hours]]></category>
		<category><![CDATA[outlook email]]></category>
		<category><![CDATA[outlook rules]]></category>
		<category><![CDATA[receive emails]]></category>
		<category><![CDATA[redirect emails]]></category>
		<category><![CDATA[rule in outlook]]></category>
		<category><![CDATA[selected days]]></category>
		<category><![CDATA[specific time]]></category>
		<category><![CDATA[specific times]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=846</guid>
		<description><![CDATA[Lets say you want to have a rule in outlook send to you only between specific times in the day. Only after 6pm and before 8am Only on your lunch hour When you are not at work I will explain this by having emails forward to my cell phone, only when I am normally not [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/' rel='bookmark' title='Permanent Link: TikiWiki &#8211; Tracker Email Subject Improvement-Modification'>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/02/Outlook_Rule_Specific_Times.jpg" alt="" title="Outlook Rule Specific Times" width="444" height="386" class="alignnone size-full wp-image-852" /></p>
<p>Lets say you want to have a rule in outlook send to you only <strong>between specific times in the day</strong>.</p>
<ul>
<li><strong>Only after 6pm and before 8am</strong></li>
<li>Only on your lunch hour</li>
<li>When you are not at work</li>
</ul>
<p>I will explain this by having emails forward to my cell phone, only when I am normally not at the office. (From 6pm-8am) This way, I will be able to receive important emails that may require special outside assistance.</p>
<p><strong>What I do is:</strong></p>
<ul>
<li>Create a special category called FWD</li>
<li>Use other rules to set messages into the FWD category if I want them forwarded. (Explained Below)</li>
<li>Then, create a rule to run last in the rules list called FWD Rule</li>
<li><strong>*Important Part*</strong> This will check the time on the messages, if it&#8217;s within the specified hours, it will forward the email (Explained Below)</li>
</ul>
<p><strong>Creating a Rule to set the FWD Category:</strong><br />
Your <strong>Rule Description</strong> should look something like this. The important part is that it is assigning it to the FWD Category:</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">Apply this rule after the message arrives
with 'Emergency from client' in the subject
    and marked as 'high importance'
    and assigned to 'FWD' Category</pre></div></div>

<p>The Rule that will email header* for UTC times.  Make sure it&#8217;s assigned to the FWD category. And then FWD it:</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">Apply this rule after the message arrives
with '2011 23:' or '2011 02:' or ... '2011 10:' in the message header
    and assigned to 'FWD' category
forward it to 'email@example.com'</pre></div></div>

<p>* This should work on most emails, but if you want to look at the email header Right-click on the message in the Inbox and select Message Options.<br />
* I included the 2011 and the colon to make it more specific.</p>
<p>UTC Time for 6pm &#8211; 8am:<br />
Email Header contained:<br />
   X-OriginalArrivalTime: 18 Feb 2011 03:23:52.0368 (UTC)<br />
So I searched for:</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">2011 23:,2011 01:,2011 02:,2011 03:,2011 04:,2011 05:,2011 06:,2011 07:,2011 08:,2011 09:,2011 10:,2011 11:</pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/' rel='bookmark' title='Permanent Link: TikiWiki &#8211; Tracker Email Subject Improvement-Modification'>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/02/Outlook_Rule_Specific_Times-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2011/02/Outlook_Rule_Specific_Times.jpg" medium="image">
			<media:title type="html">Outlook Rule Specific Times</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/02/Outlook_Rule_Specific_Times-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success</title>
		<link>http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/</link>
		<comments>http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 16:20:56 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=828</guid>
		<description><![CDATA[Here is the standard jQuery Ajax call with success handler as well as the ability to pass another parameter to an external function: $.ajax&#40;&#123; type: &#34;GET&#34;, url: Humancurl, dataType: &#34;xml&#34;, success: function&#40;data&#41;&#123; NameOfFunctionToParseReturnedData&#40;data,ExtraParameter&#41;; &#125; &#125;&#41;; Here is the standard jquery ajax call with success handler: $.ajax&#40;&#123; url: 'ajax/test.html', success: function&#40;data&#41; &#123; $&#40;'.result'&#41;.html&#40;data&#41;; alert&#40;'Load was performed.'+data&#41;; [...]


Related posts:<ol><li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Permanent Link: Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2010/04/jquery-selectors.jpg" alt="" title="jquery-ajax" width="377" height="272" class="alignnone size-full wp-image-559" /></p>
<p>Here is the standard jQuery Ajax call with success handler as well as the ability to pass another parameter to an external function:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	$.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
			type<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span>
			url<span style="color: #339933;">:</span> Humancurl<span style="color: #339933;">,</span>
			dataType<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;xml&quot;</span><span style="color: #339933;">,</span>
			success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				NameOfFunctionToParseReturnedData<span style="color: #009900;">&#40;</span>data<span style="color: #339933;">,</span>ExtraParameter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Here is the standard jquery ajax call with success handler:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
  url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'ajax/test.html'</span><span style="color: #339933;">,</span>
  success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.result'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Load was performed.'</span><span style="color: #339933;">+</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2012/02/03/web-service-using-jsonp-from-external-domain-php-jquery/' rel='bookmark' title='Permanent Link: Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery'>Web Service using JSONP from External Domain &#8211; PHP &#8211; JQuery</a></li>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/04/jquery-selectors-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2010/04/jquery-selectors.jpg" medium="image">
			<media:title type="html">jquery-ajax</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/04/jquery-selectors-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount</title>
		<link>http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/</link>
		<comments>http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 21:13:04 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[/etc/fstab]]></category>
		<category><![CDATA[/etc/samba/smb.conf]]></category>
		<category><![CDATA[777]]></category>
		<category><![CDATA[allow]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[chown]]></category>
		<category><![CDATA[chown cifs]]></category>
		<category><![CDATA[Cifs]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[FSTAB]]></category>
		<category><![CDATA[fstab cifs mount write]]></category>
		<category><![CDATA[fstab no cifs support]]></category>
		<category><![CDATA[guests]]></category>
		<category><![CDATA[invalid users = root]]></category>
		<category><![CDATA[Maverick]]></category>
		<category><![CDATA[Maverick Meerkat]]></category>
		<category><![CDATA[Meerkat]]></category>
		<category><![CDATA[Mount]]></category>
		<category><![CDATA[noatime]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[read only = no]]></category>
		<category><![CDATA[read/write]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[smb.conf]]></category>
		<category><![CDATA[smbd]]></category>
		<category><![CDATA[sudo apt-get install samba]]></category>
		<category><![CDATA[sudo mount -a]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[username]]></category>
		<category><![CDATA[usershare]]></category>
		<category><![CDATA[usershare allow guests = yes]]></category>
		<category><![CDATA[valid users]]></category>
		<category><![CDATA[writable]]></category>
		<category><![CDATA[writable = yes]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=724</guid>
		<description><![CDATA[This is my current setup for my two Ubuntu 10.10 (Maverick Meerkat) boxes. One shares a read/write folder to the other. This is my setup. I think the key to this is having the same username on both computers having access to the files. You might have to run this on the the folder: sudo [...]


Related posts:<ol><li><a href='http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/' rel='bookmark' title='Permanent Link: Quick n Easy &#8211; Forms Authentication &#8211; Web.conf'>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2011/09/03/free-webcam-security-dorgem-winscp/' rel='bookmark' title='Permanent Link: Free Webcam Security &#8211; Dorgem &#8211; WinSCP'>Free Webcam Security &#8211; Dorgem &#8211; WinSCP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/01/Samba-SMBd-FSTAB-Ubuntu.gif" alt="" title="Samba-SMBd-FSTAB-Ubuntu" width="373" height="297" class="alignnone size-full wp-image-727" /><br />
This is my current setup for my two Ubuntu 10.10 (Maverick Meerkat) boxes.  One shares a read/write folder to the other. This is my setup.  I think the key to this is having the same username on  both  computers having access to the files.</p>
<p>You might have to run this on the the folder:<br />
<strong>sudo chmod -R 777 /path/to/files</strong><br />
<strong>sudo chown -R usernameonbothcomputers:usernameonbothcomputers /path/to/files</strong></p>
<p>I installed samba by doing: <strong>sudo apt-get install samba</strong></p>
<p><strong>/etc/samba/smb.conf</strong> :  (on the computer serving the files)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>global<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	workgroup = WORKGROUP
	server string = <span style="color: #000000; font-weight: bold;">%</span>h server <span style="color: #7a0874; font-weight: bold;">&#40;</span>Samba, Ubuntu<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	dns proxy = no
&nbsp;
	interfaces = 127.0.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span> eth0
	<span style="color: #7a0874; font-weight: bold;">bind</span> interfaces only = <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
	log <span style="color: #c20cb9; font-weight: bold;">file</span> = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>samba<span style="color: #000000; font-weight: bold;">/</span>log.<span style="color: #000000; font-weight: bold;">%</span>m
	max log <span style="color: #c20cb9; font-weight: bold;">size</span> = <span style="color: #000000;">1000</span>
	syslog = <span style="color: #000000;">0</span>
&nbsp;
	panic action = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>samba<span style="color: #000000; font-weight: bold;">/</span>panic-action <span style="color: #000000; font-weight: bold;">%</span>d
	encrypt passwords = <span style="color: #c20cb9; font-weight: bold;">true</span>
	passdb backend = tdbsam
	obey pam restrictions = <span style="color: #c20cb9; font-weight: bold;">yes</span>
	unix password <span style="color: #c20cb9; font-weight: bold;">sync</span> = <span style="color: #c20cb9; font-weight: bold;">yes</span>
	<span style="color: #c20cb9; font-weight: bold;">passwd</span> program = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">passwd</span> <span style="color: #000000; font-weight: bold;">%</span>u
	<span style="color: #c20cb9; font-weight: bold;">passwd</span> chat = <span style="color: #000000; font-weight: bold;">*</span>Enter\snew\s<span style="color: #000000; font-weight: bold;">*</span>\spassword:<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">%</span>n\n <span style="color: #000000; font-weight: bold;">*</span>Retype\snew\s<span style="color: #000000; font-weight: bold;">*</span>\spassword:<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">%</span>n\n <span style="color: #000000; font-weight: bold;">*</span>password\supdated\ssuccessfully<span style="color: #000000; font-weight: bold;">*</span> .
	pam password change = <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
	guest account = nobody
	invalid <span style="color: #c20cb9; font-weight: bold;">users</span> = root
	usershare allow guests = <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>MyFiles<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	path = <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>share
	writable = <span style="color: #c20cb9; font-weight: bold;">yes</span>
	<span style="color: #c20cb9; font-weight: bold;">read</span> only = no
	valid <span style="color: #c20cb9; font-weight: bold;">users</span> = usernameonbothcomputers</pre></div></div>

<p><strong>sudo /etc/init.d/smbd reload</strong></p>
<p><strong>/etc/fstab</strong> :  (on the computer accessing the files)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">//</span>SAMBASHAREsSERVERNAME<span style="color: #000000; font-weight: bold;">/</span>MyFiles <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">mount</span> cifs <span style="color: #c20cb9; font-weight: bold;">users</span>,,noatime,<span style="color: #007800;">username</span>=usernameonbothcomputers,<span style="color: #007800;">password</span>=theuserspassword <span style="color: #000000;">0</span> <span style="color: #000000;">0</span></pre></div></div>

<p>You should be able to run this to mount all things in your fstab:<br />
<strong>sudo mount -a </strong></p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/' rel='bookmark' title='Permanent Link: Quick n Easy &#8211; Forms Authentication &#8211; Web.conf'>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2011/09/03/free-webcam-security-dorgem-winscp/' rel='bookmark' title='Permanent Link: Free Webcam Security &#8211; Dorgem &#8211; WinSCP'>Free Webcam Security &#8211; Dorgem &#8211; WinSCP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/01/Samba-SMBd-FSTAB-Ubuntu-150x150.gif" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2011/01/Samba-SMBd-FSTAB-Ubuntu.gif" medium="image">
			<media:title type="html">Samba-SMBd-FSTAB-Ubuntu</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2011/01/Samba-SMBd-FSTAB-Ubuntu-150x150.gif" />
		</media:content>
	</item>
		<item>
		<title>.Net &#8211; Sending Email with In Memory Attachment</title>
		<link>http://danfolkes.com/2010/12/21/net-sending-email-with-in-memory-attachment/</link>
		<comments>http://danfolkes.com/2010/12/21/net-sending-email-with-in-memory-attachment/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 16:43:32 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[attaches]]></category>
		<category><![CDATA[attachment]]></category>
		<category><![CDATA[Attachments]]></category>
		<category><![CDATA[Attachments.Add]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[FileUpload]]></category>
		<category><![CDATA[InputStream]]></category>
		<category><![CDATA[IsBodyHtml]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[MailAddress]]></category>
		<category><![CDATA[MailMessage]]></category>
		<category><![CDATA[Message]]></category>
		<category><![CDATA[PostedFile]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[read/write]]></category>
		<category><![CDATA[Send]]></category>
		<category><![CDATA[SmtpClient]]></category>
		<category><![CDATA[subject]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[vb.net]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=707</guid>
		<description><![CDATA[This VB.Net code takes the FileUpload control&#8217;s PostedFile and without saving it to the filesystem attaches it to an MailMessage and sends an email. Advantages: No threading, read/write permissions needed. One line of code. Front End: &#60;asp:FileUpload ID=&#34;fileUpload&#34; runat=&#34;server&#34; /&#62; Code: Dim m As New MailMessage() m.Attachments.Add(New Attachment(fileUpload.PostedFile.InputStream, fileUpload.FileName)) Related posts:TikiWiki &#8211; Tracker Email Subject [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/' rel='bookmark' title='Permanent Link: TikiWiki &#8211; Tracker Email Subject Improvement-Modification'>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2010/12/Sending_Email_with_In_Memory_Attachment.jpg" alt="" title="Sending_Email_with_In_Memory_Attachment" width="360" height="103" class="alignnone size-full wp-image-721" /></p>
<p>This VB.Net code takes the FileUpload control&#8217;s PostedFile and without saving it to the filesystem attaches it to an MailMessage and sends an email.</p>
<p>Advantages:</p>
<ul>
<li>No threading, read/write permissions needed.</li>
<li>One line of code.</li>
</ul>
<p>Front End:</p>
<pre>
&lt;asp:FileUpload ID=&quot;fileUpload&quot; runat=&quot;server&quot; /&gt;
</pre>
<p>Code:</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #151B8D; font-weight: bold;">Dim</span> m <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> MailMessage()
m.Attachments.Add(<span style="color: #E56717; font-weight: bold;">New</span> Attachment(fileUpload.PostedFile.InputStream, fileUpload.FileName))</pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/' rel='bookmark' title='Permanent Link: TikiWiki &#8211; Tracker Email Subject Improvement-Modification'>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/12/21/net-sending-email-with-in-memory-attachment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/12/Sending_Email_with_In_Memory_Attachment-150x103.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2010/12/Sending_Email_with_In_Memory_Attachment.jpg" medium="image">
			<media:title type="html">Sending_Email_with_In_Memory_Attachment</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/12/Sending_Email_with_In_Memory_Attachment-150x103.jpg" />
		</media:content>
	</item>
		<item>
		<title>Pitchfork &#039;Best New Albums&#039; Torrent Search</title>
		<link>http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/</link>
		<comments>http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 16:41:43 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=623</guid>
		<description><![CDATA[Ok so this might be slightly illegal, but I am really just generating some links. I wrote some code that will take the RSS feed from this page: http://pitchfork.com/reviews/best/albums/ and searches BTJunkie for torrents. Here it is in action: http://danfolkes.com/pitchfork_torrent_albums_best/ Here is the source: (also here) 1 2 3 4 5 6 7 8 9 [...]


Related posts:<ol><li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Permanent Link: Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/' rel='bookmark' title='Permanent Link: PHP API &#8211; Google Calendar &#8211; Updating Visibility'>PHP API &#8211; Google Calendar &#8211; Updating Visibility</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/pitchfork_torrent_albums_best/"><img src="http://danfolkes.com/wp-content/uploads/2010/09/Pitchfork_Best_new_Music_BTJunkie_Search.jpg" alt="Pitchfork_Best_new_Music_BTJunkie_Search" title="Pitchfork_Best_new_Music_BTJunkie_Search" width="400" class="alignnone size-full" /></a></p>
<p>Ok so this might be slightly illegal, but I am really just generating some links.</p>
<p>I wrote some code that will take the RSS feed from this page: <a href="http://pitchfork.com/reviews/best/albums/">http://pitchfork.com/reviews/best/albums/</a> and searches BTJunkie for torrents.</p>
<blockquote><p><strong>Here it is in action:<br />
<a href="http://danfolkes.com/pitchfork_torrent_albums_best/">http://danfolkes.com/pitchfork_torrent_albums_best/</a></strong></p></blockquote>
<p>Here is the source: (also <a href="http://danfolkes.com/pitchfork_torrent_albums_best/source.txt">here</a>)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;table border=1&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$doc</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DOMDocument<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://feeds2.feedburner.com/PitchforkBestNewAlbums'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'item'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$node</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;tr&gt;&lt;th colspan='2'&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$title</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$doc2</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DOMDocument<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	<span style="color: #000088;">$doc2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://btjunkie.org/rss.xml?query=&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/th&gt;&lt;/tr&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$doc2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'item'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$node2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$node2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'link'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' target='_blank'&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$link</span><span style="color: #339933;">.=</span> <span style="color: #000088;">$node2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$link</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/td&gt;&lt;/tr&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
  <span style="color: #666666; font-style: italic;">//print_r($arrFeeds);</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/table&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Permanent Link: Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2011/05/13/php-api-google-calendar-updating-visibility/' rel='bookmark' title='Permanent Link: PHP API &#8211; Google Calendar &#8211; Updating Visibility'>PHP API &#8211; Google Calendar &#8211; Updating Visibility</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/09/21/pitchfork-best-new-albums-torrent-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/09/Pitchfork_Best_new_Music_BTJunkie_Search.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2010/09/Pitchfork_Best_new_Music_BTJunkie_Search.jpg" medium="image">
			<media:title type="html">Pitchfork_Best_new_Music_BTJunkie_Search</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP Base64_Encode &#8211; Intentionally screwing up pictures</title>
		<link>http://danfolkes.com/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/</link>
		<comments>http://danfolkes.com/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 20:48:18 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[base 64]]></category>
		<category><![CDATA[base 64 encode]]></category>
		<category><![CDATA[base64]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[decode]]></category>
		<category><![CDATA[fread]]></category>
		<category><![CDATA[gif]]></category>
		<category><![CDATA[jpeg]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=608</guid>
		<description><![CDATA[So, I was a little bored so I made some PHP code. This is what it does: Takes query string values Pulls an image from the web base64_encodes it. Distorts the image. Replaces some of the base64 string data with other string data. Outputs the image in an img tag. Hope this helps someone, let [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/01/05/corelaborate-document-elaboration-on-the-core-formats/' rel='bookmark' title='Permanent Link: CoreLaborate &#8211; Document Elaboration on the Core Formats'>CoreLaborate &#8211; Document Elaboration on the Core Formats</a></li>
<li><a href='http://danfolkes.com/2009/12/01/youtube-comments-something-must-be-done/' rel='bookmark' title='Permanent Link: YouTube Comments &#8211; Something must be done!'>YouTube Comments &#8211; Something must be done!</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div id="attachment_611" class="wp-caption alignnone" style="width: 650px"><a href="http://danfolkes.com/index.php/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/index/" rel="attachment wp-att-611"><img src="http://danfolkes.com/wp-content/uploads/2010/09/index.jpg" alt="A screwed up base64 image.  Replaced all of the 'da' with 'ha'" title="index" width="640" height="427" class="size-full wp-image-611" /></a><p class="wp-caption-text">A screwed up base64 image. Replaced all of the 'da' with 'ha'</p></div>
<p>So, I was a little bored so I made some PHP code.</p>
<p>This is what it does:</p>
<ul>
<li>Takes query string values</li>
<li>Pulls an image from the web</li>
<li>base64_encodes it.</li>
<li>Distorts the image.</li>
<li>Replaces some of the base64 string data with other string data.</li>
<li>Outputs the image in an img tag.</li>
</ul>
<p><b>Hope this helps someone, <em>let me know if it does IN THE COMMENTS</em></b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'i'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'f'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;&amp;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$find</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'f'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$replace</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;gif&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'t'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$type</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'t'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$imgfile</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'i'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$contents</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$imgfile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$start</span> <span style="color: #339933;">=</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$contents</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
		<span style="color: #000088;">$start</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_ireplace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$find</span><span style="color: #339933;">,</span> <span style="color: #000088;">$replace</span><span style="color: #339933;">,</span> <span style="color: #000088;">$start</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;img src=&quot;data:image/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$type</span><span style="color: #339933;">.</span><span style="color: #0000ff;">';base64,'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$start</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; /&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
		Try: &lt;a href='base64.php?i=http://ec.europa.eu/culture/media/programme/images/logos/02/02.gif17.gif&amp;f=lo&amp;r=ha&amp;t=gif'&gt;http://ec.europa.eu/culture/media/programme/images/logos/02/02.gif17.gif&amp;f=lo&amp;re=ha&amp;t=gif&lt;/a&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/01/05/corelaborate-document-elaboration-on-the-core-formats/' rel='bookmark' title='Permanent Link: CoreLaborate &#8211; Document Elaboration on the Core Formats'>CoreLaborate &#8211; Document Elaboration on the Core Formats</a></li>
<li><a href='http://danfolkes.com/2009/12/01/youtube-comments-something-must-be-done/' rel='bookmark' title='Permanent Link: YouTube Comments &#8211; Something must be done!'>YouTube Comments &#8211; Something must be done!</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/09/15/php-base64_encode-intentionally-screwing-up-pictures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/09/index-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2010/09/index.jpg" medium="image">
			<media:title type="html">index</media:title>
			<media:description type="html">A screwed up base64 image.</media:description>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/09/index-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</title>
		<link>http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/</link>
		<comments>http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 19:51:40 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[authorization]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[conf]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Forms Authentication]]></category>
		<category><![CDATA[location]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[Quick]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[vb.net]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Web.conf]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=574</guid>
		<description><![CDATA[I use the login page from here: http://www.15seconds.com/issue/020220.htm &#60;!-- Web.Config Configuration File --&#62; &#160; &#60;configuration&#62; &#160; &#60;system.web&#62; &#60;customErrors mode=&#34;Off&#34;/&#62; &#60;compilation debug=&#34;true&#34;/&#62; &#160; &#60;authentication mode=&#34;Forms&#34;&#62; &#60;forms loginUrl=&#34;FeedBack_Admin/login.aspx&#34; protection=&#34;All&#34; timeout=&#34;30&#34;&#62; &#60;credentials passwordFormat=&#34;Clear&#34;&#62; &#60;user name=&#34;admin&#34; password=&#34;pass&#34;/&#62; &#60;/credentials&#62; &#60;/forms&#62; &#60;/authentication&#62; &#60;authorization&#62; &#60;allow users=&#34;*&#34; /&#62; &#60;/authorization&#62; &#60;/system.web&#62; &#160; &#60;location path=&#34;FeedBack_Admin&#34;&#62; &#60;system.web&#62; &#60;authorization&#62; &#60;deny users=&#34;?&#34; /&#62; &#60;/authorization&#62; &#60;/system.web&#62; &#60;/location&#62; &#60;location path=&#34;Content_Admin&#34;&#62; [...]


Related posts:<ol><li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2008/04/21/qrquick-response-codes/' rel='bookmark' title='Permanent Link: QR(Quick Response) Codes'>QR(Quick Response) Codes</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I use the login page from here:<br />
<a target="_blank" href="http://www.15seconds.com/issue/020220.htm">http://www.15seconds.com/issue/020220.htm</a></p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">&lt;!-- Web.Config Configuration File --&gt;
&nbsp;
&lt;configuration&gt;
&nbsp;
  &lt;system.web&gt;
    &lt;customErrors mode=<span style="color: #800000;">&quot;Off&quot;</span>/&gt;
    &lt;compilation debug=<span style="color: #800000;">&quot;true&quot;</span>/&gt;
&nbsp;
    &lt;authentication mode=<span style="color: #800000;">&quot;Forms&quot;</span>&gt;
      &lt;forms loginUrl=<span style="color: #800000;">&quot;FeedBack_Admin/login.aspx&quot;</span> protection=<span style="color: #800000;">&quot;All&quot;</span> timeout=<span style="color: #800000;">&quot;30&quot;</span>&gt;
        &lt;credentials passwordFormat=<span style="color: #800000;">&quot;Clear&quot;</span>&gt;
          &lt;user name=<span style="color: #800000;">&quot;admin&quot;</span> password=<span style="color: #800000;">&quot;pass&quot;</span>/&gt;
        &lt;/credentials&gt;
      &lt;/forms&gt;
    &lt;/authentication&gt;
    &lt;authorization&gt;
      &lt;allow users=<span style="color: #800000;">&quot;*&quot;</span> /&gt;
    &lt;/authorization&gt;
  &lt;/system.web&gt;
&nbsp;
  &lt;location path=<span style="color: #800000;">&quot;FeedBack_Admin&quot;</span>&gt;
    &lt;system.web&gt;
      &lt;authorization&gt;
        &lt;deny users=<span style="color: #800000;">&quot;?&quot;</span> /&gt;
      &lt;/authorization&gt;
    &lt;/system.web&gt;
  &lt;/location&gt;
  &lt;location path=<span style="color: #800000;">&quot;Content_Admin&quot;</span>&gt;
    &lt;system.web&gt;
      &lt;authorization&gt;
        &lt;deny users=<span style="color: #800000;">&quot;?&quot;</span> /&gt;
      &lt;/authorization&gt;
    &lt;/system.web&gt;
  &lt;/location&gt;
&lt;/configuration&gt;</pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2008/04/21/qrquick-response-codes/' rel='bookmark' title='Permanent Link: QR(Quick Response) Codes'>QR(Quick Response) Codes</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>JQuery &#8211; Example Documents for Presentation</title>
		<link>http://danfolkes.com/2010/04/20/jquery-example-documents-for-presentation/</link>
		<comments>http://danfolkes.com/2010/04/20/jquery-example-documents-for-presentation/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 16:30:58 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=550</guid>
		<description><![CDATA[I gave a presentation at work on JQuery. So, I made a documentation page and a example html page with jquery calls at the bottom. This should be able to help someone out there in internet land. View the post to see code. Here is the PDF Documentation: jQuery Documentation &#60;script src=&#34;./jquery-1.4.2.min.js&#34; type=&#34;text/javascript&#34;&#62;&#60;!--mce:0--&#62;&#60;/script&#62; &#60;!-- div [...]


Related posts:<ol><li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/' rel='bookmark' title='Permanent Link: jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success'>jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success</a></li>
<li><a href='http://danfolkes.com/2009/12/15/jquery-check-all-of-the-checkboxes/' rel='bookmark' title='Permanent Link: jQuery: Check All of the Checkboxes'>jQuery: Check All of the Checkboxes</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/index.php/2010/04/20/jquery-example-documents-for-presentation/"><img class="alignnone size-full wp-image-559" title="jquery-selectors" src="http://danfolkes.com/wp-content/uploads/2010/04/jquery-selectors.jpg" alt="jquery-selectors" width="377" height="272" /></a></p>
<p>I gave a presentation at work on JQuery.</p>
<p>So, I made a documentation page and a example html page with jquery calls at the bottom.</p>
<p>This should be able to help someone out there in internet land.</p>
<p><strong>View the post to see code.</strong></p>
<p><span id="more-550"></span><br />
Here is the PDF Documentation:<br />
<a rel="attachment wp-att-556" href="http://danfolkes.com/?attachment_id=556">jQuery Documentation</a></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">		<span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;./jquery-1.4.2.min.js&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;&lt;!--</span>mce<span style="color: #339933;">:</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">--&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;!--</span>
			div <span style="color: #009900;">&#123;</span>
				border<span style="color: #339933;">:</span> 1px solid black<span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">.</span>bottom2 <span style="color: #009900;">&#123;</span>color<span style="color: #339933;">:</span>red<span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">--&gt;</span>
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;holder&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alp_holder&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;aaa&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;top2&quot;</span><span style="color: #339933;">&gt;</span>
					aaa<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;bbb&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;top2&quot;</span><span style="color: #339933;">&gt;</span>
					bbb<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ccc&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;bottom2&quot;</span><span style="color: #339933;">&gt;</span>
					ccc
					<span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;#alynnlee.com&quot;</span><span style="color: #339933;">&gt;</span>alynnlee<span style="color: #339933;">.</span>com<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;#alynnlee.com&quot;</span><span style="color: #339933;">&gt;</span>alynnlee<span style="color: #339933;">.</span>com<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;#alynnlee.com&quot;</span><span style="color: #339933;">&gt;</span>alynnlee<span style="color: #339933;">.</span>com<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ddd&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;bottom2&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>form<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;name&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;password&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;option1&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Milk&quot;</span> <span style="color: #339933;">/&gt;</span> Milk
<span style="color: #339933;">&lt;</span>input checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;option2&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Butter&quot;</span> <span style="color: #339933;">/&gt;</span> Butter
<span style="color: #339933;">&lt;</span>input checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;option3&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Cheese&quot;</span> <span style="color: #339933;">/&gt;</span> Cheese
<span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Submit&quot;</span> <span style="color: #339933;">/&gt;</span>
					<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;&lt;!--</span>mce<span style="color: #339933;">:</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">--&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/02/11/jquery-ajax-extra-parameters-get-success/' rel='bookmark' title='Permanent Link: jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success'>jQuery &#8211; Ajax &#8211; Extra Parameters &#8211; GET, success</a></li>
<li><a href='http://danfolkes.com/2009/12/15/jquery-check-all-of-the-checkboxes/' rel='bookmark' title='Permanent Link: jQuery: Check All of the Checkboxes'>jQuery: Check All of the Checkboxes</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/04/20/jquery-example-documents-for-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/04/jquery-selectors-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2010/04/jquery-selectors.jpg" medium="image">
			<media:title type="html">jquery-ajax</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/04/jquery-selectors-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>PHP Gmail Imap Connection with Database Insert</title>
		<link>http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/</link>
		<comments>http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 16:15:02 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=531</guid>
		<description><![CDATA[Using PHP, We will connect to a Gmail mailbox and pull down the last message headers and to and from email addresses. With this data, we will insert it into a MySQL Database and then delete the message from the IMAP Server. LET ME KNOW IF THIS HELPED YOU IN THE COMMENTS! Enjoy! Here is [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/' rel='bookmark' title='Permanent Link: Outlook Rule : Only at Specific Times'>Outlook Rule : Only at Specific Times</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/index.php/2010/03/31/php-gmail-imap-connection-with-database-insert/"><img src="http://danfolkes.com/wp-content/uploads/2010/03/gmail_php_mysql_imap.jpg" alt="gmail php mysql imap" title="gmail php mysql imap"  /></a><br />
Using PHP, We will connect to a Gmail mailbox and pull down the last message headers and to and from email addresses.<br />
With this data, we will insert it into a MySQL Database and then delete the message from the IMAP Server.</p>
<p><b>LET ME KNOW IF THIS HELPED YOU IN THE COMMENTS!</b> Enjoy!</p>
<p>Here is the code:<br />
<span id="more-531"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$dbhost</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dbuser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'DATABASE_USER'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dbpass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'DATABASE_PASSWORD'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dbname</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'DATABASE_NAME'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$imapserverstring</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'imap.gmail.com:993/imap/ssl/novalidate-cert'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$imapuser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GOOGLE_USERNAME@gmail.com'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$imappass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GOOGLE_PASSWORD'</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
	<span style="color: #000088;">$mbox</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imap_open</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;{&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$imapserverstring</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;}INBOX&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$imapuser</span><span style="color: #339933;">,</span><span style="color: #000088;">$imappass</span><span style="color: #009900;">&#41;</span>	or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;can't connect: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">imap_last_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$check</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imap_mailboxmsginfo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mbox</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$check</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Date: &quot;</span>     <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Date</span>    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Driver: &quot;</span>   <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Driver</span>  <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Mailbox: &quot;</span>  <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Mailbox</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Messages: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Nmsgs</span>   <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Recent: &quot;</span>   <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Recent</span>  <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Unread: &quot;</span>   <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Unread</span>  <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Deleted: &quot;</span>  <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Deleted</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Size: &quot;</span>     <span style="color: #339933;">.</span> <span style="color: #000088;">$check</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Size</span>    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;imap_check() failed: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">imap_last_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;h1&gt;Headers in INBOX&lt;/h1&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$headers</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imap_headers</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mbox</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$headers</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Call failed (or no messages)&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$headers</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$val</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000088;">$FirstMessageArray</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">imap_fetchbody</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mbox</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$FirstMessageArray</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$subject</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$message</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$to</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span>  <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$FirstMessageArray</span> <span style="color: #339933;">,</span>  <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>  <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$from</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
&nbsp;
	<span style="color: #000088;">$conn</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dbhost</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dbuser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dbpass</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error connecting to mysql'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dbname</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$query</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;INSERT INTO `DatabaseTable` (`id`, `to`, `from`, `subject`, `message`) VALUES (NULL, '<span style="color: #006699; font-weight: bold;">{$to}</span>', '<span style="color: #006699; font-weight: bold;">{$from}</span>', '<span style="color: #006699; font-weight: bold;">{$subject}</span>', '<span style="color: #006699; font-weight: bold;">{$message}</span>');&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$conn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #990000;">imap_delete</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mbox</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">imap_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mbox</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Permanent Link: Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/' rel='bookmark' title='Permanent Link: Outlook Rule : Only at Specific Times'>Outlook Rule : Only at Specific Times</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2010/03/gmail_php_mysql_imap.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2010/03/gmail_php_mysql_imap.jpg" medium="image">
			<media:title type="html">gmail php mysql imap</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery: Check All of the Checkboxes</title>
		<link>http://danfolkes.com/2009/12/15/jquery-check-all-of-the-checkboxes/</link>
		<comments>http://danfolkes.com/2009/12/15/jquery-check-all-of-the-checkboxes/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 16:18:32 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=412</guid>
		<description><![CDATA[This will check all of the checkboxes inside of an element (div,span,table) with a class of outerClassName $(".outerClassName :checkbox").attr('checked', true); Tip: you must have the jQuery library referenced before using this line of code. Related posts:JQuery &#8211; Example Documents for Presentation


Related posts:<ol><li><a href='http://danfolkes.com/2010/04/20/jquery-example-documents-for-presentation/' rel='bookmark' title='Permanent Link: JQuery &#8211; Example Documents for Presentation'>JQuery &#8211; Example Documents for Presentation</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This will check all of the checkboxes inside of an element (div,span,table) with a <strong>class</strong> of outerClassName</p>
<p><code>$(".outerClassName :checkbox").attr('checked', true);</code></p>
<p><em>Tip: you must have the jQuery library referenced before using this line of code.</em></p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2010/04/20/jquery-example-documents-for-presentation/' rel='bookmark' title='Permanent Link: JQuery &#8211; Example Documents for Presentation'>JQuery &#8211; Example Documents for Presentation</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2009/12/15/jquery-check-all-of-the-checkboxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>TikiWiki &#8211; Tracker Email Subject Improvement-Modification</title>
		<link>http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/</link>
		<comments>http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 21:05:11 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[notification]]></category>
		<category><![CDATA[subject]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[tiki]]></category>
		<category><![CDATA[tikiwiki]]></category>
		<category><![CDATA[Tracker]]></category>
		<category><![CDATA[tracker name]]></category>
		<category><![CDATA[tracker_changed_notification_subject]]></category>
		<category><![CDATA[tracker_changed_notification_subject.tpl]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=387</guid>
		<description><![CDATA[The template for the Tracker email is here: \tikiwiki\templates\mail\tracker_changed_notification_subject.tpl I changed it to this so that it would improve the way it looks in emails: {$mail_trackerName}{tr} - #{/tr}{$mail_itemId}{tr} modified.{/tr} Related posts:Outlook Rule : Only at Specific Times .Net &#8211; Sending Email with In Memory Attachment Python: Wunderground Todays Weather to Email SMS to Phone


Related posts:<ol><li><a href='http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/' rel='bookmark' title='Permanent Link: Outlook Rule : Only at Specific Times'>Outlook Rule : Only at Specific Times</a></li>
<li><a href='http://danfolkes.com/2010/12/21/net-sending-email-with-in-memory-attachment/' rel='bookmark' title='Permanent Link: .Net &#8211; Sending Email with In Memory Attachment'>.Net &#8211; Sending Email with In Memory Attachment</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/index.php/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/tikiwiki-2/" rel="attachment wp-att-391"><img src="http://danfolkes.com/wp-content/uploads/2009/11/tikiwiki1.jpg" alt="tikiwiki" title="tikiwiki" width="200" height="150" class="alignleft size-full wp-image-391" /></a></p>
<p>The template for the Tracker email is here:<br />
\tikiwiki\templates\mail\tracker_changed_notification_subject.tpl</p>
<p>I changed it to this so that it would improve the way it looks in emails:<br />
<code><br />
{$mail_trackerName}{tr} - #{/tr}{$mail_itemId}{tr} modified.{/tr}<br />
</code></p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2011/02/18/outlook-rule-only-at-specific-times/' rel='bookmark' title='Permanent Link: Outlook Rule : Only at Specific Times'>Outlook Rule : Only at Specific Times</a></li>
<li><a href='http://danfolkes.com/2010/12/21/net-sending-email-with-in-memory-attachment/' rel='bookmark' title='Permanent Link: .Net &#8211; Sending Email with In Memory Attachment'>.Net &#8211; Sending Email with In Memory Attachment</a></li>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Permanent Link: Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2009/11/18/tikiwiki-tracker-email-subject-improvement-modification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/11/tikiwiki1-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2009/11/tikiwiki1.jpg" medium="image">
			<media:title type="html">tikiwiki</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/11/tikiwiki1-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>Override the window.onload javascript function</title>
		<link>http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/</link>
		<comments>http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 20:53:34 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=369</guid>
		<description><![CDATA[1. Creates a blank function 2. Checks onload for a function. 2a. Sets the originial onload function as temp 3. calls the new function initMap() before the originial temp onload function. Pretty cool! Code: 1 2 3 4 5 6 7 var temp=function&#40;&#41;&#123; return 1;&#125;; if&#40; window.onload &#41; &#123; //override &#34;placeholder&#34; with whatever already exists [...]


Related posts:<ol><li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/05/20/java-singleton-global-data-access-sqlite/' rel='bookmark' title='Permanent Link: Java &#8211; Singleton / Global &#8211; Data Access &#8211; SQLite'>Java &#8211; Singleton / Global &#8211; Data Access &#8211; SQLite</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>1. Creates a blank function<br />
2. Checks onload for a function.<br />
2a. Sets the originial onload function as temp<br />
3. calls the new function initMap() before the originial temp onload function.</p>
<p>Pretty cool!</p>
<p>Code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> temp<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> window.<span style="color: #000066;">onload</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
      <span style="color: #006600; font-style: italic;">//override &quot;placeholder&quot; with whatever already exists in onload</span>
     temp <span style="color: #339933;">=</span> window.<span style="color: #000066;">onload</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
window.<span style="color: #000066;">onload</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> TheFunctionYouWantToCall<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> temp<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://danfolkes.com/2011/11/07/asp-net-update-panel-javascript-event-jquery-click/' rel='bookmark' title='Permanent Link: ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click'>ASP.Net Update Panel &#8211; Javascript Event &#8211; jQuery Click</a></li>
<li><a href='http://danfolkes.com/2012/01/06/php-webservice-that-uses-json-pdo-accessed-by-jquery-ajax/' rel='bookmark' title='Permanent Link: PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX'>PHP Webservice that uses JSON PDO &#8211; Accessed by JQuery AJAX</a></li>
<li><a href='http://danfolkes.com/2011/05/20/java-singleton-global-data-access-sqlite/' rel='bookmark' title='Permanent Link: Java &#8211; Singleton / Global &#8211; Data Access &#8211; SQLite'>Java &#8211; Singleton / Global &#8211; Data Access &#8211; SQLite</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2009/10/19/override-the-window-onload-javascript-function/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
	</item>
		<item>
		<title>Rotating Circular Periodic Table &#8211; Javascript</title>
		<link>http://danfolkes.com/2009/10/07/rotating-circular-periodic-table-javascript/</link>
		<comments>http://danfolkes.com/2009/10/07/rotating-circular-periodic-table-javascript/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 16:52:39 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Abubakr]]></category>
		<category><![CDATA[alternative]]></category>
		<category><![CDATA[circle]]></category>
		<category><![CDATA[Circular]]></category>
		<category><![CDATA[hydrogen]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Mendeleev]]></category>
		<category><![CDATA[middle]]></category>
		<category><![CDATA[Mohd Abubakr]]></category>
		<category><![CDATA[Periodic Table]]></category>
		<category><![CDATA[rotate]]></category>
		<category><![CDATA[Rotating]]></category>
		<category><![CDATA[Rotating Circular Periodic Table]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=357</guid>
		<description><![CDATA[I just saw an article on this site about the merits of a circular periodic table by Mohd Abubakr Design I thought it would be nice to have one that rotates. So I used the jQuery and jQuery-Rotate library on it to make it spin. I hope this will be help someone and I hope [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/12/15/jquery-check-all-of-the-checkboxes/' rel='bookmark' title='Permanent Link: jQuery: Check All of the Checkboxes'>jQuery: Check All of the Checkboxes</a></li>
<li><a href='http://danfolkes.com/2009/01/05/corelaborate-document-elaboration-on-the-core-formats/' rel='bookmark' title='Permanent Link: CoreLaborate &#8211; Document Elaboration on the Core Formats'>CoreLaborate &#8211; Document Elaboration on the Core Formats</a></li>
<li><a href='http://danfolkes.com/2009/09/20/chair-and-coffee-table-2/' rel='bookmark' title='Permanent Link: chair and coffee table!'>chair and coffee table!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2009/10/Circular_form_of_periodic_table_sm.gif" alt="Circular_form_of_periodic_table_sm" title="Circular_form_of_periodic_table_sm" width="300" height="269" class="alignleft size-full wp-image-358" /></p>
<p>I just saw an article on <a href="http://www.technologyreview.com/blog/arxiv/24204/">this site</a> about the merits of a circular periodic table by <a href="http://arxiv.org/abs/0910.0273">Mohd Abubakr Design</a></p>
<p>I thought it would be nice to have one that rotates.  So I used the jQuery and jQuery-Rotate library on it to make it spin.</p>
<p>I hope this will be help someone and I hope to make additions to it in the future.<br />
<strong>[[<a href="http://danfolkes.com/Rotating_Circular_Periodic_Table.php">View Rotating Circular Periodic Table</a>]]</strong></p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/12/15/jquery-check-all-of-the-checkboxes/' rel='bookmark' title='Permanent Link: jQuery: Check All of the Checkboxes'>jQuery: Check All of the Checkboxes</a></li>
<li><a href='http://danfolkes.com/2009/01/05/corelaborate-document-elaboration-on-the-core-formats/' rel='bookmark' title='Permanent Link: CoreLaborate &#8211; Document Elaboration on the Core Formats'>CoreLaborate &#8211; Document Elaboration on the Core Formats</a></li>
<li><a href='http://danfolkes.com/2009/09/20/chair-and-coffee-table-2/' rel='bookmark' title='Permanent Link: chair and coffee table!'>chair and coffee table!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2009/10/07/rotating-circular-periodic-table-javascript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/10/Circular_form_of_periodic_table_sm-150x150.gif" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2009/10/Circular_form_of_periodic_table_sm.gif" medium="image">
			<media:title type="html">Circular_form_of_periodic_table_sm</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/10/Circular_form_of_periodic_table_sm-150x150.gif" />
		</media:content>
	</item>
		<item>
		<title>DanFolkes FLVPlayer &#8211; Create your own FLVPlayer (like jw-flv-player) with no branding</title>
		<link>http://danfolkes.com/2009/10/02/danfolkes-flvplayer-create-your-own-flvplayer-like-jw-flv-player-with-no-branding/</link>
		<comments>http://danfolkes.com/2009/10/02/danfolkes-flvplayer-create-your-own-flvplayer-like-jw-flv-player-with-no-branding/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 21:17:21 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Create your own]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[fla]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[FLVPlayback]]></category>
		<category><![CDATA[FLVPlayer]]></category>
		<category><![CDATA[no branding]]></category>
		<category><![CDATA[swf]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=341</guid>
		<description><![CDATA[Using Flash CS4: Open File New Import Video Setup Video: Import -> Import Video &#8211; > Already Deployed&#8230; -> Put in some random text. Select the overlay you like. Finish Name the instance of FLVPlayback in the &#8220;Properties&#8221; window. Click on the white space in the background and go to the Actions frame. Paste this [...]


Related posts:<ol><li><a href='http://danfolkes.com/2010/02/08/for-anyone-that-has-been-snowed-out-of-church-video/' rel='bookmark' title='Permanent Link: For anyone that has been snowed out of church. (Video)'>For anyone that has been snowed out of church. (Video)</a></li>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Permanent Link: Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2008/05/20/netflix-player-by-roku-runs-linux/' rel='bookmark' title='Permanent Link: Netflix Player by Roku Runs Linux'>Netflix Player by Roku Runs Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/index.php/2009/10/02/danfolkes-flvplayer-create-your-own-flvplayer-like-jw-flv-player-with-no-branding/"><img src="http://danfolkes.com/wp-content/uploads/2009/10/DanFolkes-FLVPlayer.gif" alt="DanFolkes-FLVPlayer" title="DanFolkes-FLVPlayer" width="603" height="360" class="alignnone size-full wp-image-348" /></a></p>
<p>Using Flash CS4:<span id="more-341"></span></p>
<ul>
<li>Open</li>
<li>File New</li>
<li>Import Video</li>
<li>Setup Video:
<ul>
<li>Import -> Import Video &#8211; > </li>
<li>Already Deployed&#8230; -> Put in some random text.</li>
<li>Select the overlay you like. </li>
<li>Finish</li>
</ul>
</li>
<li>Name the instance of FLVPlayback in the &#8220;Properties&#8221; window.</li>
<li>Click on the white space in the background and go to the <strong>Actions</strong> frame.</li>
<li>Paste this code:

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">vid.<span style="color: black;">load</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;/Videos/&quot;</span> +  LoaderInfo<span style="color: black;">&#40;</span>this.<span style="color: black;">root</span>.<span style="color: black;">loaderInfo</span><span style="color: black;">&#41;</span>.<span style="color: black;">parameters</span>.<span style="color: black;">one</span><span style="color: black;">&#41;</span><span style="color: #66cc66;">;</span></pre></td></tr></table></div>

</li>
<li>In your HTML do this:

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">	<span style="color: #66cc66;">&lt;</span>object classid=<span style="color: #483d8b;">&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot;</span>
        codebase=<span style="color: #483d8b;">&quot;http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0&quot;</span>
        width=<span style="color: #483d8b;">&quot;550&quot;</span>
        height=<span style="color: #483d8b;">&quot;400&quot;</span>
        align=<span style="color: #483d8b;">&quot;middle&quot;</span>
        <span style="color: #008000;">id</span>=<span style="color: #483d8b;">&quot;main&quot;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>param name=<span style="color: #483d8b;">&quot;allowScriptAccess&quot;</span> value=<span style="color: #483d8b;">&quot;sameDomain&quot;</span> /<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>param name=<span style="color: #483d8b;">&quot;movie&quot;</span> value=<span style="color: #483d8b;">&quot;PlayVid.swf&quot;</span> /<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>param name=<span style="color: #483d8b;">&quot;quality&quot;</span> value=<span style="color: #483d8b;">&quot;high&quot;</span> /<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>param name=<span style="color: #483d8b;">&quot;bgcolor&quot;</span> value=<span style="color: #483d8b;">&quot;#ffffff&quot;</span> /<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>param name=<span style="color: #483d8b;">&quot;FlashVars&quot;</span> value=<span style="color: #483d8b;">&quot;one=FLVVideoFileName.flv&quot;</span> /<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>embed src=<span style="color: #483d8b;">&quot;PlayVid.swf&quot;</span>
           width=<span style="color: #483d8b;">&quot;550&quot;</span>
           height=<span style="color: #483d8b;">&quot;400&quot;</span>
           autostart=<span style="color: #483d8b;">&quot;false&quot;</span>
           quality=<span style="color: #483d8b;">&quot;high&quot;</span>
           bgcolor=<span style="color: #483d8b;">&quot;#ffffff&quot;</span>
           FlashVars=<span style="color: #483d8b;">&quot;one=FLVVideoFileName.flv&quot;</span>
           name=<span style="color: #483d8b;">&quot;main&quot;</span>
           align=<span style="color: #483d8b;">&quot;middle&quot;</span>
           allowScriptAccess=<span style="color: #483d8b;">&quot;sameDomain&quot;</span>
           <span style="color: #008000;">type</span>=<span style="color: #483d8b;">&quot;application/x-shockwave-flash&quot;</span>
           pluginspage=<span style="color: #483d8b;">&quot;http://www.macromedia.com/go/getflashplayer&quot;</span> /<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>/object<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div>

</li>
<li>Notice the FlashVars parameters (2 places). That is where we will be passing in the FLV name</li>
</ul>
<p><br/><br />
<br/><br />
<strong>Download</strong> the <strong><a href='http://danfolkes.com/wp-content/uploads/2009/10/PlayVid.fla'>DanFolkesFLVPlayer</a> </strong>and <strong><a href='http://danfolkes.com/wp-content/uploads/2009/10/DanFolkesFLVPlayer.zip'>PlayVid</a></strong>.</p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2010/02/08/for-anyone-that-has-been-snowed-out-of-church-video/' rel='bookmark' title='Permanent Link: For anyone that has been snowed out of church. (Video)'>For anyone that has been snowed out of church. (Video)</a></li>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Permanent Link: Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2008/05/20/netflix-player-by-roku-runs-linux/' rel='bookmark' title='Permanent Link: Netflix Player by Roku Runs Linux'>Netflix Player by Roku Runs Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2009/10/02/danfolkes-flvplayer-create-your-own-flvplayer-like-jw-flv-player-with-no-branding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/10/DanFolkes-FLVPlayer-150x150.gif" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2009/10/DanFolkes-FLVPlayer.gif" medium="image">
			<media:title type="html">DanFolkes-FLVPlayer</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/10/DanFolkes-FLVPlayer-150x150.gif" />
		</media:content>
	</item>
		<item>
		<title>Started to work on a Simple Photo Slideshow.</title>
		<link>http://danfolkes.com/2009/09/01/started-to-work-on-a-simple-photo-slideshow/</link>
		<comments>http://danfolkes.com/2009/09/01/started-to-work-on-a-simple-photo-slideshow/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 23:45:25 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[alternatives]]></category>
		<category><![CDATA[evrium]]></category>
		<category><![CDATA[fluid]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[replacement]]></category>

		<guid isPermaLink="false">http://danfolkes.com/index.php/2009/09/01/started-to-work-on-a-simple-photo-slideshow/</guid>
		<description><![CDATA[It&#8217;s going to be a lot like: http://www.evrium.com/store/fg2p_details.php But much cheaper. Related posts:Started Using Git SCM For my Darkness is Spreading Photo Challenge: Stereoscopic CoreLaborate &#8211; Document Elaboration on the Core Formats


Related posts:<ol><li><a href='http://danfolkes.com/2009/03/03/started-using-git-scm-for-my-darkness-is-spreading/' rel='bookmark' title='Permanent Link: Started Using Git SCM For my Darkness is Spreading'>Started Using Git SCM For my Darkness is Spreading</a></li>
<li><a href='http://danfolkes.com/2010/03/04/photo-challenge-stereoscopic/' rel='bookmark' title='Permanent Link: Photo Challenge: Stereoscopic'>Photo Challenge: Stereoscopic</a></li>
<li><a href='http://danfolkes.com/2009/01/05/corelaborate-document-elaboration-on-the-core-formats/' rel='bookmark' title='Permanent Link: CoreLaborate &#8211; Document Elaboration on the Core Formats'>CoreLaborate &#8211; Document Elaboration on the Core Formats</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s going to be a lot like:</p>
<p>http://www.evrium.com/store/fg2p_details.php</p>
<p>But much cheaper.</p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/03/03/started-using-git-scm-for-my-darkness-is-spreading/' rel='bookmark' title='Permanent Link: Started Using Git SCM For my Darkness is Spreading'>Started Using Git SCM For my Darkness is Spreading</a></li>
<li><a href='http://danfolkes.com/2010/03/04/photo-challenge-stereoscopic/' rel='bookmark' title='Permanent Link: Photo Challenge: Stereoscopic'>Photo Challenge: Stereoscopic</a></li>
<li><a href='http://danfolkes.com/2009/01/05/corelaborate-document-elaboration-on-the-core-formats/' rel='bookmark' title='Permanent Link: CoreLaborate &#8211; Document Elaboration on the Core Formats'>CoreLaborate &#8211; Document Elaboration on the Core Formats</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2009/09/01/started-to-work-on-a-simple-photo-slideshow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Hubble Image RSS Feed</title>
		<link>http://danfolkes.com/2009/05/12/hubble-image-rss-feed/</link>
		<comments>http://danfolkes.com/2009/05/12/hubble-image-rss-feed/#comments</comments>
		<pubDate>Tue, 12 May 2009 20:19:38 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[atom]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[hubble]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[just-in]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[newest]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[Reader]]></category>
		<category><![CDATA[recent]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[telescope]]></category>
		<category><![CDATA[updated]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=272</guid>
		<description><![CDATA[I have used Google Reader to mash two image rss feeds together for Hubble. Here is the HTML page for it: https://www.google.com/reader/shared/user%2F15478232717259537591%2Flabel%2FHubble Here is the RSS Feed: http://www.google.com/reader/public/atom/user%2F15478232717259537591%2Flabel%2FHubble Based off of: http://hubblesite.org/newscenter/newscenter_rss.php and http://www.spacetelescope.org/rss/feed.xml Enjoy space nerds. Related posts:My Combined News Pages HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader Facebook [...]


Related posts:<ol><li><a href='http://danfolkes.com/2010/01/13/my-combined-news-pages/' rel='bookmark' title='Permanent Link: My Combined News Pages'>My Combined News Pages</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
<li><a href='http://danfolkes.com/2011/05/25/facebook-website-integration-html/' rel='bookmark' title='Permanent Link: Facebook Website Integration &#8211; HTML'>Facebook Website Integration &#8211; HTML</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danfolkes.com/index.php/2009/05/12/hubble-image-rss-feed/hs-2009-13-a-web/" rel="attachment wp-att-273"><img src="http://danfolkes.com/wp-content/uploads/2009/05/hs-2009-13-a-web.jpg" alt="hs-2009-13-a-web" title="hs-2009-13-a-web" width="333" height="400" class="size-full wp-image-273" /></a></p>
<p>I have used Google Reader to mash two image rss feeds together for Hubble.</p>
<p><strong>Here is the HTML page for it:<br />
<a href="https://www.google.com/reader/shared/user%2F15478232717259537591%2Flabel%2FHubble">https://www.google.com/reader/shared/user%2F15478232717259537591%2Flabel%2FHubble</a></strong></p>
<p><strong>Here is the RSS Feed:<br />
<a href="http://www.google.com/reader/public/atom/user%2F15478232717259537591%2Flabel%2FHubble">http://www.google.com/reader/public/atom/user%2F15478232717259537591%2Flabel%2FHubble</a></strong></p>
<p><strong>Based off of:</strong><br />
<a href="http://hubblesite.org/newscenter/newscenter_rss.php">http://hubblesite.org/newscenter/newscenter_rss.php</a><br />
and<br />
<a href="http://www.spacetelescope.org/rss/feed.xml">http://www.spacetelescope.org/rss/feed.xml</a></p>
<p>Enjoy space nerds.</p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2010/01/13/my-combined-news-pages/' rel='bookmark' title='Permanent Link: My Combined News Pages'>My Combined News Pages</a></li>
<li><a href='http://danfolkes.com/2009/03/04/howto-setup-an-aggregated-rss-feed-for-your-friends-using-google-reader/' rel='bookmark' title='Permanent Link: HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader'>HOWTO: Setup an Aggregated RSS feed for your Friends using Google Reader</a></li>
<li><a href='http://danfolkes.com/2011/05/25/facebook-website-integration-html/' rel='bookmark' title='Permanent Link: Facebook Website Integration &#8211; HTML'>Facebook Website Integration &#8211; HTML</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2009/05/12/hubble-image-rss-feed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/05/hs-2009-13-a-web-150x150.jpg" />
		<media:content url="http://danfolkes.com/wp-content/uploads/2009/05/hs-2009-13-a-web.jpg" medium="image">
			<media:title type="html">hs-2009-13-a-web</media:title>
			<media:thumbnail url="http://danfolkes.com/wp-content/uploads/2009/05/hs-2009-13-a-web-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>IP Locator Webservice &#8211; PHP &#8211; Ipmap &#8211; Command Line</title>
		<link>http://danfolkes.com/2009/05/06/ip-locator-webservice-php-ipmap-command-line/</link>
		<comments>http://danfolkes.com/2009/05/06/ip-locator-webservice-php-ipmap-command-line/#comments</comments>
		<pubDate>Wed, 06 May 2009 15:32:04 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=249</guid>
		<description><![CDATA[This is similar to my Python script here: http://danfolkes.com/index.php/2009/04/29/ipmapcom-python/ It uses this sites service to pull the location of each user: http://www.ipmap.com/ It outputs in XML, Plain Text, and HTML. Fields: ip hostname ipreverse country region city blacklist gmaps HERE IS THE LINK TO THE WEB SERVICE SITE: http://www.danfolkes.com/ipmaps/ Related posts:IPMap Python Ip Address Locator [...]


Related posts:<ol><li><a href='http://danfolkes.com/2009/04/29/ipmapcom-python/' rel='bookmark' title='Permanent Link: IPMap Python Ip Address Locator Command Line Script'>IPMap Python Ip Address Locator Command Line Script</a></li>
<li><a href='http://danfolkes.com/2009/03/31/cws-chord-web-service/' rel='bookmark' title='Permanent Link: CWS &#8211; Chord Web Service'>CWS &#8211; Chord Web Service</a></li>
<li><a href='http://danfolkes.com/2010/02/08/for-anyone-that-has-been-snowed-out-of-church-video/' rel='bookmark' title='Permanent Link: For anyone that has been snowed out of church. (Video)'>For anyone that has been snowed out of church. (Video)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is similar to my Python script here:<br />
<a href="http://danfolkes.com/index.php/2009/04/29/ipmapcom-python/">http://danfolkes.com/index.php/2009/04/29/ipmapcom-python/</a></p>
<p>It uses this sites service to pull the location of each user:<br />
<a href="http://www.ipmap.com/">http://www.ipmap.com/</a></p>
<p>It outputs in XML, Plain Text, and HTML.<br />
Fields:</p>
<ul>
<li>ip</li>
<li>hostname</li>
<li>ipreverse</li>
<li>country</li>
<li>region</li>
<li>city</li>
<li>blacklist</li>
<li>gmaps</li>
</ul>
<p>HERE IS THE LINK TO THE WEB SERVICE SITE:<br />
<a href="http://www.danfolkes.com/ipmaps/">http://www.danfolkes.com/ipmaps/</a></p>


<p>Related posts:<ol><li><a href='http://danfolkes.com/2009/04/29/ipmapcom-python/' rel='bookmark' title='Permanent Link: IPMap Python Ip Address Locator Command Line Script'>IPMap Python Ip Address Locator Command Line Script</a></li>
<li><a href='http://danfolkes.com/2009/03/31/cws-chord-web-service/' rel='bookmark' title='Permanent Link: CWS &#8211; Chord Web Service'>CWS &#8211; Chord Web Service</a></li>
<li><a href='http://danfolkes.com/2010/02/08/for-anyone-that-has-been-snowed-out-of-church-video/' rel='bookmark' title='Permanent Link: For anyone that has been snowed out of church. (Video)'>For anyone that has been snowed out of church. (Video)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2009/05/06/ip-locator-webservice-php-ipmap-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
	</channel>
</rss>

