<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.microsoft.co.il/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>Michael Neiter&amp;#39;s Blog</title><link>http://blogs.microsoft.co.il/blogs/mneiter/</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>MediaSuite.NET</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2012/11/20/mediasuite-net.aspx</link><pubDate>Tue, 20 Nov 2012 18:06:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1461226</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>32</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2012/11/20/mediasuite-net.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Overview:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;MediaSuite.NET is the independent Multimedia Framework for Microsoft .NET. Providing unmatched performance and flexibility for all your Multimedia needs. Self contained and independent of other frameworks such as Directshow, Media Foundation or FFmpeg, MediaSuite.NET features all aspects usually only provided through native frameworks and functionality sold by multiple vendors. With MediaSuite, everything is in the box. Ready for use commercially.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.streamcoders.com/" href="http://www.streamcoders.com/"&gt;ttp://www.streamcoders.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Sample Code:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=1"&gt;RTP Reception, H.263 decoding and display&lt;/a&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=2"&gt;CamCapture.NET, WaveInput &amp;amp; WaveOutput&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=3"&gt;Audio Encoder/Decoder setup and feedback loop&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=4"&gt;Using AVIWriter.NET&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=5"&gt;Using MP4Writer.NET&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=6"&gt;Using MP4Toolkit&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=7"&gt;Using Resampler.NET&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=8"&gt;Encoding and sending G.711 over RTP&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=9"&gt;Receiving G.711 over RTP, decoding &amp;amp; Playout&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=10"&gt;Generating DTMF Tones&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=11"&gt;How to extract information from a FLV (Flash Video) file&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.streamcoders.com/products/msnetsc.html?id=12"&gt;RTP Send &amp;amp; Receive symmetric using RTPSession with one participant&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a title="http://www.streamcoders.com/products/msnetsc.html" href="http://www.streamcoders.com/products/msnetsc.html"&gt;http://www.streamcoders.com/products/msnetsc.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I hope this post will be useful for people who work with video and audio in Microsoft.NET environment.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;It is important to mention that the MediaSuite.NET Framework is not free and it is something to consider before starting to work with the Framework.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1461226" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/VIDEO/default.aspx">VIDEO</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Audio/default.aspx">Audio</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/RTP.NET/default.aspx">RTP.NET</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/RTSP.NET/default.aspx">RTSP.NET</category></item><item><title>Patterns for Parallel Programming Document</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2010/12/19/patterns-for-parallel-programming-document-1.aspx</link><pubDate>Sun, 19 Dec 2010 18:00:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:758767</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>26</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2010/12/19/patterns-for-parallel-programming-document-1.aspx#comments</comments><description>&lt;h4&gt;Understanding and Applying Parallel Patterns with the .NET Framework 4&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;: 
&lt;p&gt;This document provides a detailed and in-depth tour of support in the Microsoft® .NET Framework 4 for parallel programming. This includes an examination of common parallel patterns and how they’re implemented without and with this new support in the .NET Framework, as well as covering best practices for developing parallel components utilizing parallel patterns. 
&lt;p&gt;Stephen Toub&lt;br /&gt;Parallel Computing Platform&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a title="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=86B3D32B-AD26-4BB8-A3AE-C1637026C3EE" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=86B3D32B-AD26-4BB8-A3AE-C1637026C3EE"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=86B3D32B-AD26-4BB8-A3AE-C1637026C3EE&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=758767" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/ITPRO/default.aspx">ITPRO</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category></item><item><title>Running ADPlus on a Windows Server 2008</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2010/12/16/running-adplus-on-a-windows-server-2008.aspx</link><pubDate>Thu, 16 Dec 2010 12:28:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:757499</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>20</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2010/12/16/running-adplus-on-a-windows-server-2008.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;What does ADPlus do&lt;/strong&gt;?&lt;br /&gt;ADPlus is console-based Microsoft Visual Basic script. It automates the Microsoft CDB debugger to produce memory dumps and log files that contain debug output from one or more processes. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The following are the three steps to run ADPlus command&lt;/strong&gt;: 
&lt;p&gt;1. Open a command prompt as an administrator. 
&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/mneiter/WindowsLiveWriter/RunningADPlusonaWindowsServer2008_8983/as%20an%20Administrator.png"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border="0" alt="as an Administrator" src="http://blogs.microsoft.co.il/blogs/mneiter/WindowsLiveWriter/RunningADPlusonaWindowsServer2008_8983/as%20an%20Administrator_thumb.png" width="244" height="169" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The reason I wrote this post is because without running the command as an administrator you can’t create a dump file. It took me some time to figure out why I could not create a dump file. I want to believe this post will save some time for others. 
&lt;p&gt;2. Move to the folder.&lt;/p&gt;
&lt;p&gt;cd C:\Program Files\Debugging Tools for Windows (x64) &lt;/p&gt;
&lt;p&gt;or 
&lt;p&gt;cd C:\Program Files\Debugging Tools for Windows (x86) 
&lt;p&gt;3. Execute command.&lt;/p&gt;
&lt;p&gt;Adplus -hang -pn &amp;quot;process Name&amp;quot; -o &amp;quot;output directory&amp;quot; 
&lt;p&gt;or 
&lt;p&gt;Adplus -crash-pn &amp;quot;process Name&amp;quot; -o &amp;quot;output directory&amp;quot; 
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;: 
&lt;p&gt;Create a dump file is the first step in the process of analysis and understanding of the application. ADPlus is one of the tools that gives the possibility to create a dump file. 
&lt;p&gt;&lt;strong&gt;Download and Install Debugging Tools for Windows&lt;/strong&gt;: 
&lt;p&gt;&lt;a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx"&gt;http://www.microsoft.com/whdc/devtools/debugging/default.mspx&lt;/a&gt; 
&lt;p&gt;&lt;strong&gt;Reference&lt;/strong&gt;:&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/286350"&gt;http://support.microsoft.com/kb/286350&lt;/a&gt; 
&lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/ff537953(v=VS.85).aspx" href="http://msdn.microsoft.com/en-us/library/ff537953(v=VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/ff537953(v=VS.85).aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=757499" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/ITPRO/default.aspx">ITPRO</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Debugging/default.aspx">Debugging</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Tools/default.aspx">Tools</category></item><item><title>How To Create Forms Authentication Cookies</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/05/31/how-to-create-forms-authentication-cookies.aspx</link><pubDate>Sun, 31 May 2009 18:00:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:317479</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>46</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/05/31/how-to-create-forms-authentication-cookies.aspx#comments</comments><description>What is Forms Authentication Cookies: Forms authentication cookie is the container for forms authentication ticket. The ticket is passed as the value of the forms authentication cookie with each request and is used by forms authentication, on the server, to identify an authenticated user. IIS Authentication: ASP.NET authentication is a two-step process. First, Internet Information Services (IIS) authenticates the user and creates a Windows token to represent the user. IIS determines the authentication...(&lt;a href="http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/05/31/how-to-create-forms-authentication-cookies.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=317479" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/ASP.NET+2.0/default.aspx">ASP.NET 2.0</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Security/default.aspx">Security</category></item><item><title>How to measure elapsed time in C# with Stopwatch class</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/04/01/stopwatch-class.aspx</link><pubDate>Wed, 01 Apr 2009 14:00:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:261702</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>1814</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/04/01/stopwatch-class.aspx#comments</comments><description>In this post I will discuss how to measure elapsed time in C# with Stopwatch class. What is a Stopwatch: Stopwatch class provides a set of methods and properties that you can use to accurately measure elapsed time. In a simple scenario we call the Start method, then eventually call the Stop method, and then you check elapsed time using the Elapsed property. Stopwatch class depends on the hardware available in your computer and implements the high-resolution performance counter API functions of Windows...(&lt;a href="http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/04/01/stopwatch-class.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=261702" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category></item><item><title>How to Get Data from Resource Files in ASP.NET 2.0</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/29/how-to-get-data-from-resource-files-in-asp-net-2-0.aspx</link><pubDate>Mon, 30 Mar 2009 03:30:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:260868</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>26</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/29/how-to-get-data-from-resource-files-in-asp-net-2-0.aspx#comments</comments><description>In this post I will present how to access data from resource files in an ASP.NET 2.0 web application. Example: The following code creates ResourceManager object and loads data from a resource file. ResourceManager myResourceManager; ResourceSet rs; Assembly vResAssembly = Assembly.Load( new AssemblyName(AssemblyName)); myResourceManager = new ResourceManager(baseName, vResAssembly); rs = myResourceManager.GetResourceSet(CultureInfo.CurrentCulture, true , true ); The following code shows how to convert...(&lt;a href="http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/29/how-to-get-data-from-resource-files-in-asp-net-2-0.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=260868" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/ASP.NET+2.0/default.aspx">ASP.NET 2.0</category></item><item><title>Cross Browser Copy To the Clipboard with JavaScript and Flash</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/26/cross-browser-copy-to-clipboard.aspx</link><pubDate>Thu, 26 Mar 2009 14:30:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:246987</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>42</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/26/cross-browser-copy-to-clipboard.aspx#comments</comments><description>&lt;p&gt;When we want to copy text to the clipboard in the browser Internet Explorer, then the copyToClipboard function uses the window.clipboardData.setData function to set the clipboard data. Otherwise, the browser creates an embedded flash object, and adds the data to flash using a parameter. 
&lt;p&gt;&amp;nbsp;&lt;strong&gt;Example:&lt;/strong&gt; 
&lt;p&gt;The following code present easy way to copy text from textarea to the clipboard using JavaScript and Flash object.&lt;/p&gt;
&lt;div style="BORDER-BOTTOM:gray 1px solid;BORDER-LEFT:gray 1px solid;PADDING-BOTTOM:4px;LINE-HEIGHT:12pt;BACKGROUND-COLOR:#f4f4f4;MARGIN:20px 0px 10px;PADDING-LEFT:4px;WIDTH:97.5%;PADDING-RIGHT:4px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;MAX-HEIGHT:200px;FONT-SIZE:8pt;OVERFLOW:auto;BORDER-TOP:gray 1px solid;CURSOR:text;BORDER-RIGHT:gray 1px solid;PADDING-TOP:4px;"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP: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:#ff0000;"&gt;html&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;PUBLIC&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;&amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;&amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&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:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&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;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;Cross Browser Copy To Clipboard&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;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;script&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;language&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;javascript&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   1:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   2:&lt;/span&gt;         &lt;span style="COLOR:#0000ff;"&gt;function&lt;/span&gt; copyToClipboard(text2copy) {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   3:&lt;/span&gt;             &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (window.clipboardData) {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   4:&lt;/span&gt;                 window.clipboardData.setData(&lt;span style="COLOR:#006080;"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;, text2copy);&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   5:&lt;/span&gt;             } &lt;span style="COLOR:#0000ff;"&gt;else&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   6:&lt;/span&gt;                 &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; flashcopier = &lt;span style="COLOR:#006080;"&gt;&amp;#39;flashcopier&amp;#39;&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   7:&lt;/span&gt;                 &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (!document.getElementById(flashcopier)) {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   8:&lt;/span&gt;                     &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; divholder = document.createElement(&lt;span style="COLOR:#006080;"&gt;&amp;#39;div&amp;#39;&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   9:&lt;/span&gt;                     divholder.id = flashcopier;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  10:&lt;/span&gt;                     document.body.appendChild(divholder);&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  11:&lt;/span&gt;                 }&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  12:&lt;/span&gt;                 document.getElementById(flashcopier).innerHTML = &lt;span style="COLOR:#006080;"&gt;&amp;#39;&amp;#39;&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  13:&lt;/span&gt;                 &lt;span style="COLOR:#0000ff;"&gt;var&lt;/span&gt; divinfo = &lt;span style="COLOR:#006080;"&gt;&amp;#39;&amp;lt;embed src=&amp;quot;clipboard.swf&amp;quot; mce_src=&amp;quot;clipboard.swf&amp;quot; FlashVars=&amp;quot;clipboard=&amp;#39;&lt;/span&gt; + escape(text2copy) + &lt;span style="COLOR:#006080;"&gt;&amp;#39;&amp;quot; width=&amp;quot;30&amp;quot; height=&amp;quot;30&amp;quot; type=&amp;quot;application/x-shockwave-flash&amp;quot;&amp;gt;&amp;lt;/embed&amp;gt;&amp;#39;&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  14:&lt;/span&gt;                 document.getElementById(flashcopier).innerHTML = divinfo;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  15:&lt;/span&gt;             }&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  16:&lt;/span&gt;         }&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  17:&lt;/span&gt;     &lt;/pre&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;script&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;

&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;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;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;table&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;cellspacing&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;cellpadding&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;border&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;tr&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
                &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;textarea&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;id&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;txtInput&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;rows&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;4&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;cols&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;50&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;id&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;txtInput&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;Copy and paste the text.&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;textarea&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
                &lt;span style="COLOR:#ff0000;"&gt;&amp;amp;nbsp;&lt;/span&gt;
            &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
                &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;a&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;href&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;BLOCKED SCRIPTcopyToClipboard(document.getElementById(&amp;#39;txtInput&amp;#39;).value);&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;Copy
                    text&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;a&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;td&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;tr&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;table&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&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;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;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;This is a possible cross-brouser solution for performing copy to clipboard. I believe this is quite common problem&amp;nbsp;web developers need to cope with.&amp;nbsp;It&amp;#39;s &amp;#39;dirty&amp;#39; but it&amp;#39;s efficient and it&amp;nbsp;works. I&amp;#39;ll be happy to receive other possible solution suggestions&amp;nbsp;for this problem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download&lt;/strong&gt;:&lt;/p&gt;
&lt;div style="PADDING-BOTTOM:0px;MARGIN:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;PADDING-TOP:0px;" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:435853fd-6f20-49a5-9514-c9ab6eca3cd2" class="wlWriterSmartContent"&gt;
&lt;p&gt;The code is attached as a zip file. For download &lt;a href="http://blogs.microsoft.co.il/blogs/mneiter/WindowsLiveWriter/CrossBrowserCopyToClipboard_DBEF/Default.zip" target="_blank"&gt;Click Here.&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=246987" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category></item><item><title>How to Compress and Decompress using GzipStream object in C#</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/24/how-to-compress-and-decompress-using-gzipstream-object.aspx</link><pubDate>Tue, 24 Mar 2009 16:00:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:248849</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>37</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/24/how-to-compress-and-decompress-using-gzipstream-object.aspx#comments</comments><description>&lt;p&gt;Below is the implementation of the compress and decompress methods using GzipStream class. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The method shows how to compress a text.&lt;/p&gt;
&lt;div style="FONT-SIZE:10pt;BACKGROUND:white;COLOR:black;FONT-FAMILY:consolas;"&gt;
&lt;div id="codeSnippetWrapper" style="BORDER-RIGHT:silver 1px solid;PADDING-RIGHT:4px;BORDER-TOP:silver 1px solid;PADDING-LEFT:4px;FONT-SIZE:8pt;PADDING-BOTTOM:4px;MARGIN:20px 0px 10px;OVERFLOW:auto;BORDER-LEFT:silver 1px solid;WIDTH:97.5%;CURSOR:text;DIRECTION:ltr;MAX-HEIGHT:200px;LINE-HEIGHT:12pt;PADDING-TOP:4px;BORDER-BOTTOM:silver 1px solid;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;BACKGROUND-COLOR:#f4f4f4;TEXT-ALIGN:left;"&gt;&lt;pre id="codeSnippet" style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;DIRECTION:ltr;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;TEXT-ALIGN:left;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; Compress(&lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; text)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    &lt;span style="COLOR:#0000ff;"&gt;byte&lt;/span&gt;[] buffer = Encoding.UTF8.GetBytes(text);&lt;br /&gt;&lt;br /&gt;    MemoryStream ms = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; MemoryStream();&lt;br /&gt;&lt;br /&gt;    &lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; (GZipStream zip = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; GZipStream(ms, CompressionMode.Compress, &lt;span style="COLOR:#0000ff;"&gt;true&lt;/span&gt;))&lt;br /&gt;&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        zip.Write(buffer, 0, buffer.Length);&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    ms.Position = 0;&lt;br /&gt;&lt;br /&gt;    MemoryStream outStream = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; MemoryStream();&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    &lt;span style="COLOR:#0000ff;"&gt;byte&lt;/span&gt;[] compressed = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;byte&lt;/span&gt;[ms.Length];&lt;br /&gt;&lt;br /&gt;    ms.Read(compressed, 0, compressed.Length);&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    &lt;span style="COLOR:#0000ff;"&gt;byte&lt;/span&gt;[] gzBuffer = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;byte&lt;/span&gt;[compressed.Length + 4];&lt;br /&gt;&lt;br /&gt;    System.Buffer.BlockCopy(compressed, 0, gzBuffer, 4, compressed.Length);&lt;br /&gt;&lt;br /&gt;    System.Buffer.BlockCopy(BitConverter.GetBytes(buffer.Length), 0, gzBuffer, 0, 4);&lt;br /&gt;&lt;br /&gt;    &lt;span style="COLOR:#0000ff;"&gt;return&lt;/span&gt; Convert.ToBase64String(gzBuffer);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The method shows how to decompress a text that has been previously compressed. &lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="BORDER-RIGHT:silver 1px solid;PADDING-RIGHT:4px;BORDER-TOP:silver 1px solid;PADDING-LEFT:4px;FONT-SIZE:8pt;PADDING-BOTTOM:4px;MARGIN:20px 0px 10px;OVERFLOW:auto;BORDER-LEFT:silver 1px solid;WIDTH:97.5%;CURSOR:text;DIRECTION:ltr;MAX-HEIGHT:200px;LINE-HEIGHT:12pt;PADDING-TOP:4px;BORDER-BOTTOM:silver 1px solid;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;BACKGROUND-COLOR:#f4f4f4;TEXT-ALIGN:left;"&gt;&lt;pre id="codeSnippet" style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;DIRECTION:ltr;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;TEXT-ALIGN:left;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; Decompress(&lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; compressedText)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    &lt;span style="COLOR:#0000ff;"&gt;byte&lt;/span&gt;[] gzBuffer = Convert.FromBase64String(compressedText);&lt;br /&gt;&lt;br /&gt;    &lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; (MemoryStream ms = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; MemoryStream())&lt;br /&gt;&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        &lt;span style="COLOR:#0000ff;"&gt;int&lt;/span&gt; msgLength = BitConverter.ToInt32(gzBuffer, 0);&lt;br /&gt;&lt;br /&gt;        ms.Write(gzBuffer, 4, gzBuffer.Length - 4);&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;        &lt;span style="COLOR:#0000ff;"&gt;byte&lt;/span&gt;[] buffer = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;byte&lt;/span&gt;[msgLength];&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;        ms.Position = 0;&lt;br /&gt;&lt;br /&gt;        &lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; (GZipStream zip = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; GZipStream(ms, CompressionMode.Decompress))&lt;br /&gt;&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            zip.Read(buffer, 0, buffer.Length);&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;        &lt;span style="COLOR:#0000ff;"&gt;return&lt;/span&gt; Encoding.UTF8.GetString(buffer);&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;You can choose any type of encoding you need (UTF8, Unicode, etc.).&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=248849" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/ASP.NET+2.0/default.aspx">ASP.NET 2.0</category></item><item><title>How to Encoding and Decoding Base64 strings in C#</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/22/how-to-encoding-and-decoding-base64-strings-in-c.aspx</link><pubDate>Sun, 22 Mar 2009 14:15:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:248852</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>79</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/22/how-to-encoding-and-decoding-base64-strings-in-c.aspx#comments</comments><description>&lt;div class="csharpcode-wrapper"&gt;
&lt;div class="csharpcode-wrapper"&gt;In this post I’ll show how to encodes and decodes Base64 strings.&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; 
&lt;p&gt;The method shows how to create a Base64 encoded string from a plain text. 
&lt;div&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#008000;"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
&lt;span style="COLOR:#008000;"&gt;/// The method create a Base64 encoded string from a normal string.&lt;/span&gt;
&lt;span style="COLOR:#008000;"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
&lt;span style="COLOR:#008000;"&gt;/// &amp;lt;param name=&amp;quot;toEncode&amp;quot;&amp;gt;The String containing the characters to encode.&amp;lt;/param&amp;gt;&lt;/span&gt;
&lt;span style="COLOR:#008000;"&gt;/// &amp;lt;returns&amp;gt;The Base64 encoded string.&amp;lt;/returns&amp;gt;&lt;/span&gt;
&lt;span style="COLOR:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; EncodeTo64(&lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; toEncode)
{

    &lt;span style="COLOR:#0000ff;"&gt;byte&lt;/span&gt;[] toEncodeAsBytes

          = System.Text.Encoding.Unicode.GetBytes(toEncode);

    &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; returnValue

          = System.Convert.ToBase64String(toEncodeAsBytes);

    &lt;span style="COLOR:#0000ff;"&gt;return&lt;/span&gt; returnValue;

}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The method shows how to decode a Base64 encoded string to a plain text. &lt;/p&gt;
&lt;div&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#008000;"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
&lt;span style="COLOR:#008000;"&gt;/// The method to Decode your Base64 strings.&lt;/span&gt;
&lt;span style="COLOR:#008000;"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
&lt;span style="COLOR:#008000;"&gt;/// &amp;lt;param name=&amp;quot;encodedData&amp;quot;&amp;gt;The String containing the characters to decode.&amp;lt;/param&amp;gt;&lt;/span&gt;
&lt;span style="COLOR:#008000;"&gt;/// &amp;lt;returns&amp;gt;A String containing the results of decoding the specified sequence of bytes.&amp;lt;/returns&amp;gt;&lt;/span&gt;
&lt;span style="COLOR:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; DecodeFrom64(&lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; encodedData)
{

    &lt;span style="COLOR:#0000ff;"&gt;byte&lt;/span&gt;[] encodedDataAsBytes

        = System.Convert.FromBase64String(encodedData);

    &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; returnValue =

       System.Text.Encoding.Unicode.GetString(encodedDataAsBytes);

    &lt;span style="COLOR:#0000ff;"&gt;return&lt;/span&gt; returnValue;

}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can choose any type of encoding you need (UTF8, Unicode, etc.).&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=248852" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category></item><item><title>How to create Web Request from .NET applications.</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/19/how-create-web-request-from-server-side.aspx</link><pubDate>Thu, 19 Mar 2009 14:45:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:247058</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>27</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/19/how-create-web-request-from-server-side.aspx#comments</comments><description>&lt;div&gt;Sometimes we need to access external resources on the Web from our applications.&lt;br /&gt;One way to do it is to create WebRequest instances through the WebRequest.Create method.&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;The following example demonstrates how to create web request and retrieve the results .&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#008000;"&gt;// Create a request for the URL.         &lt;/span&gt;
WebRequest request = WebRequest.Create(url);
&lt;span style="COLOR:#008000;"&gt;// If required by the server, set the credentials.&lt;/span&gt;
request.Credentials = CredentialCache.DefaultCredentials;
&lt;span style="COLOR:#008000;"&gt;// Get the response.&lt;/span&gt;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
&lt;span style="COLOR:#008000;"&gt;// Get the stream containing content returned by the server.&lt;/span&gt;
Stream dataStream = response.GetResponseStream();
&lt;span style="COLOR:#008000;"&gt;// Open the stream using a StreamReader for easy access.&lt;/span&gt;
StreamReader reader = &lt;span style="COLOR:#0000ff;"&gt;new&lt;/span&gt; StreamReader(dataStream);
&lt;span style="COLOR:#008000;"&gt;// Read the content.        &lt;/span&gt;
&lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; responseFromServer = reader.ReadToEnd();
&lt;span style="COLOR:#008000;"&gt;// Cleanup the streams and the response.&lt;/span&gt;
reader.Close();
dataStream.Close();
response.Close();&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; 
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;After you are finished with a WebResponse object, you must close it by calling the Close method. If you do not close either the response or the stream, your application can run out of connections to the server and become unable to process additional requests.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;When create web request it is important to place the code in a Try and Catch block, because some exceptions are expected (timeout, etc.). 
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; 
&lt;p&gt;In this post we saw how to create web request and retrieve the results from .NET applications. 
&lt;p&gt;&lt;strong&gt;Reference:&lt;/strong&gt; 
&lt;div&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/debx8sh9.aspx" href="http://msdn.microsoft.com/en-us/library/debx8sh9.aspx"&gt;http://msdn.microsoft.com/en-us/library/debx8sh9.aspx&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=247058" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category></item><item><title>Implement the ICallbackEventHandler in ASP.NET 2.0</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/17/implement-the-icallbackeventhandler-interface.aspx</link><pubDate>Tue, 17 Mar 2009 14:25:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:246978</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>30</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/17/implement-the-icallbackeventhandler-interface.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;What is ICallbackEventHandler &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;ASP.NET 2.0 introduced an interface named ICallbackEventHandler (System.Web.UI.ICallbackEventHandler) to allow asynchronous communication with the server. Unlike Postback, in Callback only user defined information is sent to the server. Instead of using Postback to post the page, ICallbackEventHandler uses the DoCallback event to send user defined data to server, and return a String to client; on the client-side JavaScript can then manipulate the string. In total we have to use four functions for the implementating ICallbackEventHandler; two client side functions (in javascript) and two server side functions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Components of Client Callbacks&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Creating an ASP.NET page that programmatically implements client callbacks is similar to creating any ASP.NET page, with a few these differences. The page&amp;#39;s server code must perform the following tasks: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Implement the &lt;span&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl14" href="http://msdn.microsoft.com/en-us/library/system.web.ui.icallbackeventhandler.aspx"&gt;&lt;font color="#800080"&gt;ICallbackEventHandler&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; interface. You can add this interface declaration to any ASP.NET Web page. &lt;/p&gt;
&lt;li&gt;
&lt;p&gt;Provide an implementation for the &lt;span&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl15" href="http://msdn.microsoft.com/en-us/library/system.web.ui.icallbackeventhandler.raisecallbackevent.aspx"&gt;&lt;font color="#0033cc"&gt;RaiseCallbackEvent&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; method. This method will be invoked to perform the callback on the server. &lt;/p&gt;
&lt;li&gt;
&lt;p&gt;Provide an implementation for the &lt;span&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl16" href="http://msdn.microsoft.com/en-us/library/system.web.ui.icallbackeventhandler.getcallbackresult.aspx"&gt;&lt;font color="#0033cc"&gt;GetCallbackResult&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; method. This method will return the callback result to the client. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;In addition, the page must contain three client script functions that perform the following actions: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;One function calls a helper method that performs the actual request to the server. In this function, you can perform custom logic to prepare the event arguments first. You can send a string as a parameter to the server-side callback event handler. &lt;/p&gt;
&lt;li&gt;
&lt;p&gt;Another function receives (is called by) the result from the server code that processed the callback event, accepting a string that represents the results. This is referred to as the client callback function. &lt;/p&gt;
&lt;li&gt;
&lt;p&gt;A third function is the helper function that performs the actual request to the server. This function is generated automatically by ASP.NET when you generate a reference to this function by using the &lt;span&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl17" href="http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.getcallbackeventreference.aspx"&gt;&lt;font color="#0033cc"&gt;GetCallbackEventReference&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; method in server code. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Both client callbacks and postbacks are requests for the originating page. Therefore, client callbacks and postbacks are recorded in Web server logs as a page request. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The following server code implement the &lt;span&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl14" href="http://msdn.microsoft.com/en-us/library/system.web.ui.icallbackeventhandler.aspx"&gt;&lt;font color="#800080"&gt;ICallbackEventHandler&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; interface.&lt;/p&gt;&lt;strong&gt;&lt;/strong&gt;
&lt;div style="BORDER-RIGHT:gray 1px solid;PADDING-RIGHT:4px;BORDER-TOP:gray 1px solid;PADDING-LEFT:4px;FONT-SIZE:8pt;PADDING-BOTTOM:4px;MARGIN:20px 0px 10px;OVERFLOW:auto;BORDER-LEFT:gray 1px solid;WIDTH:97.5%;CURSOR:text;MAX-HEIGHT:200px;LINE-HEIGHT:12pt;PADDING-TOP:4px;BORDER-BOTTOM:gray 1px solid;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BACKGROUND-COLOR:#f4f4f4;"&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; System;
&lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; System.Data;
&lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; System.Configuration;
&lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; System.Web;
&lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; System.Web.Security;
&lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; System.Web.UI;
&lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; System.Web.UI.WebControls;
&lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;
&lt;span style="COLOR:#0000ff;"&gt;using&lt;/span&gt; System.Web.UI.HtmlControls;

&lt;span style="COLOR:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;partial&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;class&lt;/span&gt; _Default : System.Web.UI.Page, ICallbackEventHandler
{
    &lt;span style="COLOR:#0000ff;"&gt;protected&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, EventArgs e)
    {
        &lt;span style="COLOR:#008000;"&gt;//&lt;/span&gt;
        &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; sbReference = ClientScript.GetCallbackEventReference(&lt;span style="COLOR:#0000ff;"&gt;this&lt;/span&gt;, &lt;span style="COLOR:#006080;"&gt;&amp;quot;arg&amp;quot;&lt;/span&gt;, &lt;span style="COLOR:#006080;"&gt;&amp;quot;ReceiveServerData&amp;quot;&lt;/span&gt;, &lt;span style="COLOR:#006080;"&gt;&amp;quot;context&amp;quot;&lt;/span&gt;);

        &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; cbScript = String.Empty;

        &lt;span style="COLOR:#008000;"&gt;// check if the script is already registered or not &lt;/span&gt;

        &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (!ClientScript.IsClientScriptBlockRegistered(&lt;span style="COLOR:#006080;"&gt;&amp;quot;CallServer&amp;quot;&lt;/span&gt;))
        {

            cbScript = &lt;span style="COLOR:#006080;"&gt;@&amp;quot; function CallServer(arg,context) { &amp;quot;&lt;/span&gt; + sbReference + &lt;span style="COLOR:#006080;"&gt;&amp;quot;}&amp;quot;&lt;/span&gt;;

            ClientScript.RegisterClientScriptBlock(&lt;span style="COLOR:#0000ff;"&gt;this&lt;/span&gt;.GetType(), &lt;span style="COLOR:#006080;"&gt;&amp;quot;CallServer&amp;quot;&lt;/span&gt;, cbScript, &lt;span style="COLOR:#0000ff;"&gt;true&lt;/span&gt;);

        }
    }

    &lt;span style="COLOR:#cc6633;"&gt;#region&lt;/span&gt; ICallbackEventHandler Members

    &lt;span style="COLOR:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; GetCallbackResult()
    {
        &lt;span style="COLOR:#0000ff;"&gt;try&lt;/span&gt;
        {
            &lt;span style="COLOR:#008000;"&gt;// Returns the results of a callback event to the client.&lt;/span&gt;

            &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; dateString = DateTime.Now.ToString();

            &lt;span style="COLOR:#0000ff;"&gt;return&lt;/span&gt; dateString;
        }
        &lt;span style="COLOR:#0000ff;"&gt;catch&lt;/span&gt; (Exception)
        {

            &lt;span style="COLOR:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt;.Empty;

        }

    }

    &lt;span style="COLOR:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;void&lt;/span&gt; RaiseCallbackEvent(&lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; eventArgument)
    {
        &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (!String.IsNullOrEmpty(eventArgument))
        {

            &lt;span style="COLOR:#008000;"&gt;// Processes a callback event on the server using the event&lt;/span&gt;
            &lt;span style="COLOR:#008000;"&gt;// argument from the client.&lt;/span&gt;

        }
        &lt;span style="COLOR:#0000ff;"&gt;else&lt;/span&gt;
        {

            &lt;span style="COLOR:#008000;"&gt;// Set a flag so that the GetCallbackResult is not called. &lt;/span&gt;

        }
    }

    &lt;span style="COLOR:#cc6633;"&gt;#endregion&lt;/span&gt;
}
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The client code contains the following javascript block.&lt;/p&gt;
&lt;div style="BORDER-RIGHT:gray 1px solid;PADDING-RIGHT:4px;BORDER-TOP:gray 1px solid;PADDING-LEFT:4px;FONT-SIZE:8pt;PADDING-BOTTOM:4px;MARGIN:20px 0px 10px;OVERFLOW:auto;BORDER-LEFT:gray 1px solid;WIDTH:97.5%;CURSOR:text;MAX-HEIGHT:200px;LINE-HEIGHT:12pt;PADDING-TOP:4px;BORDER-BOTTOM:gray 1px solid;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BACKGROUND-COLOR:#f4f4f4;"&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="BACKGROUND-COLOR:#ffff00;"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot;  CodeFile=&amp;quot;Default.aspx.cs&amp;quot; Inherits=&amp;quot;_Default&amp;quot; %&amp;gt;&lt;/span&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:#ff0000;"&gt;html&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;PUBLIC&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;&amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;&amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&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:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&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:#ff0000;"&gt;runat&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
    &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;Client Callbacks&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;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;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;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;form&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;id&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;form1&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;runat&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;div&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;script&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;language&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;javascript&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:white;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#606060;"&gt;   1:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#606060;"&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:white;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#606060;"&gt;   3:&lt;/span&gt;             setTimeout ( &lt;span style="COLOR:#006080;"&gt;&amp;quot;CallServer(&amp;#39;&amp;#39;,&amp;#39;&amp;#39;);&amp;quot;&lt;/span&gt;, 5000 );&lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#606060;"&gt;   4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:white;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#606060;"&gt;   5:&lt;/span&gt;             &lt;span style="COLOR:#0000ff;"&gt;function&lt;/span&gt; ReceiveServerData(rValue) &lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#606060;"&gt;   6:&lt;/span&gt;             {    &lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:white;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#606060;"&gt;   7:&lt;/span&gt;                 alert(&lt;span style="COLOR:#006080;"&gt;&amp;quot;Date from server: &amp;quot;&lt;/span&gt; + rValue)&lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#606060;"&gt;   8:&lt;/span&gt;             }&lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:white;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#606060;"&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;BORDER-BOTTOM-STYLE:none;"&gt;&lt;span style="COLOR:#606060;"&gt;  10:&lt;/span&gt;     &lt;/pre&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;script&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;div&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
    &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;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;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;/pre&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;strong&gt;Summary:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This post demonstrated easy way to implement client callbacks functionality into ASP.NET 2.0 applications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:14f2c43a-9087-4a67-8327-0714aa6d2d4c" style="PADDING-RIGHT:0px;DISPLAY:inline;PADDING-LEFT:0px;FLOAT:none;PADDING-BOTTOM:0px;MARGIN:0px;PADDING-TOP:0px;"&gt;
&lt;p&gt;The code is attached as a zip file and is available for download &lt;a href="http://blogs.microsoft.co.il/blogs/mneiter/WindowsLiveWriter/ImplementtheICallbackEventHandlerinASP.0_DCA5/Default.zip" target="_blank"&gt;Click Here.&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;strong&gt;References&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms178208.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms178208.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=246978" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/ASP.NET+2.0/default.aspx">ASP.NET 2.0</category></item><item><title>How to access members of a form or a class from another thread.</title><link>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/15/how-can-access-to-members-of-form-or-class-from-other-thread.aspx</link><pubDate>Sun, 15 Mar 2009 15:26:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:248914</guid><dc:creator>Michael Neiter</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.microsoft.co.il/blogs/mneiter/archive/2009/03/15/how-can-access-to-members-of-form-or-class-from-other-thread.aspx#comments</comments><description>&lt;p&gt;One way to solve this is to call the Invoke method of a control with a delegate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (&lt;span style="COLOR:#0000ff;"&gt;this&lt;/span&gt;.InvokeRequired)
{
    &lt;span style="COLOR:#0000ff;"&gt;this&lt;/span&gt;.Invoke(&lt;span style="COLOR:#0000ff;"&gt;delegate&lt;/span&gt;
    {
        &lt;span style="COLOR:#008000;"&gt;// Here you can access to your form or class members.&lt;/span&gt;
    });
}&lt;/pre&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=248914" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.microsoft.co.il/blogs/mneiter/archive/tags/DEV/default.aspx">DEV</category></item></channel></rss>