<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Sentient thoughts about .NET</title><link>http://msmvps.com/blogs/jonathangreensted/default.aspx</link><description>Jonathan Greensted's .NET weblog</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>i-mate JasJar and .NET CF 2.0</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/11/03/74132.aspx</link><pubDate>Thu, 03 Nov 2005 13:47:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:74132</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=74132</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/11/03/74132.aspx#comments</comments><description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;In preperation for my chalk and talk session at the Microsoft Launch 05 event next week I stated using my i-mate JasJar for CF 2.0 development and was initially extremely frustrated when I got the following error:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;#8220;Installation error.&amp;nbsp; Stop all applications and process, maximize available storage space, and run install again.&amp;nbsp; Suport inf 4.&amp;#8221;&lt;/EM&gt;&lt;/STRONG&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;That is until I found this post which helped me solve it:&lt;/P&gt;
&lt;P&gt;&lt;A title=http://groups.google.co.uk/group/microsoft.public.dotnet.framework.compactframework/browse_thread/thread/2132b052a370c220/e73203a525e50d3b?lnk=st&amp;amp;q=deploying+CF+2.0+to+JasJar&amp;amp;rnum=1&amp;amp;hl=en#e73203a525e50d3b href="http://groups.google.co.uk/group/microsoft.public.dotnet.framework.compactframework/browse_thread/thread/2132b052a370c220/e73203a525e50d3b?lnk=st&amp;amp;q=deploying+CF+2.0+to+JasJar&amp;amp;rnum=1&amp;amp;hl=en#e73203a525e50d3b"&gt;http://groups.google.co.uk/group/microsoft.public.dotnet.framework.compactframework/browse_thread/thread/2132b052a370c220/e73203a525e50d3b?lnk=st&amp;amp;q=deploying+CF+2.0+to+JasJar&amp;amp;rnum=1&amp;amp;hl=en#e73203a525e50d3b&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Basically, the JasJar comes with three programs already installed.&amp;nbsp; One of these must be using a beta of CF 2.0 which causes the Visual Studio auto deployment of CF 2.0 proper to fail.&amp;nbsp; Once I removed all three programs everything worked beautifully.&lt;/P&gt;
&lt;P&gt;If you're having the same problem I hope this help you avoid the hours and hours of wasted time I spent.&lt;/P&gt;
&lt;P&gt;J.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=74132" width="1" height="1"&gt;</description></item><item><title>Blog reading and SharpReader</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/09/12/66156.aspx</link><pubDate>Mon, 12 Sep 2005 05:27:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:66156</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=66156</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/09/12/66156.aspx#comments</comments><description>&lt;P&gt;OK, so today over lunch Mike Taulty and Benjamin Mitchell gave me a hard time about being behind on both reading and writing blogs.&amp;nbsp; I tried to deflect this by pointing out Benjamin's choice of the pink PDC t-shirt created questions around his sexuality however&amp;nbsp;his point was valid - I have been so busy with &lt;a title="Sentient" href="http://sentient.co.uk/" target="_blank"&gt;Sentient&lt;/a&gt; and &lt;a title="Mobile GPS software for sports people" href="http://www.sportsdo.info/" target="_blank"&gt;Mobile GPS software for sports people&lt;/a&gt; that I hadn't kept up.&lt;/P&gt;
&lt;P&gt;So, this afternoon I've downloaded the latest version of &lt;A href="http://www.sharpreader.net/"&gt;SharpReader&lt;/A&gt; and started adding blogs to read.&amp;nbsp; By accident I found a fantastic SharpReader feature - you can drag and drop RSS urls directly into SharpReader's Subscribed Feeds list.&amp;nbsp;&amp;nbsp;Extremely cool and saves me loads of time messing around.&amp;nbsp; I thought I'd share!&lt;/P&gt;
&lt;P&gt;J.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=66156" width="1" height="1"&gt;</description></item><item><title>PDC - Day 0</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/09/11/66145.aspx</link><pubDate>Mon, 12 Sep 2005 04:58:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:66145</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=66145</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/09/11/66145.aspx#comments</comments><description>&lt;P&gt;OK, I'm here sitting in my room in the Renaissance Hollywood Hotel.&lt;/P&gt;
&lt;P&gt;Yesterday was spent getting here.&amp;nbsp; A very early start to catch the 6.35 flight from Heathrow to Amsterdam to join the Microsoft PDC&amp;nbsp;Jumbo to LA.&amp;nbsp; The PDC Jumbo was due to leave Amsterdam at 11.15 however security look a little longer than expected so Benjamin, Clemence and I found time for a quick pre-flight beer!&amp;nbsp; &lt;EM&gt;Actually Benjamin wimped out and took a coffee complaining about already feeling a little rough after the night before.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The flight was nearly 12 hours but passed relatively quickly with the help of my new PSP and Ridge Racer - it rocks!&amp;nbsp; I also completed reading Richard Branson's Autobiography &lt;EM&gt;(seemed polite to read his book since he's paying my wages currently)&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;Having fun already bumping into people I haven't seen for a while.&amp;nbsp; It was great to bump into Benjamin during check-in at Amsterdam.&amp;nbsp; He only lives about a mile from me but we never seem to find time to catch-up.&amp;nbsp; He also managed to get us both bulk head seats which was nice!&amp;nbsp; Also, managed to grab a quick chat with both James Pratt and Steve Swartz already which is cool.&lt;/P&gt;
&lt;P&gt;Today is pre-conf day which I wasn't planning to attend but I did pop along to the Conference Centre to collect my conference pass and goodie bag.&amp;nbsp; The goodie bag is OK but not great.&amp;nbsp; First of all it's not a rucksack which is&amp;nbsp;a shame and it's just stuff full of the usual marketing guff and magazines.&amp;nbsp;The three cool things are the Channel 9 foam toy, the Universal Studio Party invite and the PDC t-shirt (so long as you didnt get a girlie pink one!)&lt;/P&gt;
&lt;P&gt;I did think I might attend the pre-conf afternoon session but wasnt prepared the full-day $300 for just the afternoon but was informed I couldn't pay $150 for afternoon because the "computer says No" !!!&amp;nbsp; &lt;EM&gt;(Even Microsoft have this problem)&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;Another thing which made me laugh was the instructions from the hotel to the conference included a streetmap which was clearly taken from Google Maps!&amp;nbsp; Steve is going to kill someone if he sees it.&lt;/P&gt;
&lt;P&gt;It appears that Windows Workflow Foundation (WWF) is the worse kept secret from the conference already.&amp;nbsp; Supposedly not announced until after Bill's keynote however it's already being discussed in the sessions and the WinFX developer reference poster included in the goodie bag details the System.Workflow namespace!&lt;/P&gt;
&lt;P&gt;Tonight is bowling night with UK DPE so I'm looking forward to hooking up with the UK DPE people and friends.&amp;nbsp; &lt;A href="http://mtaulty.com/FlexWiki/preview.aspx"&gt;http://mtaulty.com/FlexWiki/preview.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Tomorrow I'm going to attend pre-conf to find out all about:&lt;/P&gt;
&lt;DIV class=el_title&gt;&lt;EM&gt;PRE08&amp;nbsp;&amp;nbsp;Adding Integration, Analysis and Reporting Functionality to Your Application through SQL Server 2005 Business Intelligence &lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class=el_desc&gt;&lt;EM&gt;Speaker(s): &lt;SPAN style="CURSOR: hand"&gt;Bill Baker&lt;/SPAN&gt;, &lt;SPAN style="CURSOR: hand"&gt;Jason Carlson&lt;/SPAN&gt;, &lt;SPAN style="CURSOR: hand"&gt;Lukasz Pawlowski&lt;/SPAN&gt;, &lt;SPAN style="CURSOR: hand"&gt;Alex Payne&lt;/SPAN&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;P&gt;More rambling tomorrow.&lt;/P&gt;
&lt;P&gt;J.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=66145" width="1" height="1"&gt;</description></item><item><title>PDC here I come!</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/09/07/65652.aspx</link><pubDate>Wed, 07 Sep 2005 20:13:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:65652</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=65652</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/09/07/65652.aspx#comments</comments><description>&lt;P&gt;You've got to love those people at Microsoft.&lt;/P&gt;
&lt;P&gt;They've kindly invited me to attend PDC in LA next week as their guest.  Something about a "key influencer" :-)&lt;/P&gt;
&lt;P&gt;So, next week I return to blogging possibly for one week only due to the madnesses of my regular work life juggling &lt;a title="Sentient" href="http://sentient.co.uk/" target="_blank"&gt;Sentient&lt;/a&gt; and Sportsdo activities but at least for next week I plan to geek out totally, get some geeky R&amp;R and get blogging.&lt;/P&gt;
&lt;P&gt;Yippee, LA here I come.&lt;/P&gt;
&lt;P&gt;J.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=65652" width="1" height="1"&gt;</description></item><item><title>Moving from VB.netto C#</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/06/28/56159.aspx</link><pubDate>Tue, 28 Jun 2005 14:07:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:56159</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=56159</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/06/28/56159.aspx#comments</comments><description>&lt;P&gt;I am currently working with a client who is transitioning from VB.net to C# and as part of my preparation for a conversion workshop I found this very handy resource:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.harding.edu/USER/fmccown/WWW/vbnet_csharp_comparison.html"&gt;http://www.harding.edu/USER/fmccown/WWW/vbnet_csharp_comparison.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Thank you to Frank McCown for making this available.&lt;/P&gt;
&lt;P&gt;It is also interesting to see he has prepared a Java to C# comparision for those of you who have seen the light and are coming over to join the C# fun!&lt;/P&gt;
&lt;P&gt;Jonathan&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=56159" width="1" height="1"&gt;</description></item><item><title>Indigo SDR</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/04/20/43673.aspx</link><pubDate>Wed, 20 Apr 2005 19:04:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:43673</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=43673</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/04/20/43673.aspx#comments</comments><description>&lt;P&gt;It's been a couple of week since I attended the Indigo SDR event in Seattle and my head is still buzzing with excitement about it.&lt;/P&gt;
&lt;P&gt;The SDR was the first time I've gone deep on what the Indigo team have been doing and I'm impressed, infact very impressed.&amp;nbsp; The balance between capabilities, extensibility and simplicity seems to be spot on.&lt;/P&gt;
&lt;P&gt;The bit I love the most about Indigo is the worlds simplest sample code will still provide you with a secure, reliable and potentially authenticated web service call with only a few lines of code.&amp;nbsp; Security is on by default so you have to explictly turn it off rather than the other way round.&lt;/P&gt;
&lt;P&gt;I will post some Indigo sample code when I next get a few minutes spare.&lt;/P&gt;
&lt;P&gt;Indigo rocks!&amp;nbsp;&amp;nbsp; Sadly waiting for it to be launched doesnt. :-(&lt;/P&gt;
&lt;P&gt;Jonathan&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=43673" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/Web+Services/default.aspx">Web Services</category></item><item><title>Sportsdo</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/04/20/43672.aspx</link><pubDate>Wed, 20 Apr 2005 18:58:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:43672</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=43672</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/04/20/43672.aspx#comments</comments><description>&lt;P&gt;Over the past couple of months I have been focusing my time on creating a new business division within &lt;a title="Sentient" href="http://sentient.co.uk/" target="_blank"&gt;Sentient&lt;/a&gt; called Sportsdo.&amp;nbsp; Our new Sportsdo division creates software for sports people&amp;nbsp;which runs on SmartPhone and PocketPC.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://www.Sportsdo.info"&gt;www.Sportsdo.info&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;We have been through a very steep learning curve with the .NET Compact Framework and are now participating in the beta program for the next Windows Mobile platform release (Magneto).&lt;/P&gt;
&lt;P&gt;The current suite of applications we have developed include Rundo, Skido, Snowdo, Bikedo and Cycledo.&amp;nbsp;&amp;nbsp; We have many others in the pipeline too including&amp;nbsp;Golfdo, Trackdo, Saildo, etc. etc.&lt;/P&gt;
&lt;P&gt;We will make some Magneto code example available as soon as our NDA allows.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=43672" width="1" height="1"&gt;</description></item><item><title>ASP.NET Threading Nasties</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/24/36868.aspx</link><pubDate>Thu, 24 Feb 2005 16:29:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:36868</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=36868</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/24/36868.aspx#comments</comments><description>&lt;P&gt;In our &lt;A href="http://www.sentient.co.uk/publicspeaking.aspx"&gt;System.Threading talk&lt;/A&gt; we cover the impact of threading in an ASP.NET application and specifically how damaging to your applications scaleability it can be to call external systems with unpredictable performance characteristics.&amp;nbsp;(eg. SQL-Server, WebServices, COM component, java, etc).&lt;/P&gt;
&lt;P&gt;The problem here is you will be "hogging" your ASP.NET thread for the duration of the transaction.&amp;nbsp; You may not feel this is a problem because you clearly can't return the page until this external transaction has completed so you may as well wait.&amp;nbsp; You might even turn this into an async call so you can do something else in parallel however you still end up ultimately waiting for the remote system to complete before you can complete your page construction and return the page to the caller.&lt;/P&gt;
&lt;P&gt;So why is this so bad?&lt;/P&gt;
&lt;P&gt;Well the problem is you have a finite number of threads available in the Thread Pool to process page requests so if you are "hogging" them in your pages while you wait for an external system to respond you will be blocking other page requests.&lt;/P&gt;
&lt;P&gt;To demonstrate this I knocked up two aspx pages; one which did nothing and another which spun up a new thread which waited for 30 seconds before completing.&lt;/P&gt;
&lt;P&gt;When I ran my nothing page alone using ACT over 5 mins I got the following results:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Response Code: 200 - The request completed successfully. Count: 141,575 Percent (%): 100.00&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;When I ran&amp;nbsp;my nothing&amp;nbsp;page and my badly threaded page at the same time using ACT over 5 mins I got the following results (I started my thread page first which allowed it to grab all the available threads!):&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Response Code: 503 - The service is temporarily overloaded. Count: 45,169 Percent (%): 99.92&lt;BR&gt;Response Code: 500 - The server encountered an unexpected condition that prevented it from fulfilling the request. Count: 36 Percent (%): 0.08&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;So as you can see from the results above my badly threaded page completely blocked all activity on the web server for 5 whole minutes!&amp;nbsp; &lt;/P&gt;
&lt;P&gt;It is also worth noting that the processor utilisation during this period was almost zero so the web server was genuinely busy doing nothing!&lt;/P&gt;
&lt;P&gt;I have included the source code for my badly threaded page below.&amp;nbsp; In my example I use "raw" threads however remember the same applies to async calls to SQL Server, Web Services, etc.&amp;nbsp; I think this is particularly important when using 3rd party Web Services because your partners behaviour will have&amp;nbsp;a direct impact on yours.&amp;nbsp; You need to protect yourself from a scenario where your partner's response times drops through the floor or they become unavailable.&amp;nbsp; Remember this effect can be chained so they might be busy waiting on someone else!&lt;/P&gt;
&lt;P&gt;So finally what is the solution?&amp;nbsp; Well Fritz Onion has written a couple of really good articles on this both for ASP.NET 1.1 and ASP.NET 2.0 so there is no point in my repeating his excellent advice. &lt;/P&gt;
&lt;P&gt;These articles can be found at:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/default.aspx" target=_blank&gt;Use Threads and Build Asynchronous Handlers in Your Server-Side Web Code&lt;/A&gt;&amp;nbsp;(ASP.NET 1.1)&lt;BR&gt;&lt;A href="http://pluralsight.com/blogs/fritz/archive/2004/10/19/2892.aspx" target=_blank&gt;Async Pages in ASP.NET 2.0 - some results&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The moral of this story; &amp;nbsp;&lt;STRONG&gt;Be careful what code you write - I might just kill your web server!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The source code for my busy page is below.&lt;!--StartFragment--&gt;&lt;/P&gt;
&lt;DIV style="FONT-SIZE: 8pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;class&lt;/SPAN&gt; WebForm1 : System.Web.UI.Page&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;{&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; Thread _t;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; DateTime _start;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;protected&lt;/SPAN&gt; System.Web.UI.WebControls.Label Label1;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; Page_Load(&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt; sender, System.EventArgs e)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; _start = DateTime.Now;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; _t = &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; Thread(&lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; ThreadStart(MyThread));&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; _t.Start();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; MyThread()&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt; setting = ConfigurationSettings.AppSettings["ThreadWait"];&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt; wait = &lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt;.Parse(setting);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; Thread.Sleep(wait);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;override&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; OnPreRender(EventArgs e)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;base&lt;/SPAN&gt;.OnPreRender (e);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; _t.Join();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; Label1.Text = "Started - " + _start.ToLongTimeString()+"&lt;BR&gt;";&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; Label1.Text += "Finished - " + DateTime.Now.ToLongTimeString();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;nbsp; #region&lt;/SPAN&gt; Web Form Designer generated code&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;override&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; OnInit(EventArgs e)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: #008000"&gt;//&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: #008000"&gt;// CODEGEN: This call is required by the ASP.NET Web Form Designer.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: #008000"&gt;//&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; InitializeComponent();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;base&lt;/SPAN&gt;.OnInit(e);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&lt;SUMMARY&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt; Required method for Designer support - do not modify&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt; the contents of this method with the code editor.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&lt;/SUMMARY&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; InitializeComponent()&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; {&amp;nbsp; &amp;nbsp; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;this&lt;/SPAN&gt;.Load += &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; System.EventHandler(&lt;SPAN style="COLOR: #0000ff"&gt;this&lt;/SPAN&gt;.Page_Load);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;nbsp; #endregion&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;}&amp;nbsp; &lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;!--EndFragment--&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=36868" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Maven Traps</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/20/36506.aspx</link><pubDate>Sun, 20 Feb 2005 17:03:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:36506</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=36506</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/20/36506.aspx#comments</comments><description>&lt;P&gt;A friend of mine recently commented on the apparent stupidity of having a Milk Helpline listed on your regular bottle of semi-skimmed.&amp;nbsp; To his surprise I told him this was a Maven Trap.&lt;/P&gt;
&lt;P&gt;The obvious next question is "What is a Maven Trap?"&amp;nbsp; To answer this properly I decided to buy him a copy of Malcolm Gladwell's excellent book The Tipping Point which is where I first came across the term.&lt;/P&gt;
&lt;P&gt;To my surprise the chapter which talks about Maven Traps has been deleted from the current paperback edition of The Tipping Point so I contacted Malcolm Gladwell to find out why.&amp;nbsp; He wasn't aware the chapter had been removed either but was kind enough to give me permission to re-publish it on my blog so here it is:&lt;/P&gt;
&lt;HR&gt;

&lt;P&gt;&lt;B&gt;Finding the Mavens&lt;/B&gt;&lt;BR&gt;&lt;EM&gt;&lt;A href="http://www.gladwell.com/" target=_blank&gt;Malcolm Gladwell&lt;/A&gt;, &lt;A href="http://www.amazon.co.uk/exec/obidos/ASIN/0349113467/sentientbeing-21" target=_blank&gt;The Tipping Point&lt;/A&gt;&lt;/EM&gt; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Whenever I look at an unopened bar of Ivory bath soap, I flip it over and burst out laughing. In the midst of all the production information, there is a line that says: &amp;#8220;Questions? Comments? Call 1-800-395-9960.&amp;#8221; Who on earth could ever have a question about Ivory soap? In fact, who on earth would ever have a question about Ivory soap so important that they felt compelled to call the company right away? The answer, of course, is that while most of us would never dial that number, a very small percentage of profoundly weird people may well feel compelled from time to time to call in with a question. These are people who feel passionate about soap. They are the soap Mavens, and if you are in the soap business you had better treat those soap Mavens well because they are the ones whom all their friends turn to for advice about soap. &lt;/P&gt;
&lt;P&gt;The Ivory soap 800 number is what I call a Maven trap &amp;#8211; a way of efficiently figuring out who the Mavens are in a particular world &amp;#8211; and how to set Maven traps is one of the central problems facing the modern market-place. For the better part of a century, we defined influence in this country in the form of status. The most important influence in making up our minds, we were told, was the people who made the most money and who had the moist education and who lived in the choicest neighbourhoods. The virtual of this notion was that these kinds of people were easy to find: in face, and entire industry in the marketing world was created around the convenient delivery of long lists of people who had graduate degrees, made lots of money, and lived in nice neighbourhoods. But Connectors, Mavens, and Salesmen are a little different. They are distinguished not by worldly status and achievement, but by the particular standing they have among their friends. People look up to them not out of envy, but out of love, which is why these kinds of personalities have the power to break though the rising tide of isolation and immunity. But love is a very difficult thing to track. How on earth do you find these kinds of people? &lt;/P&gt;
&lt;P&gt;This is a question that I&amp;#8217;ve been asked again and again over the last year, and there is no easy answer. Connectors, I think, are the sorts of people who don&amp;#8217;t need to be found. They make it their business to find you. But Mavens are a little harder, which is whey it is so important, I think, to come up with strategies for finding Mavens &amp;#8211; Maven traps. &lt;/P&gt;
&lt;P&gt;Consider the experiences of Lexus. In 1990, just after Lexus frst introduced its line of luxury cars in the United States, the company realized that it had two minor problems with its LS400 line that required a recall. This situation was, by any measure, an awkward one. Lexus had decide, from the beginning, to build its reputation around quality workmanship and reliability. And now, within little more than a year of the brand&amp;#8217;s launch, the company was being forced to admit to problems with its flagship. So Lexus decided to make a special effort. Most recalls are handled by making an announcement to the press and mailing a notification letter to owners. Lexus, instead, call each owner individually on the telephone the day the recall was announced. When the owners picked up their cars at the dealership after the work was completed, each car had been washed and the tank filled with gas. If an owner lived more than a hundred miles from a dealership, the dealer sent a mechanic to his or her home. In one instance, a technician flew from Los Angeles to Anchorage to make the necessary repairs. &lt;/P&gt;
&lt;P&gt;Was it necessary to go to such lengths? You could argue that Lexus overreacted. The problems with the car were relatively minor. And the number of cars involved in the recall &amp;#8211; so soon after Lexus had entered the marketplace- was small. Lexus would seem to have had many opportunities to correct the damage. The key fact, though, was not the number of people affected by the recall but the kind of people affected by the recall. Who, after all, are the people willing to take a chance and buy a brand-new luxury model? Car Mavens. There may have been only a few thousand Lexus owners at that point, but they were car experts, people whose friends ask them for advice about cars. Lexus realized that it had a captive audience of Mavens and that if they went the extra mile they could kick-start a word-of-mouth epidemic about the quality of their customer service &amp;#8211; and that&amp;#8217;s just what happened. The company emerged form what could have been a disaster with a reputation for customer service that continues to this day. One automotive publication later called it &amp;#8220;the perfect recall.&amp;#8221; &lt;/P&gt;
&lt;P&gt;This is the perfect Maven trap &amp;#8211; using the recognition that sometimes a specific time or place or situation happens to bring together a perfect Maven audience. &lt;/P&gt;
&lt;HR&gt;

&lt;P&gt;I would also strongly recommend Malcolm's new book &lt;A href="http://www.amazon.co.uk/exec/obidos/ASIN/0713997273/sentientbeing-21" target=_blank&gt;Blink&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=36506" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/Social+Networks/default.aspx">Social Networks</category></item><item><title>New Technology Seminar (27th Apr)</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/17/36188.aspx</link><pubDate>Thu, 17 Feb 2005 15:52:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:36188</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=36188</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/17/36188.aspx#comments</comments><description>&lt;P&gt;We are next running our very popular "New Technology Seminar" on Wednesday 27th April.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sentient.co.uk/newtechnologyseminar.aspx"&gt;http://www.sentient.co.uk/newtechnologyseminar.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Microsoft has kindly sponsered this event which means we can offer&amp;nbsp;FREE&amp;nbsp;entry for this time only.&lt;/P&gt;
&lt;P&gt;In the&amp;nbsp;seminar we will be showing you how you can use the following technologies to improve your business effectiveness:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Blogging &lt;/STRONG&gt;- weblogs, blogs, rss, ezine replacement, subscription revenue&lt;BR&gt;&lt;STRONG&gt;Bluetooth&lt;/STRONG&gt; - bluejacking, tracking, prescence&lt;BR&gt;&lt;STRONG&gt;Google&lt;/STRONG&gt; - SEO, AdWords, AdSense&lt;BR&gt;&lt;STRONG&gt;Skype&lt;/STRONG&gt; - VoIP, SkypeOut, SkypeAPI&lt;BR&gt;&lt;STRONG&gt;Firefox&lt;/STRONG&gt; - What makes this new browser so special?&lt;BR&gt;&lt;STRONG&gt;Instant Messenger&lt;/STRONG&gt; - MSN Messenger, Video conferencing&lt;BR&gt;&lt;STRONG&gt;Wireless&lt;/STRONG&gt; - WiFi, Hotspots, Roaming.&lt;BR&gt;&lt;STRONG&gt;Mobile Devices&lt;/STRONG&gt; - SmartPhone, Tablet PC, Pocket PC (PDA)&lt;BR&gt;&lt;STRONG&gt;Location Data&lt;/STRONG&gt; - MapPoint, GPS, GIS Mapping&lt;BR&gt;&lt;STRONG&gt;Website Security&lt;/STRONG&gt; - Avoiding SQL Injection, Cross-site Scripting&lt;BR&gt;&lt;STRONG&gt;Viruses and Spyware&lt;/STRONG&gt; - Prevention is better than cure&lt;/P&gt;
&lt;P&gt;I am also constantly looking for new&amp;nbsp;technology which can help&amp;nbsp;us be more effective.&amp;nbsp; Please add your recommendations to this blog.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Jonathan&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=36188" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/Talk/default.aspx">Talk</category></item><item><title>System.Threading talk in Manchester (9th Mar) </title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/17/36186.aspx</link><pubDate>Thu, 17 Feb 2005 15:20:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:36186</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=36186</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/17/36186.aspx#comments</comments><description>&lt;P&gt;VBUG (Manchester) in association with INETA&amp;nbsp;have asked me to talk about System.Threading at their meeting on Wednesday 9th March.&lt;/P&gt;
&lt;P&gt;For more information please follow this link:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.vbug.net/events/default.asp?region=Manchester"&gt;http://www.vbug.net/events/default.asp?region=Manchester&lt;/A&gt;&amp;nbsp;(too be listed soon)&lt;/P&gt;
&lt;P&gt;Hope to see you there.&lt;/P&gt;
&lt;P&gt;Jonathan&lt;/P&gt;
&lt;P&gt;PS. When I originally posted this the topic was SharePoint so if you are seeing cached/aggregated version of this that explains the disparity.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=36186" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/Talk/default.aspx">Talk</category></item><item><title>System.Threading talk in Essex (4th Apr) </title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/17/36185.aspx</link><pubDate>Thu, 17 Feb 2005 15:18:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:36185</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=36185</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/17/36185.aspx#comments</comments><description>&lt;P&gt;VBUG (Essex) in association with INETA have asked me to talk about System.Threading at their meeting on Monday 4th April.&lt;/P&gt;
&lt;P&gt;For more information please follow this link:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#800080&gt;&lt;FONT color=#000000&gt;&lt;A href="http://www.vbug.net/events/default.asp"&gt;http://www.vbug.net/events/default.asp&lt;/A&gt;&lt;A href="http://www.vbug.net/events/default.asp?region=Leicester"&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;A href="http://www.vbug.net/events/default.asp?region=Portsmouth"&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Hope to see you there.&lt;/P&gt;
&lt;P&gt;Jonathan&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=36185" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/Talk/default.aspx">Talk</category></item><item><title>SharePoint talk in London (15th Mar)</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/17/36184.aspx</link><pubDate>Thu, 17 Feb 2005 15:16:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:36184</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=36184</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/17/36184.aspx#comments</comments><description>&lt;P&gt;VBUG (London) in association with INETA have asked me to talk about SharePoint at their meeting on Wednesday 15th March.&lt;/P&gt;
&lt;P&gt;For more information please follow this link:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.vbug.net/events/default.asp?region=London"&gt;http://www.vbug.net/events/default.asp?region=London&lt;/A&gt;&lt;A href="http://www.vbug.net/events/default.asp?region=Portsmouth"&gt;&lt;FONT color=#000080&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hope to see you there.&lt;/P&gt;
&lt;P&gt;Jonathan&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=36184" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/Talk/default.aspx">Talk</category></item><item><title>Threading - IsBackground</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/16/36077.aspx</link><pubDate>Wed, 16 Feb 2005 22:52:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:36077</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=36077</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/16/36077.aspx#comments</comments><description>&lt;P&gt;During&amp;nbsp;my System.Threading talk last night one of the questions from the audience&amp;nbsp;asked what the&amp;nbsp;IsBackground property&amp;nbsp;on the Thread classes was used for.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The intellisense for this property&amp;nbsp;says "Gets or Sets a value indicating whether or not the tread is a background thread." which to be honest I think we could have guessed!&amp;nbsp; What this description lacks is any information about why you would want to set it.&lt;/P&gt;
&lt;P&gt;It's always embarrassing when you can't immediately answer a question from the audience but in this case I was stumped so I promised to investigate the answer and here it is.&lt;/P&gt;
&lt;P&gt;The IsBackground property allows you to tell the runtime if the thread is a foreground (UI) thread or a background thread.&amp;nbsp;&amp;nbsp; By default all threads are created as foreground threads unless you change this property.&lt;/P&gt;
&lt;P&gt;So why do we care?&lt;/P&gt;
&lt;P&gt;Well, the .NET runtime does something special when the last foreground thread terminates - it aborts all the background threads and terminates the application.&amp;nbsp; (We know Thread.Abort is bad however if the application is being shutdown anyway that badness has a very limited duration.)&lt;/P&gt;
&lt;P&gt;This can be nicely illustrated by creating a WinForms application which launches a background thread which runs forever.&amp;nbsp;&amp;nbsp; By default when you run your application it will run forever unless you explicitly abort the background thread or the application.&amp;nbsp; This can be seen by running&amp;nbsp;your simple application, closing the Form1 window and noticing the application is still running.&lt;/P&gt;
&lt;P&gt;If however you set IsBackground to true after creating your background thread:&lt;!--StartFragment--&gt;&lt;/P&gt;
&lt;DIV style="FONT-SIZE: 8pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
&lt;P style="MARGIN: 0px"&gt;Thread t = &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; Thread(&lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; ThreadStart(BackgroundThread));&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;t.IsBackground = &lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;t.Start();&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;You will notice that when you close the only&amp;nbsp;window (Form1)&amp;nbsp;the application will terminate.&lt;!--EndFragment--&gt;&lt;/P&gt;
&lt;P&gt;I will certainly be updating our System.Threading presentation to explain this behaviour more clearly in the future.&amp;nbsp; A great question and something we should all be doing.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=36077" width="1" height="1"&gt;</description></item><item><title>System.Threading talk in Coventry (15th Feb)</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/08/35293.aspx</link><pubDate>Tue, 08 Feb 2005 17:48:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:35293</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=35293</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/08/35293.aspx#comments</comments><description>&lt;P&gt;VBUG (Coventry) in association with INETA have asked me to talk about System.Threading at their meeting on Tuesday 15th February.&lt;/P&gt;
&lt;P&gt;For more information please follow this link:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#800080&gt;&lt;FONT color=#000000&gt;&lt;A href="http://www.vbug.net/events/default.asp?region=Leicester"&gt;http://www.vbug.net/events/default.asp?region=Leicester&lt;/A&gt;&lt;/FONT&gt;&lt;A href="http://www.vbug.net/events/default.asp?region=Portsmouth"&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Hope to see you there.&lt;/P&gt;
&lt;P&gt;Jonathan&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=35293" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/Talk/default.aspx">Talk</category></item><item><title>SharePoint talk in Horsham (10th Feb)</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/08/35292.aspx</link><pubDate>Tue, 08 Feb 2005 17:46:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:35292</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=35292</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/02/08/35292.aspx#comments</comments><description>&lt;P&gt;VBUG (Horsham) in association with INETA have asked me to talk about SharePoint at their meeting on Thursday 10th February.&lt;/P&gt;
&lt;P&gt;For more information please follow this link:&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;FONT color=#800080&gt;&lt;A href="http://www.vbug.net/events/default.asp?region=Portsmouth"&gt;http://www.vbug.net/events/default.asp?region=Portsmouth&lt;/A&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Hope to see you there.&lt;/P&gt;
&lt;P&gt;Jonathan&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=35292" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/Talk/default.aspx">Talk</category></item><item><title>Inserting Pictures using WordML</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/01/11/31462.aspx</link><pubDate>Tue, 11 Jan 2005 23:39:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:31462</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=31462</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2005/01/11/31462.aspx#comments</comments><description>&lt;P&gt;
			I've seen many, many requests on the Microsoft newsgroups asking how you can 
			insert a picture into a Word document without saving it to the file system 
			first.
		&lt;/P&gt;
		&lt;P&gt;This example application described in this blog illustrates both methods for 
			inserting a picture firstly using the Word object model 
			(InlineShapes.AddPicture) and secondly using Word's XML support (InsertXML).&lt;/P&gt;
		&lt;P&gt;The Word object model code is very straight forward:&lt;!--StartFragment--&gt;&lt;/P&gt;
		&lt;DIV style="FONT-SIZE: 8pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
			&lt;DIV style="FONT-SIZE: 8pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt;
					&lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt;
					buttonInsertNormal_Click(&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt;
					sender, System.EventArgs e)&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;{&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt;
					oMissing = Type.Missing;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt;
					oCollapseEnd = Word.WdCollapseDirection.wdCollapseEnd;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; _wordApp.ActiveDocument.Content.Collapse(&lt;SPAN style="COLOR: #0000ff"&gt;ref&lt;/SPAN&gt;
					oCollapseEnd);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;
					filename = @"c:\temp\WordMLImage.bmp";&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; {&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; pictureBox1.Image.Save(filename);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; 
					_wordApp.ActiveWindow.Selection.Range.InlineShapes.AddPicture(filename,
				&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;ref&lt;/SPAN&gt;
					oMissing,
					&lt;SPAN style="COLOR: #0000ff"&gt;ref&lt;/SPAN&gt;
					oMissing,
					&lt;SPAN style="COLOR: #0000ff"&gt;ref&lt;/SPAN&gt;
					oMissing);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; }&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;finally&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; {&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; File.Delete(filename);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; }&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;}&lt;!--EndFragment--&gt;&lt;/P&gt;
			&lt;/DIV&gt;
		&lt;/DIV&gt;
		&lt;P&gt;&lt;!--EndFragment--&gt;&lt;/P&gt;
		&lt;P&gt;
			The only problem with this code is the requirement to write the image to the 
			file system so Word can reload it.&amp;nbsp; There are many circumstances where you 
			would prefer to avoid touching the file system or maybe your application does 
			not have write permission.
		&lt;/P&gt;
		&lt;P&gt;Fortunately there is an alternative approach using Word's XML support.&amp;nbsp; 
			This approach requires us to constructing a WordML document fragment 
			representing the image to be inserted and then calling Word's InsertXML 
			function to place the image in the document.&lt;/P&gt;
		&lt;P&gt;The code to do this is as follows:&lt;!--StartFragment--&gt;&lt;/P&gt;
		&lt;DIV style="FONT-SIZE: 8pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;!--StartFragment--&gt; &lt;!--EndFragment--&gt; &lt;!--StartFragment--&gt;&lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt;
				&lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt;
				buttonInsertWordML_Click(&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt;
				sender, System.EventArgs e)&lt;/P&gt;
			&lt;DIV style="FONT-SIZE: 8pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
				&lt;P style="MARGIN: 0px"&gt;{&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt;
					oMissing = Type.Missing;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt;
					oCollapseEnd = Word.WdCollapseDirection.wdCollapseEnd;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; _wordApp.ActiveDocument.Content.Collapse(&lt;SPAN style="COLOR: #0000ff"&gt;ref&lt;/SPAN&gt;
					oCollapseEnd);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; {&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; PictWriter pw =
					&lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt;
					PictWriter(pictureBox1.Image, "Example Image", "Example Image");&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; 
					_wordApp.ActiveWindow.Selection.Range.InsertXML(pw.ToString(),
					&lt;SPAN style="COLOR: #0000ff"&gt;ref&lt;/SPAN&gt;
					oMissing);&amp;nbsp; &amp;nbsp;
				&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; }&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;catch&lt;/SPAN&gt;
					(Exception ex)&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; {&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// do 
something sensible here.&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; }&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;}&lt;!--EndFragment--&gt;&lt;/P&gt;
			&lt;/DIV&gt;
		&lt;/DIV&gt;
		&lt;P&gt;You will notice the use of a custom class called &lt;a title="Sentient" href="http://sentient.co.uk/" target="_blank"&gt;Sentient&lt;/a&gt;.WordML.PictWriter 
			which handles the task of converting the image into the WordML document 
			fragment.&lt;/P&gt;
		&lt;P&gt;The complete class source is included in the zip download at the end of the 
			article however the core elements are the following two methods.&amp;nbsp;
		&lt;/P&gt;
		&lt;P&gt;WriteDoc handles writing the WordML document wrapper.&amp;nbsp; InsertXML expects a 
			complete WordML document including full namespace references and style 
			definitions if you are using styles (we are not).&lt;/P&gt;
		&lt;P&gt;WritePict handles writing the actual image data into the XML stream as Base64.&lt;/P&gt;
		&lt;DIV style="FONT-SIZE: 8pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;&lt;!--EndFragment--&gt;  &lt;!--StartFragment--&gt; &lt;!--EndFragment--&gt; &lt;!--StartFragment--&gt;
			&lt;DIV style="FONT-SIZE: 8pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt; Write the whole WordML document&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&amp;lt;param 
name="wtr"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt;The XmlTextWriter to write 
to&lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;protected&lt;/SPAN&gt;
					&lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt;
					WriteDoc(XmlTextWriter wtr)&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;{&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// start &amp;lt;xml&amp;gt; 
tag&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteStartDocument();&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// add processing 
instructions&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteProcessingInstruction("mso-application", 
					"progid=\"Word.Document\"");&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// start 
&amp;lt;wordDocument&amp;gt; tag&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteStartElement("w", "wordDocument", WordMLNS);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// write 
namespaces&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;foreach&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;
					prefix
					&lt;SPAN style="COLOR: #0000ff"&gt;in&lt;/SPAN&gt;
					_namespaces.AllKeys)&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; {&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp; wtr.WriteAttributeString("xmlns", prefix,
					&lt;SPAN style="COLOR: #0000ff"&gt;null&lt;/SPAN&gt;, _namespaces[prefix]);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; }&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// start &amp;lt;body&amp;gt; 
tag&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteStartElement("body", WordMLNS);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// call WritePict to 
add our image to the Xml stream.&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; WritePict(wtr);
				&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// end &amp;lt;body&amp;gt; 
tag&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteEndElement();
				&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// end 
&amp;lt;wordDocument&amp;gt; tag&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteEndElement();
				&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// end &amp;lt;xml&amp;gt; 
tag&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteEndDocument();&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;}&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt; Write the Pict WordML element&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #808080"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&amp;lt;param 
name="wtr"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt;The XmlTextWriter to write 
to&lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;protected&lt;/SPAN&gt;
					&lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt;
					WritePict(XmlTextWriter wtr)&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;{&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt;(_data==&lt;SPAN style="COLOR: #0000ff"&gt;null&lt;/SPAN&gt;)&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; {&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; &amp;nbsp;
					&lt;SPAN style="COLOR: #0000ff"&gt;return&lt;/SPAN&gt;;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; }&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// start &amp;lt;pict&amp;gt; 
tag&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteStartElement("pict", WordMLNS);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// start 
&amp;lt;binData&amp;gt; tag&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteStartElement("binData", WordMLNS);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteAttributeString("name", WordMLNS,
					&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;.Format("wordml://{0}{1}", _name, 
					_extension));&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// write the image as 
Base64&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteBase64(_data, 0, _data.Length);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// end 
&amp;lt;binData&amp;gt; tag&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteEndElement();&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// start 
&amp;lt;shape&amp;gt; tag which describes the shape containing the image&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteStartElement("shape", VMLNS);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteAttributeString("id", "_x0000_" + _name);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteAttributeString("style",
					&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;.Format("width:{0}px;height:{1}px", 
					_width, _height));&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// start 
&amp;lt;imagedata&amp;gt; tag which links to the &amp;lt;binData&amp;gt; above.&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteStartElement("imagedata", VMLNS);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteAttributeString("src",
					&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;.Format("wordml://{0}{1}", _name, 
					_extension));&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteAttributeString("title", OfficeNS, _title);&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// end 
&amp;lt;imagedata&amp;gt; tag&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteEndElement();&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// end &amp;lt;shape&amp;gt; 
tag&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteEndElement();&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;
					&lt;SPAN style="COLOR: #008000"&gt;// end &amp;lt;pict&amp;gt; 
tag&lt;/SPAN&gt;&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp; wtr.WriteEndElement();&lt;/P&gt;
				&lt;P style="MARGIN: 0px"&gt;}&lt;/P&gt;
			&lt;/DIV&gt; &lt;!--EndFragment--&gt;&lt;/DIV&gt;
		&lt;P&gt;As you can see the InsertXML approach requires a little more code however does 
			achieve our objective of not touching the file system.
		&lt;/P&gt;
		&lt;P&gt;The only drawback I've found with the InsertXML approach is you dont get the 
			image autosizing functionality which means if you want the image to be reduced 
			or enlarged in size you'll have to do this yourself in code either by resizing 
			the image before inserting it or using the Word object model to manipulate the 
			InlineShape properties after it has been inserted.&lt;/P&gt;
		&lt;P&gt;A major bonus is that using InsertXML is considerably faster than writing 
			the image to the file system and then calling InlineShape.Add so you get a 
			considerable performance improvement especially if you are working with large 
			images.&lt;/P&gt;
		&lt;P&gt;The source for this experimentation can be downloaded from the following page on 
			the &lt;a title="Sentient" href="http://sentient.co.uk/" target="_blank"&gt;Sentient&lt;/a&gt; website:
		&lt;/P&gt;
		&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://www.sentient.co.uk/WordMLInsertPicture.aspx"&gt;
				http://www.sentient.co.uk/WordMLInsertPicture.aspx&lt;/A&gt;&lt;/P&gt;
		&lt;P&gt;If you know of a better way to do this please add a comment to this blog.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=31462" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/Word/default.aspx">Word</category></item><item><title>Finding word styles fast</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2004/12/07/22717.aspx</link><pubDate>Tue, 07 Dec 2004 15:13:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:22717</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=22717</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2004/12/07/22717.aspx#comments</comments><description>&lt;P&gt;In a recent project we had a scenario where we had to find all the paragraphs in 
			a particular style eg. Heading 1, Heading 2, etc. to build a custom table of 
			contents.
		&lt;/P&gt;
		&lt;P&gt;
		My initial thought was to iterate over the document paragraphs looking for the 
		particular style we were interested in.
		&lt;P&gt;The code looked like this: 
			&lt;!--StartFragment--&gt;
			&lt;div style="FONT-SIZE: 10pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
				&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #0000ff"&gt;&lt;/span&gt;
					&amp;nbsp;&lt;/p&gt;
				&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt;
					&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt;
					FindStyleUsingParagraphIteration(Word.Document doc,
					&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;
					style)&lt;/P&gt;
				&lt;p style="MARGIN: 0px"&gt;{&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
					&lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt;
					(Word.Paragraph p
					&lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt;
					doc.Paragraphs)&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Word.Style s = 
					(Word.Style)p.Range.get_Style();&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
					&lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt;
					(s.NameLocal == style)&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
					&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;
					text = p.Range.Text;&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
					&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt;
					page = (&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt;) 
					p.Range.get_Information(Word.WdInformation.wdActiveEndPageNumber);&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
					Single vert = (Single) 
					p.Range.get_Information(Word.WdInformation.wdVerticalPositionRelativeToPage);&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Message +=   
					 
					&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Format("&amp;nbsp;&amp;nbsp;&amp;nbsp; 
					&amp;nbsp;&amp;nbsp;&amp;nbsp; Style: {0}, text: {1}, page: {2}, vert: {3}",&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
					&amp;nbsp;&amp;nbsp;&amp;nbsp; s.NameLocal, p.Range.Text, page, vert.ToString());&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
				&lt;p style="MARGIN: 0px"&gt;}&lt;/p&gt;
				&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
			&lt;/div&gt; &lt;!--EndFragment--&gt;
			&lt;DIV&gt;&lt;/DIV&gt;
		&lt;P&gt; &lt;!--EndFragment--&gt; This worked perfectly however it was a little slow so I 
			looked for a better approach.
		&lt;/P&gt;
		&lt;P&gt;My second attempt was to use Word's built in Find functionality to find 
			paragraphs in a particular style.
		&lt;/P&gt;
		&lt;P&gt;The code looked like this: 
			&lt;!--StartFragment--&gt;&lt;/P&gt;
		&lt;div style="FONT-SIZE: 10pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
			&lt;p style="MARGIN: 0px"&gt;&lt;span style="COLOR: #0000ff"&gt;&lt;/span&gt;
				&amp;nbsp;&lt;/p&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt;
				&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt;
				FindStyleUsingFind(Word.Document doc,
				&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;
				style)&lt;/P&gt;
			&lt;p style="MARGIN: 0px"&gt;{&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
				&lt;span style="COLOR: #0000ff"&gt;object&lt;/span&gt;
				oMissing = Type.Missing;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
				&lt;span style="COLOR: #0000ff"&gt;object&lt;/span&gt; oTrue =
				 
				&lt;span style="COLOR: #0000ff"&gt;true&lt;/span&gt;;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
				&lt;span style="COLOR: #0000ff"&gt;object&lt;/span&gt;
				oStyle = style;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Word.Range r = doc.Content;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
				&lt;span style="COLOR: #0000ff"&gt;bool&lt;/span&gt; found =
				 
				&lt;span style="COLOR: #0000ff"&gt;true&lt;/span&gt;;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
				&lt;span style="COLOR: #0000ff"&gt;while&lt;/span&gt;
				(found)&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
				&lt;span style="COLOR: #0000ff"&gt;try&lt;/span&gt;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				r.Find.ClearFormatting();&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				r.Find.set_Style(&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oStyle);&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				found = r.Find.Execute(&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
			&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				&amp;nbsp;&amp;nbsp;&amp;nbsp;
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oTrue,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing,
				&lt;span style="COLOR: #0000ff"&gt;ref&lt;/span&gt;
				oMissing);&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
				&lt;span style="COLOR: #0000ff"&gt;catch&lt;/span&gt;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; found =   
				 
				&lt;span style="COLOR: #0000ff"&gt;false&lt;/span&gt;;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
				&lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt;
				(found)&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
				&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;
				text = r.Text;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
				&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt;
				page = (&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt;) 
				r.get_Information(Word.WdInformation.wdActiveEndPageNumber);&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				Single vert = (Single) 
				r.get_Information(Word.WdInformation.wdVerticalPositionRelativeToPage);&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Message +=   
				 
				&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Format("&amp;nbsp;&amp;nbsp;&amp;nbsp; 
				&amp;nbsp;&amp;nbsp;&amp;nbsp; Style: {0}, text: {1}, page: {2}, vert: {3}",&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				&amp;nbsp;&amp;nbsp;&amp;nbsp; oStyle.ToString(), r.Text, page, vert.ToString());&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
			&lt;/p&gt;
			&lt;p style="MARGIN: 0px"&gt;}&lt;/p&gt;
		&lt;/div&gt; &lt;!--EndFragment--&gt;
&lt;P&gt;
		&lt;br&gt;
		The performance of this approach was much better 
however it resulted in the Word status bar flickering as it performed the Finds 
so I started looking for a third option. &lt;/P&gt;
&lt;P&gt;My third attempt was to use Word's built in XML support and write an xpath 
against the WordML schema.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The code looks like this:&lt;!--StartFragment--&gt;&lt;/P&gt;
&lt;DIV 
style="FONT-SIZE: 10pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt; &lt;SPAN 
style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; FindStyleUsingXPath(Word.Document doc, &lt;SPAN 
style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt; style)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;{&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN 
style="COLOR: #0000ff"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN 
style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt; schema = 
"xmlns:w=\"http://schemas.microsoft.com/office/word/2003/wordml\"";&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN 
style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt; xPath = &lt;SPAN 
style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;.Format("//w:p[descendant::w:pStyle[@w:val='{0}']]/w:r/w:t", 
style);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Word.XMLNodes nodes 
= doc.SelectNodes(xPath,schema,&lt;SPAN style="COLOR: #0000ff"&gt;false&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN 
style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt; (nodes != &lt;SPAN 
style="COLOR: #0000ff"&gt;null&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;SPAN style="COLOR: #0000ff"&gt;foreach&lt;/SPAN&gt; (Word.XMLNode node &lt;SPAN 
style="COLOR: #0000ff"&gt;in&lt;/SPAN&gt; nodes)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
{&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt; page = (&lt;SPAN 
style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt;) 
node.Range.get_Information(Word.WdInformation.wdActiveEndPageNumber);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Single vPos = (Single) 
node.Range.get_Information(Word.WdInformation.wdVerticalPositionRelativeToPage);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt; text = 
node.Text;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Message += &lt;SPAN 
style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;.Format("&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Page (0), vert (1), (2)\n", page, vPos, text);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
}&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN 
style="COLOR: #0000ff"&gt;catch&lt;/SPAN&gt;(Exception ex)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Message += 
ex.Message;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;}&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt; Sadly this is where it all went wrong.&amp;nbsp; The code ran 
fine (without any exceptions being thrown) however it returned no 
results!&lt;/P&gt;
&lt;P&gt;The first thing&amp;nbsp;I noted was that it took longer to return no results 
than my Find attempt took to do the job properly so this isn't a good approach 
in terms of performance anyway&amp;nbsp;however it was strange that it didn't return 
any results.&amp;nbsp; After some investigate I found that the wordml namespace was 
not registered in the doc.XMLSchemaReferences collection so I thought that maybe 
I should add it manually using the following code:&amp;nbsp;&lt;!--StartFragment--&gt; 
&lt;/P&gt;
&lt;DIV 
style="FONT-SIZE: 10pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt; oNamespaceURI 
= "http://schemas.microsoft.com/office/word/2003/wordml";&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt; oAlias = 
"w";&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt; oFileLocation 
= @"C:\Program Files\Microsoft Office 2003 Developer Resources\Microsoft Office 
2003 XML Reference Schemas\WordprocessingML Schemas\w10.xsd";&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt; schema = &lt;SPAN 
style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;.Format("xmlns:{0}=\"{1}\"",oNamespaceURI, 
oAlias);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;doc.XMLSchemaReferences.Add(&lt;SPAN 
style="COLOR: #0000ff"&gt;ref&lt;/SPAN&gt; oNamespaceURI, &lt;SPAN 
style="COLOR: #0000ff"&gt;ref&lt;/SPAN&gt; oAlias, &lt;SPAN 
style="COLOR: #0000ff"&gt;ref&lt;/SPAN&gt; oFileLocation, &lt;SPAN 
style="COLOR: #0000ff"&gt;false&lt;/SPAN&gt;);&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;Unfortunately&amp;nbsp;this code generates&amp;nbsp;the following&amp;nbsp;exception "This schema 
cannot be used because it attempts to declare a namespace reserved by Word." so 
that&amp;nbsp;isn't the answer.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Finally in frustration I emailed a buddy of mine on the Office team who confirmed 
definatively that SelectNodes(...) would only&amp;nbsp;work custom schemas and 
not WordML.&amp;nbsp; So there you have it,&amp;nbsp;don't waste your time like me&amp;nbsp;trying to do 
this until at least the next version.&amp;nbsp; &lt;EM&gt;(I have submitted a feature 
request)&lt;/EM&gt;.&lt;!--EndFragment--&gt;&lt;/P&gt;
&lt;P&gt;For those of you who are interested in the relative performance here are the stats for my test 
document:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using Paragraph 
iteration: 10.1445872 seconds&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using Find: 

1.9928656 seconds&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using XPath: 4.9771568 
seconds (failed)&lt;/P&gt;
&lt;P&gt;My conclusion was to use the Find.Execute method and put up with the status 
bar flickering!&lt;/P&gt;
&lt;P&gt;The source for this experimentation can be downloaded from the following page 
on the &lt;a title="Sentient" href="http://sentient.co.uk/" target="_blank"&gt;Sentient&lt;/a&gt; website:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A 
href="http://www.sentient.co.uk/wordFindStyle.aspx"&gt;http://www.sentient.co.uk/wordFindStyle.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If you know of a better way to do this please add a comment to this blog.&lt;!--EndFragment--&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=22717" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/Word/default.aspx">Word</category></item><item><title>ASP.net Button submission control</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2004/11/24/20495.aspx</link><pubDate>Wed, 24 Nov 2004 15:16:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:20495</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>36</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=20495</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2004/11/24/20495.aspx#comments</comments><description>		&lt;P&gt;I am often asked how to intercept the postback when an &amp;lt;asp:Button/&amp;gt; is 
			clicked.&amp;nbsp; The answer is not immediately obvious but once you know the 
			trick it is very straight forward.&lt;/P&gt;
		&lt;P&gt;What makes this tricky is that an &amp;lt;asp:Button/&amp;gt; renders as &amp;lt;input 
			type="submit" ... /&amp;gt; which means that the page will submit automatically 
			when the button is clicked.
		&lt;/P&gt;
		&lt;P&gt;This appears to not give you an opportunity to intercept the click however 
			the first little bit of magic you need to know is that if the button has an 
			"onclick" event that will fire before the page is submitted and the 
			second little bit of magic to know is that the boolean return value from your 
			"onclick" event determines if the page submission continues (return 
			true) or not (return false).&lt;/P&gt;
		&lt;P&gt;So, this sample code will ask you to confirm the postback and provide you and 
			option to cancel the submittion:&lt;/P&gt;
		&lt;P&gt;&lt;STRONG&gt;WebForm1.aspx&lt;/STRONG&gt;&lt;/P&gt;
		&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="BACKGROUND: #ffff00"&gt;&amp;lt;%@ Page language="c#" 
					Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" 
					Inherits="ButtonClick.WebForm1" %&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;!&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;DOCTYPE&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;HTML&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt; &lt;/SPAN&gt;
				&lt;SPAN style="COLOR: #ff0000"&gt;PUBLIC&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;
					"-//W3C//DTD HTML 4.0 Transitional//EN"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt; &lt;/SPAN&gt;
				&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;HTML&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;HEAD&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;title&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;WebForm1&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;title&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;meta&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="GENERATOR"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;Content&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="Microsoft 
					Visual Studio .NET 7.1"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;meta&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="CODE_LANGUAGE"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;Content&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="C#"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;meta&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="vs_defaultClientScript"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;content&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="JavaScript"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;meta&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="vs_targetSchema"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;content&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="http://schemas.microsoft.com/intellisense/ie5"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;HEAD&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;body&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;form&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="Form1"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;method&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="post"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="server"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;P&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;Click 
				the button to trigger the confirmButton() javascript function.&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;P&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;P&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;asp:Button&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="ButtonSubmit"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="server"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="Submit"&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;asp:Button&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;P&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;P&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;asp:Label&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="LabelStatus"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff00ff"&gt;
				&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="server"&amp;gt;&lt;/SPAN&gt;Status:
				&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;asp:Label&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;P&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;form&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;body&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;HTML&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
		&lt;/DIV&gt;
		&lt;P&gt;&lt;STRONG&gt;WebForm1.aspx.cs&lt;!--EndFragment--&gt; &lt;!--StartFragment--&gt;&lt;/STRONG&gt;&lt;/P&gt;
		&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: Courier New"&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;using&lt;/SPAN&gt; System;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;using&lt;/SPAN&gt; System.Collections;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;using&lt;/SPAN&gt; System.ComponentModel;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;using&lt;/SPAN&gt; System.Data;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;using&lt;/SPAN&gt; System.Drawing;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;using&lt;/SPAN&gt; System.Web;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;using&lt;/SPAN&gt; System.Web.SessionState;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;using&lt;/SPAN&gt; System.Web.UI;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;using&lt;/SPAN&gt; System.Web.UI.WebControls;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;using&lt;/SPAN&gt; System.Web.UI.HtmlControls;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;namespace&lt;/SPAN&gt; ButtonClick&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;{&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;public&lt;/SPAN&gt;
				&lt;SPAN style="COLOR: #0000ff"&gt;class&lt;/SPAN&gt; WebForm1 : System.Web.UI.Page&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					protected&lt;/SPAN&gt; System.Web.UI.WebControls.Button ButtonSubmit;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					protected&lt;/SPAN&gt; System.Web.UI.WebControls.Label LabelStatus;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					private&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; Page_Load(&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt;
				sender, System.EventArgs e)&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					string&lt;/SPAN&gt; jsConfirm = @"&amp;lt;script language='javascript'&amp;gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				function confirmButton()
			&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {
			&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				&amp;nbsp;&amp;nbsp;&amp;nbsp; var agree=confirm('Are you sure you wish to continue?');&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				&amp;nbsp;&amp;nbsp;&amp;nbsp; if (agree)&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				&amp;lt;/script&amp;gt;";&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				Page.RegisterClientScriptBlock("confirm",jsConfirm);&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				ButtonSubmit.Attributes.Add("onclick","return confirmButton();");&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
					&amp;nbsp;&amp;nbsp;&amp;nbsp; #region&lt;/SPAN&gt; Web Form Designer generated code&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					override&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;
					void&lt;/SPAN&gt; OnInit(EventArgs e)&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #008000"&gt;
					//&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #008000"&gt;
					// CODEGEN: This call is required by the ASP.NET Web Form Designer.&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #008000"&gt;
					//&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				InitializeComponent();&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					base&lt;/SPAN&gt;.OnInit(e);&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #808080"&gt;
					///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #808080"&gt;
					///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt; Required method for Designer support - 
					do not modify&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #808080"&gt;
					///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt; the contents of this method with the 
					code editor.&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #808080"&gt;
					///&lt;/SPAN&gt;&lt;SPAN style="COLOR: #008000"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #808080"&gt;&amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					private&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; InitializeComponent()&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;
			&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					this&lt;/SPAN&gt;.ButtonSubmit.Click += &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; System.EventHandler(&lt;SPAN style="COLOR: #0000ff"&gt;this&lt;/SPAN&gt;.ButtonSubmit_Click);&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					this&lt;/SPAN&gt;.Load += &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; System.EventHandler(&lt;SPAN style="COLOR: #0000ff"&gt;this&lt;/SPAN&gt;.Page_Load);&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
					&amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion&lt;/SPAN&gt;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: #0000ff"&gt;
					private&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; ButtonSubmit_Click(&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt;
				sender, System.EventArgs e)&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
				LabelStatus.Text = "Status: ASP Button (Server click)";&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
			&lt;P style="MARGIN: 0px"&gt;}&lt;!--EndFragment--&gt;&lt;/P&gt;
		&lt;/DIV&gt;
		&lt;P&gt;Easy when you know how!&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=20495" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jonathangreensted/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Reporting Services security credentials</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2004/11/23/20354.aspx</link><pubDate>Tue, 23 Nov 2004 20:51:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:20354</guid><dc:creator>jonathangreensted</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/jonathangreensted/rsscomments.aspx?PostID=20354</wfw:commentRss><comments>http://msmvps.com/blogs/jonathangreensted/archive/2004/11/23/20354.aspx#comments</comments><description>A colleague of mine, Nick Francis, has just blogged about the importance of backing up your Reporting Services security key.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.sentient.co.uk/blogs/nickfr/2.aspx"&gt;http://www.sentient.co.uk/blogs/nickfr/2.aspx&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Without this important step you are in real trouble if someone changes the security credentials used by Report Services in your environment.&lt;br&gt;
&lt;br&gt;
As Nick says, "Do it now!"&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=20354" width="1" height="1"&gt;</description></item></channel></rss>