<?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/"
	>

<channel>
	<title>Chris: Geek Guy</title>
	<atom:link href="http://chris.gg/feed/" rel="self" type="application/rss+xml" />
	<link>http://chris.gg</link>
	<description>Tech news and other stuff from a UK-based web developer and all-round geek</description>
	<lastBuildDate>Fri, 12 Mar 2010 12:50:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to resolve &#8220;Virtual PC has detected an invalid or missing Product ID&#8221;</title>
		<link>http://chris.gg/2010/03/how-to-resolve-virtual-pc-has-detected-an-invalid-or-missing-product-id/</link>
		<comments>http://chris.gg/2010/03/how-to-resolve-virtual-pc-has-detected-an-invalid-or-missing-product-id/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 12:50:32 +0000</pubDate>
		<dc:creator>Chris Barnes</dc:creator>
				<category><![CDATA[Hints & Tips]]></category>
		<category><![CDATA[product id]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[virtual pc]]></category>

		<guid isPermaLink="false">http://chris.gg/?p=705</guid>
		<description><![CDATA[I&#8217;ve just installed Virtual PC 2007 on my work laptop (which runs Windows XP), and when I tried to start it, I got the following error:
---------------------------
Virtual PC
---------------------------
Virtual PC has detected an invalid or missing Product ID.

A valid Product ID is required to operate Virtual PC. Please
re-run the Virtual PC installer and enter a valid Product [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just installed Virtual PC 2007 on my work laptop (which runs Windows XP), and when I tried to start it, I got the following error:</p>
<pre>---------------------------
Virtual PC
---------------------------
Virtual PC has detected an invalid or missing Product ID.

A valid Product ID is required to operate Virtual PC. Please
re-run the Virtual PC installer and enter a valid Product ID when
requested.
---------------------------
OK
---------------------------</pre>
<p>The solution is basically as described <a href="http://sharepointinsight.wordpress.com/2009/03/27/solution-for-virtual-pc-has-detected-an-invalid-or-missing-product-id-error/">here</a>, except I had to create the registry keys and values as they were missing on my machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://chris.gg/2010/03/how-to-resolve-virtual-pc-has-detected-an-invalid-or-missing-product-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FoneM8store: Buyer beware!</title>
		<link>http://chris.gg/2010/03/fonem8store-buyer-beware/</link>
		<comments>http://chris.gg/2010/03/fonem8store-buyer-beware/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 20:52:03 +0000</pubDate>
		<dc:creator>Chris Barnes</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[marketplace]]></category>
		<category><![CDATA[shopping]]></category>

		<guid isPermaLink="false">http://chris.gg/?p=703</guid>
		<description><![CDATA[I recently did some online shopping for an automatic air compressor to keep my car tyres topped up, and decided upon the Ring RAC600 Automatic Digital Air Compressor. Ring Automotive are a well-respected manufacturer and the product attracted positive reviews on Amazon.co.uk, and FoneM8store were offering the item for just shy of £22 delivered which seemed [...]]]></description>
			<content:encoded><![CDATA[<p>I recently did some online shopping for an automatic air compressor to keep my car tyres topped up, and decided upon the <a href="http://www.amazon.co.uk/RING-RAC600-Automatic-Digital-Compressor/dp/B001R1F4K2/wwwchrisbacouk">Ring RAC600 Automatic Digital Air Compressor</a>. Ring Automotive are a well-respected manufacturer and the product attracted positive reviews on Amazon.co.uk, and FoneM8store were offering the item for just shy of £22 delivered which seemed like a good deal.</p>
<p>I have used Amazon regularly since 2000, but having never bought from a Marketplace seller in the past, I was slightly dubious. Unfortunately, I decided to go ahead anyway.</p>
<p>To cut a long story short, I placed my order on 15th February, and it was supposedly dispatched on the 17th, with a delivery estimate of 19th-23rd. I emailed the seller on the 24th as I hadn&#8217;t received the item. The seller requested that I confirm my name and address so they could send a refund. I had already provided this information, which was the same as quoted on the dispatch confirmation, but was happy to provide it again.</p>
<p>I then received an email the following day stating that the replacement was &#8220;on its way&#8221;, and that I should contact them again in case of further problems. No delivery estimate was provided so I waited until 3rd March before sending another email to the seller to advise them that the item still hadn&#8217;t arrived.</p>
<p>I received a curt reply of &#8220;You definately have a problem with your local sorting office then , these things weigh a tonne, can you check with your local sorting office to see if they are holding any items for you at this time please.&#8221;</p>
<p>I had in fact already checked with the sorting office who had confirmed that they were not holding any items for me. I responded to this effect, and requested a full refund as I didn&#8217;t want to wait for yet another replacement that had no guarantee of arriving.</p>
<p>By now it was 5 March, but the seller told me that &#8220;we cannot refund on this item as yet as the replacement item was only sent out 6 working days ago, if this has not arrived by wednesday [10 March] of next week please feel free to email us back and we will sort this out for you.&#8221;</p>
<p>Fast-forward to today: still no air compressor &#8211; by now I&#8217;m frustrated but not surprised &#8211; so went back to the seller to ask for my refund. Despite having been in correspondence with apparently the same person &#8211; &#8220;Maria&#8221; &#8211; since February, she ignored my request and &#8211; déjà vu time &#8211; asked me to &#8220;please confirm your home name and address and we will send a replacement out by recorded delivery straight away&#8221;</p>
<p>I replied to remind Maria that the refund had already been agreed in the event of the first replacement item not receiving, but thought I was probably wasting my breath so have now filed a claim under Amazon&#8217;s <a href="http://www.amazon.co.uk/gp/help/customer/display.html?ie=UTF8&amp;nodeId=3149571">A-Z Guarantee</a>. Hopefully I&#8217;ll get my money back but Amazon&#8217;s website doesn&#8217;t give any indication of how long this is likely take.</p>
<p>I&#8217;ve always had a fantastic experience with Amazon.co.uk themselves in the ten years in which I have been a customer, and will probably continue to buy directly from them, but will definitely steer clear of Marketplace sellers. Amazon have taken a gamble by integrating the Marketplace feature so closely into their site and they need to be very careful not to allow dishonest sellers to tarnish their hard-earned (and, in my opinion, well-deserved) good reputation.</p>
<p>Right, off to Halfords, I think&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://chris.gg/2010/03/fonem8store-buyer-beware/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to disable proxy server via web.config file</title>
		<link>http://chris.gg/2010/03/how-to-disable-proxy-server-via-web-config-file/</link>
		<comments>http://chris.gg/2010/03/how-to-disable-proxy-server-via-web-config-file/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 14:17:28 +0000</pubDate>
		<dc:creator>Chris Barnes</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[407]]></category>
		<category><![CDATA[bypass]]></category>
		<category><![CDATA[disable]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[web.config]]></category>

		<guid isPermaLink="false">http://chris.gg/?p=679</guid>
		<description><![CDATA[I&#8217;m developing a simple ASP.NET page to consume an RSS feed, format and output the content. My default proxy requires authentication, so unless I supply proxy credentials or bypass the proxy altogether, I get a &#8220;407 Proxy Authentication Required&#8221; error.
Fortunately I can access the RSS feed URL directly without going through the proxy, so the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m developing a simple ASP.NET page to consume an RSS feed, format and output the content. My default proxy requires authentication, so unless I supply proxy credentials or bypass the proxy altogether, I get a &#8220;407 Proxy Authentication Required&#8221; error.</p>
<p>Fortunately I can access the RSS feed URL directly without going through the proxy, so the solution is simple &#8211; I just need to instruct my application to ignore the default proxy settings by adding the following lines in my web.config file, within the <strong>&lt;configuration&gt;</strong> element:</p>
<pre>
  &lt;system.net&gt;
    &lt;defaultProxy&gt;
      &lt;proxy usesystemdefault="False"/&gt;
    &lt;/defaultProxy&gt;
  &lt;/system.net&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://chris.gg/2010/03/how-to-disable-proxy-server-via-web-config-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting IDENT_CURRENT() returning null in SQL Server</title>
		<link>http://chris.gg/2010/03/troubleshooting-ident_current-returning-null-in-sql-server/</link>
		<comments>http://chris.gg/2010/03/troubleshooting-ident_current-returning-null-in-sql-server/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 12:21:44 +0000</pubDate>
		<dc:creator>Chris Barnes</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[2005]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[ident_current]]></category>
		<category><![CDATA[null]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://chris.gg/?p=676</guid>
		<description><![CDATA[Recently I was mystified by an issue with one of my Web applications in which the IDENT_CURRENT() function was returning null. I was under the impression that this function (which returns the last identity value generated for a specific table or view) would always return a value. In fact, as pointed out in this post, [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was mystified by an issue with one of my Web applications in which the IDENT_CURRENT() function was returning null. I was under the impression that this function (which returns the last identity value generated for a specific table or view) would always return a value. In fact, as pointed out in <a href="http://blogs.technet.com/wardpond/archive/2006/03/01/420992.aspx">this post</a>, SQL Server 2005 (and presumably also later versions) requires the database user to have ALTER, CONTROL, DELETE, INSERT, REFERENCES, SELECT, TAKE OWNERSHOP, UPDATE or VIEW DEFINITION permissions on the underlying table, otherwise IDENT_CURRENT() will return null.</p>
<p>I can&#8217;t recall exactly how the permissions were set up in my case, but I know that the database user had SELECT permission on the entire database, and therefore was able to SELECT from the table in question &#8211; let&#8217;s call it &#8216;articles&#8217;. However, IDENT_CURRENT(articles) only started returning values other than null when I explicitly granted SELECT permission to the user for the specific &#8216;articles&#8217; table.</p>
]]></content:encoded>
			<wfw:commentRss>http://chris.gg/2010/03/troubleshooting-ident_current-returning-null-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using ISAPI Rewrite to redirect domain.com to www.domain.com</title>
		<link>http://chris.gg/2010/03/using-isapi-rewrite-to-redirect-domain-com-to-www-domain-com/</link>
		<comments>http://chris.gg/2010/03/using-isapi-rewrite-to-redirect-domain-com-to-www-domain-com/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 12:18:00 +0000</pubDate>
		<dc:creator>Chris Barnes</dc:creator>
				<category><![CDATA[Hints & Tips]]></category>
		<category><![CDATA[isapi_rewrite]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://chris.gg/?p=643</guid>
		<description><![CDATA[My employer&#8217;s SharePoint-powered external website &#8211; which I look after &#8211; uses ISAPI Rewrite to provide &#8220;friendly&#8221; URLs for certain pages, and also to redirect old URLs to their new locations. Coming from a LAMP background, this is great for me as it basically works the same as Apache&#8217;s mod_rewrite.
Previously the website responded to requests [...]]]></description>
			<content:encoded><![CDATA[<p>My employer&#8217;s SharePoint-powered external website &#8211; which I look after &#8211; uses <a href="http://www.isapirewrite.com/">ISAPI Rewrite</a> to provide &#8220;friendly&#8221; URLs for certain pages, and also to redirect old URLs to their new locations. Coming from a <acronym title="Linux, Apache, MySQL, PHP">LAMP</acronym> background, this is great for me as it basically works the same as Apache&#8217;s <a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">mod_rewrite</a>.</p>
<p>Previously the website responded to requests for both <strong>domain.com</strong> and <strong>www.domain.com</strong>, which is not ideal. <acronym title="Search Engine Optimisation">SEO</acronym> best practice is to either redirect the non-WWW version to the WWW version, or vice-versa. In my case, <strong>www.domain.com</strong> is the preferred format, so I&#8217;m using the following rule:</p>
<pre lang="mysql">### Redirect domain.com to www.domain.com
RewriteCond Host: ^domain\.com
RewriteRule (.*) http\://www\.domain\.com$1 [I,RP]</pre>
<p>If you want to do the opposite, you&#8217;ll need this one:</p>
<pre lang="mysql">### Redirect www.domain.com to domain.com
RewriteCond Host: ^www\.domain\.com
RewriteRule (.*) http\://domain\.com$1 [I,RP]</pre>
]]></content:encoded>
			<wfw:commentRss>http://chris.gg/2010/03/using-isapi-rewrite-to-redirect-domain-com-to-www-domain-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In detail: Argos credit card security breach</title>
		<link>http://chris.gg/2010/03/in-detail-argos-credit-card-security-breach/</link>
		<comments>http://chris.gg/2010/03/in-detail-argos-credit-card-security-breach/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 20:52:03 +0000</pubDate>
		<dc:creator>Chris Barnes</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[argos]]></category>
		<category><![CDATA[breach]]></category>
		<category><![CDATA[credit card]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[fraud]]></category>
		<category><![CDATA[receipts]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://chris.gg/?p=637</guid>
		<description><![CDATA[When I saw today&#8217;s The Register article, &#8220;Argos buries unencrypted credit card data in email receipts&#8220;, I immediately logged into my Gmail account to see if I had been affected.
It didn&#8217;t take me long to find an email receipt from an order placed in April 2009, and was able to see the problem first-hand.
Near the [...]]]></description>
			<content:encoded><![CDATA[<p>When I saw today&#8217;s <em>The Register</em> article, &#8220;<a href="http://www.theregister.co.uk/2010/03/05/argos_email_security_snafu/">Argos buries unencrypted credit card data in email receipts</a>&#8220;, I immediately logged into my Gmail account to see if I had been affected.</p>
<p>It didn&#8217;t take me long to find an email receipt from an order placed in April 2009, and was able to see the problem first-hand.</p>
<p>Near the bottom of the email is the wording &#8220;We take security of your details seriously. We may send you emails from time to time, but we would never send an email asking for your log on or card details. See <span style="text-decoration: underline;">online security</span> for further information.&#8221; The underlined words point to a page on argos.co.uk via an URL of some 1600 characters &#8211; ironically, this is where the problem lies:</p>
<pre>http://www.argos.co.uk/webapp/wcs/stores/servlet/ArgosStatic
PageSecondLevel?includeName=Security.htm&amp;langId=-1&amp;storeId=1
0001&amp;catalogId=1500001501&amp;returnToURL=PlaceOrderProgressView
?storeId=10001&amp;cardnumber=****************&amp;houseNumber=*&amp;val
idationno=***&amp;readtsandcs=on&amp;availableDeliveryOrder=********
**&amp;LockDelAddressAsBillAddress=false&amp;startmonth=&amp;paymentAddr
essId=*********&amp;javascriptEnabled=true&amp;contactAddressId=****
*****&amp;orderId=**********&amp;creditPlanId=&amp;unavailableDeliveryOr
der=**********&amp;delcity=RUGBY&amp;SCSNum=03&amp;com.ibm.commerce.cont
ext.experiment.ExperimentContext=com.ibm.commerce.context.ex
perimentimpl.ExperimentContextImpl@63656e2a&amp;switchno=&amp;emailT
ype=HTML&amp;vatReq=N&amp;voucherCode=&amp;catalogId=1500001501&amp;creditPl
anShortText=&amp;address2=&amp;address1=**********&amp;delpostcode=*****
**&amp;cardtype=VISAD&amp;FFM2011461168=5&amp;POnumber=&amp;deliveryAddressI
d=*********&amp;langId=-1&amp;startyear=&amp;eccvValidated=Y&amp;paymentName
=MR C BARNES&amp;delHouseNo=&amp;addressId=*********&amp;delcounty=Warwi
ckshire&amp;fromView=DeliveryOnlyPaymentInfo&amp;SECURE_ACTION_RESUL
T=7&amp;postcode=*******&amp;SECURE_ACCEPT_CARD=Y&amp;country=United Kin
gdom&amp;town=RUGBY&amp;endyear=****&amp;isInstantCredit=false&amp;endmonth=
**&amp;issueNo=&amp;nor=0&amp;foundValidBinCardType=valid&amp;address=******
********************&amp;instantCreditOtherCard=true&amp;instantCred
itOrder=N&amp;county=Warwickshire&amp;jspStoreDir=argos&amp;delPostcode=
&amp;continue.y=15&amp;continue.x=108&amp;cardholder=***********&amp;argosIm
pl=1&amp;deladdress2=****************</pre>
<p>Obviously I&#8217;ve redacted my personal details, but the actual text contains my full unencrypted card number, CVV code, expiry date, name as printed on the card and address &#8211; basically all the information needed for an identity theft attack. Not only was the information transmitted in clear-text when the email was sent, but the link provided is a standard insecure HTTP link which, if I were to click it, would once again transmit the information in the clear.</p>
<p>A <a href="http://www.pcpro.co.uk/news/security/356020/argos-exposes-customers-credit-card-numbers-in-emails">PC Pro</a> story on the same subject credits the find to reader Tony Graham, whose credit card details had been used fraudulently. While there&#8217;s no evidence to link this incident to the Argos breach, my card details were also misused by fraudsters around the time of my Argos order, so this could be more than a coincidence.</p>
<p>My email receipt from a subsequent order made in July last year didn&#8217;t seem to expose these details, so presumably the problem had been resolved by then. Nevertheless, I would hope Argos have the decency to contact all customers that may have been affected, making them aware of what has happened and urging them to check their statements carefully.</p>
]]></content:encoded>
			<wfw:commentRss>http://chris.gg/2010/03/in-detail-argos-credit-card-security-breach/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Stop Ctrl+Enter from sending emails in Outlook 2003</title>
		<link>http://chris.gg/2010/03/stop-ctrlenter-from-sending-emails-in-outlook-2003/</link>
		<comments>http://chris.gg/2010/03/stop-ctrlenter-from-sending-emails-in-outlook-2003/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 21:06:02 +0000</pubDate>
		<dc:creator>Chris Barnes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[outlook]]></category>
		<category><![CDATA[paste]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[send]]></category>
		<category><![CDATA[shortcut]]></category>

		<guid isPermaLink="false">http://chris.gg/?p=634</guid>
		<description><![CDATA[I use Microsoft Outlook at work and have never purposely used the Ctrl+Enter keyboard to send an email. However, I am a fairly fast typist, and sometimes don&#8217;t let go of the Ctrl key quick enough after pasting something into an email before pressing Enter for a new line, the result being a half-finished email [...]]]></description>
			<content:encoded><![CDATA[<p>I use Microsoft Outlook at work and have never purposely used the Ctrl+Enter keyboard to send an email. However, I am a fairly fast typist, and sometimes don&#8217;t let go of the Ctrl key quick enough after pasting something into an email before pressing Enter for a new line, the result being a half-finished email getting sent prematurely.</p>
<p>Fortunately there&#8217;s a <a href="http://www.andrejciho.com/windows/outlook-ctrl-enter/">registry hack</a> to disable this annoyance once and for all:</p>
<pre>[HKEY_CURRENT_USER\Software\Policies\Microsoft\
Office\11.0\Outlook\DisabledShortcutKeysCheckBoxes]
"CtrlEnter"="13,8"</pre>
<p>If you&#8217;re using Word as your email editor, add this too:</p>
<pre>[HKEY_CURRENT_USER\Software\Policies\Microsoft\
Office\11.0\Word\DisabledShortcutKeysCheckBoxes]
"CtrlEnter"="13,8"</pre>
<p>Presumably, if you&#8217;re using a different version of Office, you will need to replace 11.0 with the correct version (10.0 for Office XP, 12.0 for Office 2003, <a href="http://en.wikipedia.org/wiki/Microsoft_Office">etc.</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://chris.gg/2010/03/stop-ctrlenter-from-sending-emails-in-outlook-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IIS 5.1 (Windows XP) OK button greyed out when adding application mappings</title>
		<link>http://chris.gg/2010/03/iis-5-1-windows-xp-ok-button-greyed-out-when-adding-application-mappings/</link>
		<comments>http://chris.gg/2010/03/iis-5-1-windows-xp-ok-button-greyed-out-when-adding-application-mappings/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 20:51:49 +0000</pubDate>
		<dc:creator>Chris Barnes</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[windows xp]]></category>

		<guid isPermaLink="false">http://chris.gg/?p=631</guid>
		<description><![CDATA[This one had me flummoxed until I found the solution on the Microsoft help and support site.
Basically you need to click the &#8220;Executable&#8221; text box to initialise the path after you&#8217;ve browsed to the file.
It&#8217;s not obvious, but easy to remember once you know the workaround!
]]></description>
			<content:encoded><![CDATA[<p>This one had me flummoxed until I found the <a href="http://support.microsoft.com/kb/317948">solution</a> on the Microsoft help and support site.</p>
<p>Basically you need to click the &#8220;Executable&#8221; text box to initialise the path after you&#8217;ve browsed to the file.</p>
<p>It&#8217;s not obvious, but easy to remember once you know the workaround!</p>
]]></content:encoded>
			<wfw:commentRss>http://chris.gg/2010/03/iis-5-1-windows-xp-ok-button-greyed-out-when-adding-application-mappings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint and getElementById()</title>
		<link>http://chris.gg/2010/02/sharepoint-and-getelementbyid/</link>
		<comments>http://chris.gg/2010/02/sharepoint-and-getelementbyid/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 15:18:17 +0000</pubDate>
		<dc:creator>Chris Barnes</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[getelementbyid]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://chris.gg/?p=624</guid>
		<description><![CDATA[I&#8217;ve just found out that using JavaScript&#8217;s getElementById() function doesn&#8217;t quite work as expected when dealing with controls on SharePoint pages. This is because SharePoint uses its own identifiers, so TextBox1  becomes something like ctl00$ctl00$g_3f6d90e4_335b_467c_a53f_6ae00bca6b63$ctl00$TextBox1.
Fortunately there&#8217;s a simple solution &#8211; instead of the following (which will cause an &#8220;Object required&#8221; JavaScript error):
document.getElementById("TextBox1");
you need to use [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just found out that using JavaScript&#8217;s <strong>getElementById()</strong> function doesn&#8217;t quite work as expected when dealing with controls on SharePoint pages. This is because SharePoint uses its own identifiers, so <strong>TextBox1 </strong> becomes something like <strong>ctl00$ctl00$g_3f6d90e4_335b_467c_a53f_6ae00bca6b63$ctl00$TextBox1</strong>.</p>
<p>Fortunately there&#8217;s a simple solution &#8211; instead of the following (which will cause an &#8220;Object required&#8221; JavaScript error):</p>
<pre lang="csharp">document.getElementById("TextBox1");</pre>
<p>you need to use this, which will insert the correct full ID for the element and thus work correctly:</p>
<pre lang="csharp">document.getElementById("< %=TextBox1.ClientID%>");</pre>
<p>It gets a bit more complicated when using nested controls, which is explained in <a href="http://www.binarywave.com/blogs/eshupps/Lists/Posts/Post.aspx?List=9c93c708-e5ce-4714-bdea-499330361130&amp;ID=23">this post by Eric Shupps</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://chris.gg/2010/02/sharepoint-and-getelementbyid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeTextBox: How to fix &#8220;The type or namespace name &#8216;Toolbar&#8217; could not be found&#8221;</title>
		<link>http://chris.gg/2010/02/freetextbox-how-to-fix-the-type-or-namespace-name-toolbar-could-not-be-found/</link>
		<comments>http://chris.gg/2010/02/freetextbox-how-to-fix-the-type-or-namespace-name-toolbar-could-not-be-found/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 11:57:38 +0000</pubDate>
		<dc:creator>Chris Barnes</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[freetextbox]]></category>
		<category><![CDATA[freetextboxcontrols]]></category>
		<category><![CDATA[ftb]]></category>
		<category><![CDATA[namespace]]></category>
		<category><![CDATA[paragraph]]></category>
		<category><![CDATA[toolbar]]></category>
		<category><![CDATA[using]]></category>

		<guid isPermaLink="false">http://chris.gg/?p=614</guid>
		<description><![CDATA[I&#8217;m working on a Visual Studio 2005 ASP.NET project which makes use of FreeTextBox to provide rich text editing capability. My code sets up the toolbar programmatically but, despite following the installation instructions to the letter (including setting up the FTB TagPrefix), my code was failing to compile with The type or namespace name &#8216;Toolbar&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a Visual Studio 2005 ASP.NET project which makes use of <a href="http://freetextbox.com/">FreeTextBox</a> to provide rich text editing capability. My code <a href="http://wiki.freetextbox.com/default.aspx/FreeTextBoxWiki.ToolbarConfiguration">sets up the toolbar programmatically</a> but, despite following the <a href="http://wiki.freetextbox.com/default.aspx/FreeTextBoxWiki.Installation">installation instructions</a> to the letter (including setting up the FTB TagPrefix), my code was failing to compile with <strong>The type or namespace name &#8216;Toolbar&#8217; could not be found</strong> on the following line of code:</p>
<pre lang="csharp">Toolbar ftbTools = new Toolbar();</pre>
<p>I initially fixed this by adding the FreeTextBoxControls prefix:</p>
<pre lang="csharp">FreeTextBoxControls.Toolbar ftbTools =
                             new FreeTextBoxControls.Toolbar();</pre>
<p>But then my code fell over with a similar error on the very next line:</p>
<pre lang="csharp">ftbTools.Items.Add(new ParagraphMenu());</pre>
<p>Not wanting to have to add the <strong>FreeTextBoxControls</strong> prefix to this and my other 18 <strong>Add</strong> statements, I instead added<strong> </strong>the following <strong>using </strong>statement to my code file:</p>
<pre lang="csharp">using FreeTextBoxControls;</pre>
<p>Job done!</p>
]]></content:encoded>
			<wfw:commentRss>http://chris.gg/2010/02/freetextbox-how-to-fix-the-type-or-namespace-name-toolbar-could-not-be-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
