tag:blogger.com,1999:blog-75222537381283233072024-03-12T23:58:02.085-07:00Rajendran SPOne step at a timeRajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-7522253738128323307.post-84950425058073093472012-12-30T08:29:00.000-08:002012-12-30T08:29:25.153-08:00How to manipulate cursor for WinRT UI control as like WPF control?<div dir="ltr" style="text-align: left;" trbidi="on">
<html>
<head>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin-top:0pt;
margin-right:0pt;
margin-bottom:8.0pt;
margin-left:0pt;
line-height:107%;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:#954F72;
text-decoration:underline;}
pre
{mso-style-link:"HTML Preformatted Char";
margin:0pt;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
{margin:0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{font-family:"Calibri","sans-serif";}
.MsoPapDefault
{margin-bottom:8.0pt;
line-height:107%;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
</style></head></html>
<br />
<div class="WordSection1">
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">In this
blog post I am going to demonstrate on how to manipulate cursor for WinRT UI control
as like in WPF control. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">In WPF, you
will find a property (Cursor) in UI control which allows you to get/sets the
cursor which displays when mouse pointer is over the UI (ex: Textbox) element.
Whereas in WinRT environment there is no cursor property for each UI control
instead we can manipulate the cursor used by the window using the current core
window pointer cursor.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormalCxSpLast" style="margin-bottom: .0001pt; margin-bottom: 0pt;">
<span style="color: green; font-family: "Verdana","sans-serif";">//Gets or sets the
cursor used by the window.</span></div>
<div class="MsoNoSpacing">
<span style="color: #4ec9b0; font-family: "Verdana","sans-serif";">Window</span><span style="color: #b4b4b4; font-family: "Verdana","sans-serif";">.</span><span style="font-family: "Verdana","sans-serif";">Current<span style="color: #b4b4b4;">.</span>CoreWindow<span style="color: #b4b4b4;">.</span>PointerCursor</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">In the
below sample (referred from </span><a href="http://winrtxamltoolkit.codeplex.com/"><span style="font-family: "Verdana","sans-serif";">WinRTXamlToolkit
samples</span></a><span style="font-family: "Verdana","sans-serif";">) I have
manipulated the cursor used by the window when hovering over (pointer entered
and pointer exited event) the text block element.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span style="font-family: "Verdana","sans-serif";">Sample
link:</span></b></div>
<div class="MsoNormal">
<a href="http://www.filedropper.com/app5"><span style="font-family: "Verdana","sans-serif";">http://www.filedropper.com/app5</span></a></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";"> </span><span style="font-family: "Verdana","sans-serif";"> </span></div>
<div class="MsoNormal">
<b><span style="font-family: "Verdana","sans-serif";">Code
Snippet:</span></b></div>
<div class="MsoNormal">
<br /></div>
<table border="0" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none;">
<tbody>
<tr>
<td style="padding: 0pt 5.4pt 0pt 5.4pt; width: 478.8pt;" valign="top" width="638"><pre style="background: white;"><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">private</span><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;"> </span><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">void</span><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;"> txtBlock_PointerEntered_1(</span><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">object</span><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;"> sender, </span><span style="color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">PointerRoutedEventArgs</span><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;"> e)</span></pre>
<pre style="background: white;"><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">{</span></pre>
<pre style="background: white;"><span style="color: green; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">//Store current cursor used by the window</span></pre>
<pre style="background: white;"><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">m_defaultCursor = </span><span style="color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">Window</span><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">.Current.CoreWindow.PointerCursor;</span></pre>
<pre style="background: white;"><span style="color: green; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">//Set cursor of current core window</span></pre>
<pre style="background: white;"><span style="color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">Window</span><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">.Current.CoreWindow.PointerCursor = Cursor;</span></pre>
<pre style="background: white;"><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">}</span></pre>
<pre style="background: white;"><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;"> </span></pre>
<pre style="background: white;"><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">private</span><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;"> </span><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">void</span><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;"> txtBlock_PointerExited_1(</span><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">object</span><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;"> sender, </span><span style="color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">PointerRoutedEventArgs</span><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;"> e)</span></pre>
<pre style="background: white;"><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">{</span></pre>
<pre style="background: white;"><span style="color: green; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">//Reset pointer cursor on mouse pointer exits</span></pre>
<pre style="background: white;"><span style="color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">Window</span><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">.Current.CoreWindow.PointerCursor = m_defaultCursor;</span></pre>
<pre style="background: white;"><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 11.0pt;">}</span></pre>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0pt;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">References:</span></div>
<div class="MsoNormal">
<a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.core.corewindow.pointercursor"><span style="font-family: "Verdana","sans-serif";">http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.core.corewindow.pointercursor</span></a></div>
<div class="MsoNormal">
<a href="http://winrtxamltoolkit.codeplex.com/"><span style="font-family: "Verdana","sans-serif";">http://winrtxamltoolkit.codeplex.com/</span></a><span style="font-family: "Verdana","sans-serif";"> </span></div>
</div>
</div>
Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com0tag:blogger.com,1999:blog-7522253738128323307.post-51707756782892952272012-09-06T23:38:00.000-07:002012-09-06T23:42:10.498-07:00How to access Manifest (Embedded) resource from an Assembly in WinRT application.<div dir="ltr" style="text-align: left;" trbidi="on">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:0in;
line-height:107%;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:#954F72;
text-decoration:underline;}
.MsoChpDefault
{font-family:"Calibri","sans-serif";}
.MsoPapDefault
{margin-bottom:8.0pt;
line-height:107%;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<br />
<div class="WordSection1">
<a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=rajendransp" rel="tag" style="display: none;">CodeProject</a>
<span style="font-family: "Times New Roman","serif";">In
this blog post, I am going to demonstrate on how to access a simple XML file embedded
in the WinRT assembly.</span><br />
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<span style="font-family: "Times New Roman","serif";">One
of the easier way to retrieve an assembly in .Net application is by using below
method.</span></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<span style="font-family: "Times New Roman","serif";">//
This will return the assembly whose code is currently executing. </span></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal; margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt; text-autospace: none;">
<span style="background: white; color: #2b91af; font-family: "Times New Roman","serif";">Assembly</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">.GetExecutingAssembly();</span></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<span style="font-family: "Times New Roman","serif";">Alternate
one is to use Type object of the classes present in the assembly.</span></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<span style="background: white; color: #2b91af; font-family: "Times New Roman","serif";">Assembly</span><span style="background: white; color: black; font-family: "Times New Roman","serif";"> assembly = </span><span style="background: white; color: blue; font-family: "Times New Roman","serif";">typeof</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">(</span><span style="background: white; color: #2b91af; font-family: "Times New Roman","serif";">DemoClass</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">).GetType().Assembly;</span></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<span style="font-family: "Times New Roman","serif";">From
the assembly object we can retrieve the manifest resource stream (embedded
file) using <span style="background: white; color: black;">GetManifestResourceStream</span><span style="color: black;">() method. All we need is to pass the name of the embedded
resource. The name of the embedded resource is the combination of root
namespace, folder path and the file name. </span></span></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<span style="color: black; font-family: "Times New Roman","serif";">For example consider the root namespace of a demo application to
be MyApp and the XML file (Embedded.xml) is available under Resources folder of
the assembly. Then the name of the embedded resource is
“MyApp.Resources.Embedded.xml”.</span></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<b><span style="font-family: "Times New Roman","serif";">Sample
code snippet for .Net</span></b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638"><div class="MsoNormalCxSpMiddle" style="line-height: normal; margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt; text-autospace: none;">
<span style="background: white; color: #2b91af; font-family: "Times New Roman","serif";">Assembly</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">
assembly = </span><span style="background: white; color: #2b91af; font-family: "Times New Roman","serif";">Assembly</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">.GetExecutingAssembly();</span></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal; margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt; text-autospace: none;">
<span style="background: white; color: black; font-family: "Times New Roman","serif";">Or</span></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal; margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<span style="background: white; color: #2b91af; font-family: "Times New Roman","serif";">Assembly</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">
assembly = </span><span style="background: white; color: blue; font-family: "Times New Roman","serif";">typeof</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">(</span><span style="background: white; color: #2b91af; font-family: "Times New Roman","serif";">DemoClass</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">).GetType().Assembly;</span></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal; margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt; text-autospace: none;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal; margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt; text-autospace: none;">
<span style="background: white; color: #2b91af; font-family: "Times New Roman","serif";">Stream</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">
xmlStream = assembly.GetManifestResourceStream(</span><span style="background: white; color: #a31515; font-family: "Times New Roman","serif";">"MyApp.Resources.Embedded.xml"</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">);</span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<span style="font-family: "Times New Roman","serif";">In
<b>WinRT</b>, Both <span style="background: white; color: black;">GetExecutingAssembly()</span><span style="color: black;"> and <span style="background: white;">GetType().Assembly</span></span>
are not available, instead you can retrieve the assembly object from the classes
declared in the assembly by means of using TypeInfo object. Now the remaining
part to access the manifest resource is same as in .Net application. Please
find the code snippet from below.</span></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<b><span style="font-family: "Times New Roman","serif";">Sample
code snippet for WinRT</span></b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638"><div class="MsoNormalCxSpMiddle" style="line-height: normal; margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt; text-autospace: none;">
<span style="background: white; color: #2b91af; font-family: "Times New Roman","serif";">Assembly</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">
assembly = </span><span style="background: white; color: blue; font-family: "Times New Roman","serif";">typeof</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">(</span><span style="background: white; color: #2b91af; font-family: "Times New Roman","serif";">DemoClass</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">).GetTypeInfo().Assembly;</span></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal; margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt; text-autospace: none;">
<span style="background: white; color: #2b91af; font-family: "Times New Roman","serif";">Stream</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">
xmlStream = assembly.GetManifestResourceStream(</span><span style="background: white; color: #a31515; font-family: "Times New Roman","serif";">"MyApp.Resources.Embedded.xml"</span><span style="background: white; color: black; font-family: "Times New Roman","serif";">);</span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<span style="font-family: "Times New Roman","serif";">Please
find the demo application from below link</span></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<a href="http://www.filedropper.com/retreiveembededxml"><span style="font-family: "Times New Roman","serif";">http://www.filedropper.com/retreiveembededxml</span></a></div>
<div class="MsoNormalCxSpMiddle" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Times New Roman","serif";">In this
application, embedded XML file is retrieved and its contents are displayed in a
text </span><span style="font-family: "Verdana","sans-serif";">box.</span></div>
<div class="MsoNormalCxSpLast" style="margin-bottom: 6.0pt; margin-left: 0in; margin-right: 0in; margin-top: 6.0pt;">
<br /></div>
</div>
</div>
Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com0tag:blogger.com,1999:blog-7522253738128323307.post-63775850806606429472012-07-16T09:54:00.000-07:002012-07-17T08:20:25.591-07:00How to implement “Infinite Scroll” in web application?<div dir="ltr" style="text-align: left;" trbidi="on">
<link href="How%20to%20implement_files/filelist.xml" rel="File-List"></link>
<link href="How%20to%20implement_files/editdata.mso" rel="Edit-Time-Data"></link>
<link href="How%20to%20implement_files/themedata.thmx" rel="themeData"></link>
<link href="How%20to%20implement_files/colorschememapping.xml" rel="colorSchemeMapping"></link>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-520081665 -1073717157 41 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0pt;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{mso-style-unhide:no;
color:blue;
mso-themecolor:hyperlink;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-unhide:no;
color:purple;
mso-themecolor:followedhyperlink;
text-decoration:underline;
text-underline:single;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-link:"Balloon Text Char";
margin:0pt;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-font-family:Tahoma;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
margin-top:0pt;
margin-right:0pt;
margin-bottom:0pt;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-type:export-only;
margin-top:0pt;
margin-right:0pt;
margin-bottom:0pt;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-type:export-only;
margin-top:0pt;
margin-right:0pt;
margin-bottom:0pt;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-type:export-only;
margin-top:0pt;
margin-right:0pt;
margin-bottom:0pt;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Balloon Text";
mso-ansi-font-size:8.0pt;
mso-bidi-font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-ascii-font-family:Tahoma;
mso-fareast-font-family:Tahoma;
mso-hansi-font-family:Tahoma;
mso-bidi-font-family:Tahoma;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;}
@page WordSection1
{size:792.0pt 612.0pt;
mso-page-orientation:landscape;
margin:90.0pt 72.0pt 90.0pt 72.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1392078051;
mso-list-type:hybrid;
mso-list-template-ids:-2016219044 67698713 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0pt;}
ul
{margin-bottom:0pt;}
-->
</style>
<br />
<div class="WordSection1">
<div class="MsoNormal">
<a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=rajendransp" rel="tag" style="display: none;">CodeProject</a>
In this blog post, I am going the demonstrate the steps
involved in implementing “Infinite Scroll” in web application for loading
images just like in Bing and Google image search.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Infinite Scroll</b> –
Infinite scroll has been called auto paganize/endless pages. But essentially it
is pre-fetching content from a subsequent page and adding it directly to the
user’s current page.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4b8wYHfswyiN8lh8jPC_FveLB_7AGxqsxdIjkai8bC4_iwfh_lT-ebfgXdcypHXDjHjiF0vsEmTNSfCzySoMg7DOXIEsANifV7-S-pDejPYxEogf6FofMmIP7SIhpHTOcOODEeBYyiowV/s1600/image_2%255b1%255d.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4b8wYHfswyiN8lh8jPC_FveLB_7AGxqsxdIjkai8bC4_iwfh_lT-ebfgXdcypHXDjHjiF0vsEmTNSfCzySoMg7DOXIEsANifV7-S-pDejPYxEogf6FofMmIP7SIhpHTOcOODEeBYyiowV/s320/image_2%255b1%255d.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
One of the most annoying thing when working with large data
is how to continuously loading the data on demand to your page?<o:p></o:p></div>
<div class="MsoNormal">
The common solution is paging but paging itself will not
help too much you can end with hundreds or thousands of pages. So a new
solution now is on the surface and it's called "Infinite Scroll". It allows
you to load chunk of data when you scroll down of the page and inject it inside
the page, it will load data each time you scrolling down on the page. </div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid_m5mpraYCt_B4ZipwJSrNLDPNUhLdyxfUnZa6PnQ4Ereu1mAE4AMljZhU9kol1soqXKrqpF-w0zxCwRTgWy2zi98YgnQPsgukWKv7IouwMmDHkpYSjfL0BsNGP-b9LvjKLOHCtQvqvkI/s1600/IScroll.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid_m5mpraYCt_B4ZipwJSrNLDPNUhLdyxfUnZa6PnQ4Ereu1mAE4AMljZhU9kol1soqXKrqpF-w0zxCwRTgWy2zi98YgnQPsgukWKv7IouwMmDHkpYSjfL0BsNGP-b9LvjKLOHCtQvqvkI/s320/IScroll.gif" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p> </o:p></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Step 1:</b> Include <span class="SpellE">jquery</span> library file. You can download the current version
of “<span class="SpellE">jquery</span>” library from this link <a href="http://docs.jquery.com/Downloading_jQuery">http://docs.jquery.com/Downloading_jQuery</a>
</div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590"><div class="MsoNormal">
<script type="text/<span class="SpellE">javascript</span>"
<span class="SpellE">src</span>="Scripts/jquery-x.x.x.min.js"></script></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Step 2:</b> Add Images
folder to the web project which contains images that is loaded on runtime in
the website.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Step 3:</b> Add below
designer code to create a list view to load the images initially.</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt;" valign="top"><div class="MsoNormal">
<<span class="SpellE">asp:ListView</span>
ID="ListView1" <span class="SpellE">runat</span>="server" <span class="SpellE">EnableModelValidation</span>="True"><o:p></o:p></div>
<div class="MsoNormal">
<<span class="SpellE">LayoutTemplate</span>><o:p></o:p></div>
<div class="MsoNormal">
<<span class="SpellE">ul</span> id="<span class="SpellE">itemPlaceholderContainer</span>"
<span class="SpellE">runat</span>="server"
class="thumb"><o:p></o:p></div>
<div class="MsoNormal">
<<span class="SpellE">asp:PlaceHolder</span> <span class="SpellE">runat</span>="server"
ID="<span class="SpellE">itemPlaceholder</span>" /><o:p></o:p></div>
<div class="MsoNormal">
</<span class="SpellE">ul</span>><o:p></o:p></div>
<div class="MsoNormal">
</<span class="SpellE">LayoutTemplate</span>><o:p></o:p></div>
<div class="MsoNormal">
<<span class="SpellE">ItemTemplate</span>><o:p></o:p></div>
<div class="MsoNormal">
<<span class="SpellE">asp<span class="GramE">:Image</span></span> ID="Image1" <span class="SpellE">runat</span>="server" <span class="SpellE">ImageUrl</span>='<%#
<span class="SpellE">Eval</span>("image")%>' /><o:p></o:p></div>
<div class="MsoNormal">
</<span class="SpellE">ItemTemplate</span>></div>
<div class="MsoNormal">
</<span class="SpellE">asp:ListView</span>></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Step 4:</b> Fill the
list view with images using below code on Page Load event.</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt;" valign="top"><div class="MsoNormal">
protected void <span class="SpellE">Page_Load</span>(object
sender, <span class="SpellE">EventArgs</span> e)<o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
if (!<span class="SpellE">IsPostBack</span>)<o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">FillListView</span>(48);</div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
//Fill images in the list view<o:p></o:p></div>
<div class="MsoNormal">
private void <span class="SpellE">FillListView</span>(<span class="SpellE">int</span> Rows)<o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
string <span class="SpellE">Imagespath</span> = <span class="SpellE">HttpContext.Current.Server.MapPath</span>("~/Images/");<o:p></o:p></div>
<div class="MsoNormal">
string <span class="SpellE">SitePath</span> = <span class="SpellE">HttpContext.Current.Server.MapPath</span>("~");</div>
<div class="MsoNormal">
//Load image
files using <span class="SpellE">linq</span> query<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">var</span> Files = (from file in <span class="SpellE">Directory.GetFiles</span>(<span class="SpellE">Imagespath</span>) select new { image = <span class="SpellE">file.Replace</span>(<span class="SpellE">SitePath</span>, "~/") }).Take(Rows);<o:p></o:p></div>
<div class="MsoNormal">
ListView1.DataSource
= <span class="SpellE">Files.ToList</span>();<o:p></o:p></div>
<div class="MsoNormal">
ListView1.DataBind();</div>
<div class="MsoNormal">
}</div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Step 5:</b> For now
we have loaded 48 images to the list view. In the next step we are going to use
the script and the code behind to load the next set of images dynamically on
scroll down just like in Google and Bing.</div>
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
a.<span style="font: 7pt "Times New Roman";">
</span>Add below script the <span class="SpellE">aspx</span>
file</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt;" valign="top"><div class="MsoNormal">
<script type="text/<span class="SpellE">javascript</span>"><o:p></o:p></div>
<div class="MsoNormal">
$(document).ready(function () {<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">var</span> Skip = 48; //Number of image to skip<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">var</span> Take = 14; //<o:p></o:p></div>
<div class="MsoNormal">
function
Load(Skip, Take) {</div>
<div class="MsoNormal">
//Post below loader image as progress bar<o:p></o:p></div>
<div class="MsoNormal">
$('#<span class="SpellE">divPostsLoader</span>').html('<<span class="SpellE">img</span> <span class="SpellE">src</span>="<span class="SpellE">ProgressBar</span>/ajax-loader.gif">');</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
//send a query to server side
to present new content<o:p></o:p></div>
<div class="MsoNormal">
$.<span class="SpellE">ajax</span>({<o:p></o:p></div>
<div class="MsoNormal">
type: "POST",<o:p></o:p></div>
<div class="MsoNormal">
url:
"Default.aspx/<span class="SpellE">LoadImages</span>", //Call the <span class="SpellE">LoadImage</span> method in the code behind<o:p></o:p></div>
<div class="MsoNormal">
data: "{ Skip:" + Skip + ", Take:" + Take + "
}",<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">contentType</span>:
"application/<span class="SpellE">json</span>; charset=utf-8",<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">dataType</span>: "<span class="SpellE">json</span>",<o:p></o:p></div>
<div class="MsoNormal">
success: function (data) {<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span class="GramE">if</span> (data != "") {<o:p></o:p></div>
<div class="MsoNormal">
$('.thumb').append(<span class="SpellE">data.d</span>); //Append the retrieved
images next to list view<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
$('#<span class="SpellE">divPostsLoader</span>').empty();<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
})<o:p></o:p></div>
<div class="MsoNormal">
};<o:p></o:p></div>
<div class="MsoNormal">
//Larger
thumbnail preview <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
//When
scroll down, the <span class="SpellE">scroller</span> is at the bottom with the
function below and fire the <span class="SpellE">lastPostFunc</span> function<o:p></o:p></div>
<div class="MsoNormal">
$(window).scroll(function () {<o:p></o:p></div>
<div class="MsoNormal">
if
($(window).<span class="SpellE">scrollTop</span>() == ($(document).height() -
$(window).height())) {<o:p></o:p></div>
<div class="MsoNormal">
Load(Skip, Take);<o:p></o:p></div>
<div class="MsoNormal">
Skip = Skip + 14;<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
});<o:p></o:p></div>
<div class="MsoNormal">
});<o:p></o:p></div>
<div class="MsoNormal">
</script></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
b.<span style="font: 7pt "Times New Roman";">
</span>Add below method next to <span class="SpellE"><span class="GramE">FillListView</span></span><span class="GramE">(</span>). This method
will the next set of images provided number of images to skip and the next set
of images to take.</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt;" valign="top"><div class="MsoNormal">
[<span class="SpellE">WebMethod</span>]<o:p></o:p></div>
<div class="MsoNormal">
public
static string <span class="SpellE">LoadImages</span>(<span class="SpellE">int</span>
Skip, <span class="SpellE">int</span> Take)<o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">System.Threading.Thread.Sleep</span>(2000);<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">StringBuilder</span> <span class="SpellE">GetImages</span> = new <span class="SpellE">StringBuilder</span>();<o:p></o:p></div>
<div class="MsoNormal">
string <span class="SpellE">Imagespath</span> = <span class="SpellE">HttpContext.Current.Server.MapPath</span>("~/Images/");<o:p></o:p></div>
<div class="MsoNormal">
string <span class="SpellE">SitePath</span> = <span class="SpellE">HttpContext.Current.Server.MapPath</span>("~");<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">var</span> Files = (from file in <span class="SpellE">Directory.GetFiles</span>(<span class="SpellE">Imagespath</span>) select new { image = <span class="SpellE">file.Replace</span>(<span class="SpellE">SitePath</span>, "~/") }).Skip(Skip).Take(Take);<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">foreach</span> (<span class="SpellE">var</span> file in Files)<o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">var</span> <span class="SpellE">imageSrc</span> = <span class="SpellE">file.image.Replace</span>("\\",
"/").Substring(1); //Remove First '/' from image path<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">GetImages.Append</span>(" ");<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">GetImages.AppendFormat</span>(<span class="SpellE">string.Format</span>("<<span class="SpellE">img</span> <span class="SpellE">src</span>='{0}'/>", <span class="SpellE">imageSrc</span>)); <span class="SpellE">GetImages.Append</span>("
");<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
return <span class="SpellE">GetImages.ToString</span>();<o:p></o:p></div>
<div class="MsoNormal">
}</div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Final Code:<o:p></o:p></b></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Default.aspx<o:p></o:p></b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 658.8pt;" valign="top" width="878"><div class="MsoNormal">
<%@ Page Language="C#" <span class="SpellE">AutoEventWireup</span>="true"
<span class="SpellE">CodeBehind</span>="<span class="SpellE">Default.aspx.cs</span>"
Inherits="<span class="SpellE">InfiniteScroll.Default</span>" %><o:p></o:p></div>
<div class="MsoNormal">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><o:p></o:p></div>
<div class="MsoNormal">
<html <span class="SpellE">xmlns</span>="http://www.w3.org/1999/xhtml"><o:p></o:p></div>
<div class="MsoNormal">
<head id="Head1" <span class="SpellE">runat</span>="server"><o:p></o:p></div>
<div class="MsoNormal">
<title>Infinite Scroll</title><o:p></o:p></div>
<div class="MsoNormal">
<script
type="text/<span class="SpellE">javascript</span>" <span class="SpellE">src</span>="Scripts/jquery-1.4.1.min.js"></script><o:p></o:p></div>
<div class="MsoNormal">
<script
type="text/<span class="SpellE">javascript</span>"><o:p></o:p></div>
<div class="MsoNormal">
$(document).ready(function () {<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">var</span> Skip = 48; //Number of skipped image<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">var</span> Take = 14; //<o:p></o:p></div>
<div class="MsoNormal">
function
Load(Skip, Take) {<o:p></o:p></div>
<div class="MsoNormal">
$('#<span class="SpellE">divPostsLoader</span>').html('<<span class="SpellE">img</span> <span class="SpellE">src</span>="<span class="SpellE">ProgressBar</span>/ajax-loader.gif">');<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
//send a query to server side to present new content<o:p></o:p></div>
<div class="MsoNormal">
$.<span class="SpellE">ajax</span>({<o:p></o:p></div>
<div class="MsoNormal">
type: "POST",<o:p></o:p></div>
<div class="MsoNormal">
url: "Default.aspx/<span class="SpellE">LoadImages</span>",<o:p></o:p></div>
<div class="MsoNormal">
data: "{ Skip:" + Skip + ", Take:" + Take + "
}",<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">contentType</span>: "application/<span class="SpellE">json</span>;
charset=utf-8",<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">dataType</span>: "<span class="SpellE">json</span>",<o:p></o:p></div>
<div class="MsoNormal">
success: function (data) {<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span class="GramE">if</span> (data != "") {<o:p></o:p></div>
<div class="MsoNormal">
$('.thumb').append(<span class="SpellE">data.d</span>);<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
$('#<span class="SpellE">divPostsLoader</span>').empty();<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
})<o:p></o:p></div>
<div class="MsoNormal">
};<o:p></o:p></div>
<div class="MsoNormal">
//Larger thumbnail preview <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
//When
scroll down, the <span class="SpellE">scroller</span> is at the bottom with the
function below and fire the <span class="SpellE">lastPostFunc</span> function<o:p></o:p></div>
<div class="MsoNormal">
$(window).scroll(function () {<o:p></o:p></div>
<div class="MsoNormal">
if
($(window).<span class="SpellE">scrollTop</span>() == ($(document).height() -
$(window).height())) {<o:p></o:p></div>
<div class="MsoNormal">
Load(Skip, Take);<o:p></o:p></div>
<div class="MsoNormal">
Skip = Skip + 14;<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
});<o:p></o:p></div>
<div class="MsoNormal">
});<o:p></o:p></div>
<div class="MsoNormal">
</script><o:p></o:p></div>
<div class="MsoNormal">
<style
type="text/<span class="SpellE">css</span>"><o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">img</span> { <span class="SpellE">border:"none</span>"; <span class="SpellE">margin:"auto</span>"}<o:p></o:p></div>
<div class="MsoNormal">
.container {
padding:"2px"; }<o:p></o:p></div>
<div class="MsoNormal">
</style><o:p></o:p></div>
<div class="MsoNormal">
</head><o:p></o:p></div>
<div class="MsoNormal">
<body><o:p></o:p></div>
<div class="MsoNormal">
<form
id="form1" <span class="SpellE">runat</span>="server"><o:p></o:p></div>
<div class="MsoNormal">
<div><o:p></o:p></div>
<div class="MsoNormal">
<div
class="header"><o:p></o:p></div>
<div class="MsoNormal">
<div
class="title"><o:p></o:p></div>
<div class="MsoNormal">
<h1><o:p></o:p></div>
<div class="MsoNormal">
Infinite Scroll Example<o:p></o:p></div>
<div class="MsoNormal">
</h1><o:p></o:p></div>
<div class="MsoNormal">
</div><o:p></o:p></div>
<div class="MsoNormal">
</div><o:p></o:p></div>
<div class="MsoNormal">
<div><o:p></o:p></div>
<div class="MsoNormal">
<<span class="SpellE">asp:ListView</span> ID="ListView1" <span class="SpellE">runat</span>="server"
<span class="SpellE">EnableModelValidation</span>="True"><o:p></o:p></div>
<div class="MsoNormal">
<<span class="SpellE">LayoutTemplate</span>><o:p></o:p></div>
<div class="MsoNormal">
<<span class="SpellE">ul</span> id="<span class="SpellE">itemPlaceholderContainer</span>"
<span class="SpellE">runat</span>="server"
class="thumb"><o:p></o:p></div>
<div class="MsoNormal">
<<span class="SpellE">asp:PlaceHolder</span> <span class="SpellE">runat</span>="server"
ID="<span class="SpellE">itemPlaceholder</span>" /><o:p></o:p></div>
<div class="MsoNormal">
</<span class="SpellE">ul</span>><o:p></o:p></div>
<div class="MsoNormal">
</<span class="SpellE">LayoutTemplate</span>><o:p></o:p></div>
<div class="MsoNormal">
<<span class="SpellE">ItemTemplate</span>><o:p></o:p></div>
<div class="MsoNormal">
<<span class="SpellE">asp<span class="GramE">:Image</span></span>
ID="Image1" <span class="SpellE">runat</span>="server" <span class="SpellE">ImageUrl</span>='<%# <span class="SpellE">Eval</span>("image")%>'
/><o:p></o:p></div>
<div class="MsoNormal">
</<span class="SpellE">ItemTemplate</span>><o:p></o:p></div>
<div class="MsoNormal">
</<span class="SpellE">asp:ListView</span>><o:p></o:p></div>
<div class="MsoNormal">
<div
style="margin-left: auto; margin-right: auto; width: 120px;"
id="<span class="SpellE">divPostsLoader</span>"><o:p></o:p></div>
<div class="MsoNormal">
</div><o:p></o:p></div>
<div class="MsoNormal">
</div><o:p></o:p></div>
<div class="MsoNormal">
</div><o:p></o:p></div>
<div class="MsoNormal">
</form><o:p></o:p></div>
<div class="MsoNormal">
</body><o:p></o:p></div>
<div class="MsoNormal">
</html></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span class="SpellE"><b style="mso-bidi-font-weight: normal;">Default.aspx.cs</b></span><b style="mso-bidi-font-weight: normal;"><o:p></o:p></b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 658.8pt;" valign="top" width="878"><div class="MsoNormal">
using System;<o:p></o:p></div>
<div class="MsoNormal">
using <span class="SpellE">System.Linq</span>;<o:p></o:p></div>
<div class="MsoNormal">
using <span class="SpellE">System.Web</span>;<o:p></o:p></div>
<div class="MsoNormal">
using <span class="SpellE">System.Web.Services</span>;<o:p></o:p></div>
<div class="MsoNormal">
using <span class="SpellE">System.Text</span>;<o:p></o:p></div>
<div class="MsoNormal">
using System.IO;<o:p></o:p></div>
<div class="MsoNormal">
namespace <span class="SpellE">InfiniteScroll</span><o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
public partial
class Default : <span class="SpellE">System.Web.UI.Page</span><o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
protected
void <span class="SpellE">Page_Load</span>(object sender, <span class="SpellE">EventArgs</span>
e)<o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
if (!<span class="SpellE">IsPostBack</span>)<o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">Fill_List</span>(48);<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
private void
<span class="SpellE">Fill_List</span>(<span class="SpellE">int</span> Rows)<o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
string <span class="SpellE">Imagespath</span> = <span class="SpellE">HttpContext.Current.Server.MapPath</span>("~/Images/");<o:p></o:p></div>
<div class="MsoNormal">
string <span class="SpellE">SitePath</span> = <span class="SpellE">HttpContext.Current.Server.MapPath</span>("~");<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">var</span> Files = (from file in <span class="SpellE">Directory.GetFiles</span>(<span class="SpellE">Imagespath</span>) select new { image = <span class="SpellE">file.Replace</span>(<span class="SpellE">SitePath</span>, "~/") }).Take(Rows);<o:p></o:p></div>
<div class="MsoNormal">
ListView1.DataSource = <span class="SpellE">Files.ToList</span>();<o:p></o:p></div>
<div class="MsoNormal">
ListView1.DataBind();<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
[<span class="SpellE">WebMethod</span>]<o:p></o:p></div>
<div class="MsoNormal">
public
static string <span class="SpellE">LoadImages</span>(<span class="SpellE">int</span>
Skip, <span class="SpellE">int</span> Take)<o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">System.Threading.Thread.Sleep</span>(2000);<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">StringBuilder</span> <span class="SpellE">GetImages</span> = new <span class="SpellE">StringBuilder</span>();<o:p></o:p></div>
<div class="MsoNormal">
string <span class="SpellE">Imagespath</span> = <span class="SpellE">HttpContext.Current.Server.MapPath</span>("~/Images/");<o:p></o:p></div>
<div class="MsoNormal">
string <span class="SpellE">SitePath</span> = <span class="SpellE">HttpContext.Current.Server.MapPath</span>("~");<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">var</span> Files = (from file in <span class="SpellE">Directory.GetFiles</span>(<span class="SpellE">Imagespath</span>) select new { image = <span class="SpellE">file.Replace</span>(<span class="SpellE">SitePath</span>, "~/") }).Skip(Skip).Take(Take);<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">foreach</span> (<span class="SpellE">var</span> file in Files)<o:p></o:p></div>
<div class="MsoNormal">
{<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">var</span> <span class="SpellE">imageSrc</span> = <span class="SpellE">file.image.Replace</span>("\\",
"/").Substring(1); //Remove First '/' from image path<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">GetImages.Append</span>(" ");<o:p></o:p></div>
<div class="MsoNormal">
<span class="SpellE">GetImages.AppendFormat</span>(<span class="SpellE">string.Format</span>("<<span class="SpellE">img</span> <span class="SpellE">src</span>='{0}'/>", <span class="SpellE">imageSrc</span>));
<span class="SpellE">GetImages.Append</span>(" ");<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
return <span class="SpellE">GetImages.ToString</span>();<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
}<o:p></o:p></div>
<div class="MsoNormal">
}</div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This post provides just an introduction (basic) on the
usage of “Infinite Scroll” feature. However the likes (immense potential) of
which we have already seen in “Facebook updates”, “Flip kart item search” and “Bing
and Google image search” etc.,.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">References:<o:p></o:p></b></div>
<div class="MsoNormal">
<a href="http://www.infinite-scroll.com/">http://www.infinite-scroll.com/</a></div>
<div class="MsoNormal">
<a href="http://jquery.com/">http://jquery.com/</a> </div>
<div class="MsoNormal">
<a href="http://code.msdn.microsoft.com/Infinite-Scroll-Like-Bing-bc05262b#content">http://code.msdn.microsoft.com/Infinite-Scroll-Like-Bing-bc05262b#content</a></div>
<div class="MsoNormal">
<br /></div>
</div>
</div>Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com0tag:blogger.com,1999:blog-7522253738128323307.post-62697203719475528062012-06-02T11:43:00.001-07:002012-09-06T23:47:04.476-07:00How to decompress files in Metro style applications?<div dir="ltr" style="text-align: left;" trbidi="on">
<link href="How%20to%20decompress%20files%20in%20Metro%20style%20applications_files/filelist.xml" rel="File-List"></link>
<link href="How%20to%20decompress%20files%20in%20Metro%20style%20applications_files/themedata.thmx" rel="themeData"></link>
<link href="How%20to%20decompress%20files%20in%20Metro%20style%20applications_files/colorschememapping.xml" rel="colorSchemeMapping"></link>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-520081665 -1073717157 41 0 66047 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1593833729 1073750107 16 0 415 0;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-520092929 1073806591 9 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0pt;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-link:"Balloon Text Char";
margin:0pt;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-font-family:Tahoma;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Balloon Text";
mso-ansi-font-size:8.0pt;
mso-bidi-font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-ascii-font-family:Tahoma;
mso-fareast-font-family:Tahoma;
mso-hansi-font-family:Tahoma;
mso-bidi-font-family:Tahoma;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<br />
<div class="WordSection1">
<a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=rajendransp" rel="tag" style="display: none;">CodeProject</a>
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">In
this blog post, I am going to demonstrate on how to use <b><span class="SpellE">ZipArchive</span>
</b>class in Metro style app to decompress a set of files and save the extracted
files to a particular location.<o:p></o:p></span><br />
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Steps to decompress
a set of files:<o:p></o:p></span></b></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Step 1:</span></b><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"> Select the compressed
file to decompress.<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590"><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Initialize file
open picker</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">FileOpenPicker</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">fileOpenPicker</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">new</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">FileOpenPicker</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">fileOpenPicker.ViewMode</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> = </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">PickerViewMode</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.List</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Suggest start
location</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">fileOpenPicker.SuggestedStartLocation</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> = </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">PickerLocationId</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.ComputerFolder</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Add file type
filter</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">fileOpenPicker.FileTypeFilter.Add</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(</span><span style="background: none repeat scroll 0% 0% white; color: maroon; font-family: "Verdana","sans-serif"; font-size: 11pt;">"*.zip"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Opens file open
picker to allow the user to select the compressed file</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">stgFile</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">fileOpenPicker.PickSingleFileAsync</span>();</span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Step 2:</span></b><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"> Select folder to
extract the files<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590"><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Initialize
folder picker</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">FolderPicker</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">saveFolder</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">new</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">FolderPicker</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Suggest start
location</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">saveFolder.SuggestedStartLocation</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> = </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">PickerLocationId</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.Desktop</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Add file type
filter</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">saveFolder.FileTypeFilter.Add</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(</span><span style="background: none repeat scroll 0% 0% white; color: maroon; font-family: "Verdana","sans-serif"; font-size: 11pt;">"*"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Opens folder
picker to allow the user to select the folder to extract the compressed items</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFolder</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">storageFolder</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">saveFolder.PickSingleFolderAsync</span>(); <o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Step 3: </span></b><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Use <span class="SpellE">ZipArchive</span> class to extract the files to the selected
folder <o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590"><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Read the stream
from the compressed file</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">Stream</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">stream</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">stgFile.OpenStreamForReadAsync</span>();<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Copy it to
Memory stream for further manipulation</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">MemoryStream</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">ms</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">new</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">MemoryStream</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">stream.CopyToAsync</span>(<span class="SpellE">ms</span>);<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">ms.Position</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> = 0;<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Open Zip archive
of the compressed file</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">zipArchive</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">new</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">ZipArchive</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(<span class="SpellE">ms</span>, </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">ZipArchiveMode</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.Read</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//For each archive
entry, create file and folder accordingly and then copy the entry stream to
the file.</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">foreach</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> (</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">ZipArchiveEntry</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> entry </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">in</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">zipArchive.Entries</span>)<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">storageFile</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Assign Selected
save folder</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFolder</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">stgFolder</span> = <span class="SpellE">storageFolder</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Create Folder</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">stgFolder</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">CreateFolder</span>(<span class="SpellE">storageFolder</span>, <span class="SpellE">entry.FullName.Replace</span>(<span class="SpellE">entry.Name</span>,
</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">string</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.Empty</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">));<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Create File</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">storageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">stgFolder.CreateFileAsync</span>(<span class="SpellE">entry.Name</span>, </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">CreationCollisionOption</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.ReplaceExisting</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Open file stream
for writing</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">Stream</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> s = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">storageFile.OpenStreamForWriteAsync</span>();<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Copy the entry
stream to the file stream</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">entry.Open</span>().<span class="SpellE">CopyToAsync</span>(s);<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Dispose</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">s.Dispose</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Dispose</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">zipArchive.Dispose</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">stream.Dispose</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">();<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">ms.Dispose</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">();</span><b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></b></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Helper methods:<o:p></o:p></span></b></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Create
folder based on the file path present in Zip Archive entry<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590"><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">async</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">Task</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFolder</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">> <span class="SpellE">CreateFolder</span>(</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFolder</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">stgFolder</span>, </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">string</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> path)<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Split the folder
path for creating sub folder</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">string</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">[] <span class="SpellE">locationSplit</span> = <span class="SpellE">path.Split</span>(</span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">new</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">char</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">[] { </span><span style="background: none repeat scroll 0% 0% white; color: maroon; font-family: "Verdana","sans-serif"; font-size: 11pt;">'/'</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> });<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">for</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> (</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">int</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> i = 0; i < <span class="SpellE">locationSplit.Length</span>; i++)<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Create folder</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">if</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> (<span class="SpellE">locationSplit</span>[i] != </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">string</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.Empty</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">stgFolder</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">stgFolder.CreateFolderAsync</span>(<span class="SpellE">locationSplit</span>[i],
</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">CreationCollisionOption</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.OpenIfExists</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">return</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">stgFolder</span>;<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}</span><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Thus
the files under the selected compressed file are extracted to a particular
location.<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">References:<o:p></o:p></span></b></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/en-us/library/windows/apps/br207928.aspx
<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/library/windows/apps/BR207847<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.pickers.folderpicker.aspx
<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/en-us/library/windows/apps/system.runtime.interopservices.windowsruntime.windowsruntimebufferextensions%28v=vs.110%29.aspx
<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/en-us/library/windows/apps/hh454050%28v=vs.110%29.aspx
<o:p></o:p></span></div>
<div class="MsoNormalCxSpLast">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/en-us/library/windows/apps/system.io.compression.ziparchive%28v=vs.110%29.aspx<o:p></o:p></span></div>
</div>
</div>
Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com0tag:blogger.com,1999:blog-7522253738128323307.post-28624426711590563392012-06-02T11:41:00.001-07:002012-09-06T23:46:33.173-07:00How to compress files in Metro style applications?<div dir="ltr" style="text-align: left;" trbidi="on">
<link href="How%20to%20compress%20files%20in%20Metro%20style%20applications_files/filelist.xml" rel="File-List"></link>
<link href="How%20to%20compress%20files%20in%20Metro%20style%20applications_files/themedata.thmx" rel="themeData"></link>
<link href="How%20to%20compress%20files%20in%20Metro%20style%20applications_files/colorschememapping.xml" rel="colorSchemeMapping"></link>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-520081665 -1073717157 41 0 66047 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1593833729 1073750107 16 0 415 0;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-520092929 1073806591 9 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0pt;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{mso-style-unhide:no;
mso-style-parent:"";
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-unhide:no;
color:purple;
mso-themecolor:followedhyperlink;
text-decoration:underline;
text-underline:single;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-link:"Balloon Text Char";
margin:0pt;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-font-family:Tahoma;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-parent:"";
mso-style-link:"Balloon Text";
mso-ansi-font-size:8.0pt;
mso-bidi-font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-ascii-font-family:Tahoma;
mso-fareast-font-family:Tahoma;
mso-hansi-font-family:Tahoma;
mso-bidi-font-family:Tahoma;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<br />
<div class="WordSection1">
<div class="MsoNormalCxSpMiddle">
<a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=rajendransp" rel="tag" style="display: none;">CodeProject</a>
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p>In
this blog post, I am going to demonstrate on how to use <b><span class="SpellE">ZipArchive</span>
</b>class in Metro style app to compress a set of files and save the compressed
file to a particular location.<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Steps to compress a
set of files:<o:p></o:p></span></b></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Step 1:</span></b><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"> Select the folder
containing the files which you want to compress.<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590"><div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Select Folder to Compress</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">FolderPicker</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">saveFolder</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">new</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">FolderPicker</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">();<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Suggest start location</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">saveFolder.SuggestedStartLocation</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> = </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">PickerLocationId</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.Desktop</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">;<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Add file type filter</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">saveFolder.FileTypeFilter.Add</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(</span><span style="background: none repeat scroll 0% 0% white; color: maroon; font-family: "Verdana","sans-serif"; font-size: 11pt;">"*"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Opens folder picker to allow the user to select the folder to
compress</span><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">StorageFolder</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">storageFolderForCompression</span>
= </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">saveFolder.PickSingleFolderAsync</span>();</span><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Step 2:</span></b><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"> Retrieve the files
present under the selected folder<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590"><div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// Retrieve the files to compress</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">IReadOnlyList</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">> <span class="SpellE">filesToCompress</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">GetStorageFiles</span>(<span class="SpellE">storageFolderForCompression</span>
</span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">as</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">IStorageItem</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">);</span><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Helper methods:<o:p></o:p></span></b></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590"><div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">async</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">Task</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">List</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">>> <span class="SpellE">GetStorageFiles</span>(</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">IStorageItem</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">storageItem</span>)<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">List</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">> <span class="SpellE">storageFileList</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">new</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">List</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">>();<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// Gets the items under the selected folder (Storage Item)</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">IReadOnlyList</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">IStorageItem</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">> items = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> (<span class="SpellE">storageItem</span> </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">as</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFolder</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">).<span class="SpellE">GetItemsAsync</span>();<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">foreach</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">IStorageItem</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> item </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">in</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> items)<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">switch</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(<span class="SpellE">item.Attributes</span>)<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">case</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">FileAttributes</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.Directory</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">:<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// If the item is a directory under the selected folder, then retrieve
the files under the directory by calling the same function recursively</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">List</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">> temp = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">GetStorageFiles</span>(item);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// Copy the files under the directory to the storage file list</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">Copy(temp, <span class="SpellE">storageFileList</span>);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">break</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">;<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">default</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">:<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// If the item is a file, Add the item to the storage file list</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">storageFileList.Add</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(item </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">as</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">break</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">;<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// Return storage file list for compression</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">return</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">storageFileList</span>;<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}</span><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590"><div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">private</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">void</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> Copy(</span><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">List</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">> source, </span><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">List</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">> destination)<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// For each file item present under the directory copy it to the
destination storage file list</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">foreach</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> (</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> file </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">in</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> source)<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">destination.Add</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(file);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}</span><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Note:</span></b><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"> Alternatively you
can use <span class="SpellE">FileOpenPicker</span> control’s <span class="SpellE"><span class="GramE">PickMultipleFilesAsync</span></span><span class="GramE">(</span>)
method to allow the users to select multiple files instead selecting the
folder. In this way you can skip both Step 1 and Step 2.<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590"><div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// File open picker</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">FileOpenPicker</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">fileOpenPicker</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">new</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">FileOpenPicker</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">();<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">fileOpenPicker.SuggestedStartLocation</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> = </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">PickerLocationId</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.ComputerFolder</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">;<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">fileOpenPicker.FileTypeFilter.Add</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(</span><span style="background: none repeat scroll 0% 0% white; color: maroon; font-family: "Verdana","sans-serif"; font-size: 11pt;">"*"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// Allows user to select multiple files which returns storage file
list</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">IReadOnlyList</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">> <span class="SpellE">filesToCompress</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">fileOpenPicker.PickMultipleFilesAsync</span>();</span><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Step 3:</span></b><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"> Create <span class="SpellE">ZipArchive</span> object using a memory stream and then for each
file to be compressed Add a <span class="SpellE">ZipArchiveEntry</span> with the
file name and copy the file contents to the <span class="SpellE">ZipArchiveEntry</span>
stream.<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Once
the files are added to the zip archive, close the zip archive object and copy
the contents of memory stream to the storage file which is saved to a
particular location.<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590"><div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// Retrieve files to compress</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">IReadOnlyList</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">> <span class="SpellE">filesToCompress</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">GetStorageFiles</span>(<span class="SpellE">storageFolderForCompression</span> </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">as</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">IStorageItem</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// Created new file to store compressed files<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//This will create a file under the selected folder in the name
“Compressed.zip”</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">zipFile</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">storageFolderForCompression.CreateFileAsync</span>(</span><span style="background: none repeat scroll 0% 0% white; color: maroon; font-family: "Verdana","sans-serif"; font-size: 11pt;">"Compressed.zip"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// Create stream to compress files in memory (<span class="SpellE">ZipArchive</span>
can't stream to an <span class="SpellE">IRandomAccessStream</span>, see</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//
http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/62541424-ba7d-43d3-9585-1fe53dc7d9e2</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// for details on this issue)</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">using</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> (</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">MemoryStream</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">zipMemoryStream</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">new</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">MemoryStream</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">())<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// Create zip archive</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">using</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> (</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">ZipArchive</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">zipArchive</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">new</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">ZipArchive</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(<span class="SpellE">zipMemoryStream</span>, </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">ZipArchiveMode</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.Create</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">))<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// For each file to compress...</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">foreach</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> (</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">StorageFile</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">fileToCompress</span> </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">in</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">filesToCompress</span>)<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">//Read the contents of the file</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">byte</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">[] buffer = </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">WindowsRuntimeBufferExtensions</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.ToArray</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(</span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> </span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">FileIO</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.ReadBufferAsync</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(<span class="SpellE">fileToCompress</span>));<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// Create a zip archive entry</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">ZipArchiveEntry</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> entry = <span class="SpellE">zipArchive.CreateEntry</span>(<span class="SpellE">fileToCompress.Name</span>);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// And write the contents to it</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">using</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> (</span><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">Stream</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">entryStream</span> = <span class="SpellE">entry.Open</span>())<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">entryStream.WriteAsync</span>(buffer, 0, <span class="SpellE">buffer.Length</span>);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">using</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> (</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">IRandomAccessStream</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">zipStream</span> = </span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">await</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">zipFile.OpenAsync</span>(</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">FileAccessMode</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">.ReadWrite</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">))<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Verdana","sans-serif"; font-size: 11pt;">// Write compressed data from memory to file</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">using</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> (</span><span style="background: none repeat scroll 0% 0% white; color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 11pt;">Stream</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;"> <span class="SpellE">outstream</span> = <span class="SpellE">zipStream.AsStreamForWrite</span>())<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">{<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Verdana","sans-serif"; font-size: 11pt;">byte</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">[] buffer = <span class="SpellE">zipMemoryStream.ToArray</span>();<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">outstream.Write</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">(buffer, 0, <span class="SpellE">buffer.Length</span>);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">outstream.Flush</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">();<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Verdana","sans-serif"; font-size: 11pt;">}</span><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">Thus
the files under the selected folder are compressed to a particular location.<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">References:<o:p></o:p></span></b></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/en-us/library/windows/apps/br207928.aspx
<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/library/windows/apps/BR207847<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.pickers.folderpicker.aspx
<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/en-us/library/windows/apps/system.runtime.interopservices.windowsruntime.windowsruntimebufferextensions%28v=vs.110%29.aspx
<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/en-us/library/windows/apps/hh454050%28v=vs.110%29.aspx
<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif"; font-size: 11pt;">http://msdn.microsoft.com/en-us/library/windows/apps/system.io.compression.ziparchive%28v=vs.110%29.aspx
<o:p></o:p></span></div>
<div class="MsoNormalCxSpLast">
<br /></div>
</div>
</div>
Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com0tag:blogger.com,1999:blog-7522253738128323307.post-8711110524144485072012-05-18T10:40:00.000-07:002012-05-18T10:44:26.111-07:00How to embed image into HTML document?<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
mso-para-margin:0pt;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
table.MsoTableGrid
{mso-style-name:"Table Grid";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-unhide:no;
border:solid windowtext 1.0pt;
mso-border-alt:solid windowtext .5pt;
mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
mso-border-insideh:.5pt solid windowtext;
mso-border-insidev:.5pt solid windowtext;
mso-para-margin:0pt;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">In this
blog post, I will demonstrate how to embed image into HTML document.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">Usually we
provide image path to the src attribute of image tag. </span></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";"><img
src=” C:\SamplePictures\lighthouse.png” /></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">However
there will be circumstances in web applications where you want to provide the
HTML as downloadable content to the user. In such circumstances if the HTML
document contains any external resources like Images, CSS etc., they will not
be referenced/preserved along with the downloaded HTML document Hence the end
user may not be viewing the appropriate document. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">To achieve
the integrity of the HTML document, external resources like images, CSS can be embedded
into the document. This can be achieved in 2 steps.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 1:</span></b><span style="font-family: "Verdana","sans-serif";"> Create Base64 representation of
Image</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">string</span><span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;"> base64 = <span style="color: #2b91af;">Convert</span>.ToBase64String(imageBytes);
//This will convert the image bytes into base64 string.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 2:</span></b><span style="font-family: "Verdana","sans-serif";"> In the src attribute of image tag,
provide image information in below format.</span></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Format:</span></b></div>
<pre><span style="font-family: "Verdana","sans-serif"; font-size: 12.0pt;">data:[<MIME-type>][;charset=<encoding>][;base64],<data></span></pre>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">ex: </span></div>
<div class="MsoNormal" style="tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: "Courier New";"><img
src="<span style="color: blue;">data:image/png;base64,iVBsafd .. .. ..”</span>/>
</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">Now open
the document in browser, we can view the embedded image. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span style="font-family: "Verdana","sans-serif";">Data URI
scheme:</span></b></div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<span style="font-family: "Verdana","sans-serif";">Data
URI scheme is a URI scheme that provides a way to include data in-line with web
pages as if they were external resources. This allows images and style sheets
to be fetched in single HTTP request rather than multiple HTTP request.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";"><b>Browser
support:</b> </span></div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<span style="font-family: "Verdana","sans-serif";">All
major browsers like Firefox, Safari, Android, Chrome, IE8 and IE9 provide
support for this data URI scheme.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span style="font-family: "Verdana","sans-serif";">Sample C#
code snippet:</span></b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590">
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #2b91af; font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">FileStream</span><span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;"> fs = <span style="color: blue;">new</span> <span style="color: #2b91af;">FileStream</span>(<<ImagePath>>, <span style="color: #2b91af;">FileMode</span>.Open, <span style="color: #2b91af;">FileAccess</span>.Read);</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">byte</span><span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">[] imageBytes = <span style="color: blue;">new</span>
<span style="color: blue;">byte</span>[fs.Length];</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">fs.Read(imageBytes,
0, imageBytes.Length);</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #2b91af; font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">StreamWriter</span><span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;"> streamWriter = <span style="color: blue;">new</span>
<span style="color: #2b91af;">StreamWriter</span>(<span style="color: #a31515;">"test.html"</span>);</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">streamWriter.WriteLine(<span style="color: #a31515;">"<html>"</span>);</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">streamWriter.WriteLine(<span style="color: #a31515;">"<title>EmbeddingImage</title>"</span>);</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">streamWriter.WriteLine(<span style="color: #a31515;">"<body>"</span>);</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">streamWriter.Write(<span style="color: #a31515;">"<img src=\"data:image/"</span>+ <<FileExtension>></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">+ <span style="color: #a31515;">";base64,"</span> + <span style="color: #2b91af;">Convert</span>.ToBase64String(imageBytes)
+ <span style="color: #a31515;">"\"/>"</span>);</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">streamWriter.WriteLine(<span style="color: #a31515;">"</body>"</span>);</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">streamWriter.WriteLine(<span style="color: #a31515;">"</html>"</span>);</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">streamWriter.Close();</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Consolas;">System.Diagnostics.<span style="color: #2b91af;">Process</span>.Start(<span style="color: #a31515;">"test.html"</span>);</span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">For more
information on this refer below links:</span></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";"><a href="http://tools.ietf.org/html/rfc2397">http://tools.ietf.org/html/rfc2397</a>
</span></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";"><a href="http://en.wikipedia.org/wiki/Data_URI_scheme">http://en.wikipedia.org/wiki/Data_URI_scheme</a>
</span></div>
</div>Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com2tag:blogger.com,1999:blog-7522253738128323307.post-26928656757332014362012-05-03T14:57:00.000-07:002012-05-03T14:57:57.906-07:00How to feed Atom into your ASP.Net application using Repeater control?<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="0" Name="Hyperlink"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
mso-para-margin:0pt;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
table.MsoTableGrid
{mso-style-name:"Table Grid";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-unhide:no;
border:solid windowtext 1.0pt;
mso-border-alt:solid windowtext .5pt;
mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
mso-border-insideh:.5pt solid windowtext;
mso-border-insidev:.5pt solid windowtext;
mso-para-margin:0pt;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">In this
blog post, I will show you step by step illustration on how to feed Atom into
the ASP.Net application using Repeater control.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">What is Repeater Control?</span></b></div>
<div class="MsoNormal" style="text-indent: 36.0pt;">
<span style="font-family: "Verdana","sans-serif";">The
Repeater control is used to display a repeated list of items that are bound to
the control. The Repeater control may be bound to a database table, an XML
file, or another list of items.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">What is Atom?</span></b></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";"><span style="mso-tab-count: 1;"> </span>Atom Syndication format was developed as
an alternative to RSS used for web feeds. Atom syndication format was published
as an IETF<span style="mso-spacerun: yes;"> </span>proposed standard. For more
information refer: </span><a href="http://en.wikipedia.org/wiki/Atom_%28standard%29"><span style="font-family: "Verdana","sans-serif";">Atom_Wiki</span></a><span style="font-family: "Verdana","sans-serif";">
</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">An example
document in the Atom Syndication format</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt;" valign="top">
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">feed</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">xmlns</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">http://www.w3.org/2005/Atom</span>"<span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">title</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;">Example Feed<span style="color: blue;"></</span><span style="color: #a31515;">title</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">subtitle</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;">A subtitle.<span style="color: blue;"></</span><span style="color: #a31515;">subtitle</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">link</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">href</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">http://example.org/feed/</span>"<span style="color: blue;"> </span><span style="color: red;">rel</span><span style="color: blue;">=</span>"<span style="color: blue;">self</span>"<span style="color: blue;"> /></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">link</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">href</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">http://example.org/</span>"<span style="color: blue;"> /></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">id</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;">urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6<span style="color: blue;"></</span><span style="color: #a31515;">id</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">updated</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;">2003-12-13T18:30:02Z<span style="color: blue;"></</span><span style="color: #a31515;">updated</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">author</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">name</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;">Rajendran SP<span style="color: blue;"></</span><span style="color: #a31515;">name</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">email</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;">rajsp@example.com<span style="color: blue;"></</span><span style="color: #a31515;">email</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">author</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">entry</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">title</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;">Atom-Powered Robots Run Amok<span style="color: blue;"></</span><span style="color: #a31515;">title</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">link</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">href</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">http://example.org/2003/12/13/atom03</span>"<span style="color: blue;"> /></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">link</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">rel</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">alternate</span>"<span style="color: blue;"> </span><span style="color: red;">type</span><span style="color: blue;">=</span>"<span style="color: blue;">text/html</span>"<span style="color: blue;"> </span><span style="color: red;">href</span><span style="color: blue;">=</span>"<span style="color: blue;">http://example.org/2003/12/13/atom03.html</span>"<span style="color: blue;">/></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">link</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">rel</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">edit</span>"<span style="color: blue;"> </span><span style="color: red;">href</span><span style="color: blue;">=</span>"<span style="color: blue;">http://example.org/2003/12/13/atom03/edit</span>"<span style="color: blue;">/></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">id</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;">urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a<span style="color: blue;"></</span><span style="color: #a31515;">id</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">updated</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;">2003-12-13T18:30:02Z<span style="color: blue;"></</span><span style="color: #a31515;">updated</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">summary</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;">Some text.<span style="color: blue;"></</span><span style="color: #a31515;">summary</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">entry</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"></</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">feed</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">The best
way to learn more about Atom is go through the xml contents of the feed. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">How to feed Atom - step by step:</span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 1:</span></b><span style="font-family: "Verdana","sans-serif";"> Create an empty website and add a
Default.aspx web page.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 2:</span></b><span style="font-family: "Verdana","sans-serif";"> Create RemoveNamspaces.xsl
document.</span></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";"><span style="mso-tab-count: 1;"> </span>Atom feed contains namespaces that are
not supported in XMLDataSource. Hence we need to remove those namespaces while
providing the feed as data source. For that create an xsl transform document
using below contents and save it as RemoveNamespaces.xsl document. We will be
using this document while feeding Atom as XML data source for Repeater control.</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590">
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><?</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">xml</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">version</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">1.0</span>"<span style="color: blue;"> </span><span style="color: red;">encoding</span><span style="color: blue;">=</span>"<span style="color: blue;">UTF-8</span>"<span style="color: blue;">?></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:stylesheet</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">version</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">1.0</span>"</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">xmlns:xsl</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">http://www.w3.org/1999/XSL/Transform</span>"<span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:output</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">method</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">xml</span>"<span style="color: blue;"> </span><span style="color: red;">version</span><span style="color: blue;">=</span>"<span style="color: blue;">1.0</span>"<span style="color: blue;"> </span><span style="color: red;">encoding</span><span style="color: blue;">=</span>"<span style="color: blue;">UTF-8</span>"<span style="color: blue;"> </span><span style="color: red;">indent</span><span style="color: blue;">=</span>"<span style="color: blue;">yes</span>"<span style="color: blue;">/></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:template</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">match</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">*</span>"<span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><!--</span><span style="color: green; font-family: Consolas; font-size: 9.5pt;"> Remove any prefixes </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">--></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:element</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">{local-name()}</span>"<span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><!--</span><span style="color: green; font-family: Consolas; font-size: 9.5pt;"> Work through attributes </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">--></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:for-each</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">select</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">@*</span>"<span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><!--</span><span style="color: green; font-family: Consolas; font-size: 9.5pt;"> Remove any attribute prefixes </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">--></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:attribute</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">{local-name()}</span>"<span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:value-of</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">select</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">.</span>"<span style="color: blue;">/></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:attribute</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:for-each</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:apply-templates</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">/></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:element</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:template</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"></</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">xsl:stylesheet</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 3:</span></b><span style="font-family: "Verdana","sans-serif";"> Add data repeater control.</span></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgujl1sLBpOvcIqwLSsCKLJZkuB7Kaf7GMzbwUWKNvzINXo08cCxQChYhV95NjxOoKMPb32eoqM5TgBpyFpYxncPPVFOfmHsAc0bsNQHr4ONgpClxEW0KTN1lwo75AbfpyrMzJD_f9rACwX/s1600/AddRepeaterControl.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgujl1sLBpOvcIqwLSsCKLJZkuB7Kaf7GMzbwUWKNvzINXo08cCxQChYhV95NjxOoKMPb32eoqM5TgBpyFpYxncPPVFOfmHsAc0bsNQHr4ONgpClxEW0KTN1lwo75AbfpyrMzJD_f9rACwX/s640/AddRepeaterControl.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 4:</span></b><span style="font-family: "Verdana","sans-serif";"> Select new Data source in smart
tag.</span></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWMcYYpkLdQCriVLPhY5FOjJNzGMagzySTb3XAt4jE6eS2YTRhemTFR_4oQLxzq2STRe6yrH3NzDRHBHm4CUQzOfMl1nQj6rN84gyUr8019DKKksdXJXojtNGs9DWYqR6cuLQCNtDDY_eG/s1600/SelectDataSource.png" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWMcYYpkLdQCriVLPhY5FOjJNzGMagzySTb3XAt4jE6eS2YTRhemTFR_4oQLxzq2STRe6yrH3NzDRHBHm4CUQzOfMl1nQj6rN84gyUr8019DKKksdXJXojtNGs9DWYqR6cuLQCNtDDY_eG/s640/SelectDataSource.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<div class="MsoNormal">
<br /><span style="font-family: "Verdana","sans-serif";"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 5:</span></b><span style="font-family: "Verdana","sans-serif";"> Add xml data source.</span></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif"; mso-no-proof: yes;"><br /></span><span style="font-family: "Verdana","sans-serif";"></span></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbdQ95q_4OmIM-abBzkkbN8Kb-WmKZ3z1g0qk3rgl0Ham5ix9nXha8JviUk-p_Se55xIir0DA4ESqJ69ePYbFMQZX_dyzA_FY7Sm8RneEu7lroM4Wo2jL4wNS7rle3dH3IFKKBWPpvCDr9/s1600/AddXMLDataSource.png" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="482" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbdQ95q_4OmIM-abBzkkbN8Kb-WmKZ3z1g0qk3rgl0Ham5ix9nXha8JviUk-p_Se55xIir0DA4ESqJ69ePYbFMQZX_dyzA_FY7Sm8RneEu7lroM4Wo2jL4wNS7rle3dH3IFKKBWPpvCDr9/s640/AddXMLDataSource.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 6:</span></b><span style="font-family: "Verdana","sans-serif";"> Configure XML data source and
provide details as in below screenshot.<span style="mso-no-proof: yes;"></span></span></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfxX1bj0bBlJkvTFHxP4ERPkbXbf2CNJdDy61rpBdY0EP80OMC4naW05ZZbgZ5vRhf9aWHfAwET1wfnVwBiKQlYJRSDrCRd2BBd8xGMFJtjSp1JlMSJHtJbAdVoSRm5-X3Yh3g180Nq84o/s1600/ConfigureDataSource.png" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="394" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfxX1bj0bBlJkvTFHxP4ERPkbXbf2CNJdDy61rpBdY0EP80OMC4naW05ZZbgZ5vRhf9aWHfAwET1wfnVwBiKQlYJRSDrCRd2BBd8xGMFJtjSp1JlMSJHtJbAdVoSRm5-X3Yh3g180Nq84o/s640/ConfigureDataSource.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"> </td></tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">Here for
Atom feed we are going to provide following details.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Data file:</span></b><span style="font-family: "Verdana","sans-serif";"> provide the Atom blog post feed link.</span></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">Ex: </span><a href="http://rajendransp.blogspot.com/feeds/posts/default"><span style="font-family: "Verdana","sans-serif";">http://rajendransp.blogspot.com/feeds/posts/default</span></a><span style="font-family: "Verdana","sans-serif";"> </span></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Transform file:</span></b><span style="font-family: "Verdana","sans-serif";"> provide or browse the
RemoveNamespaces.xsl document.</span></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">XPath:</span></b><span style="font-family: "Verdana","sans-serif";"> “feed/entry”</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 7:</span></b><span style="font-family: "Verdana","sans-serif";"> In Source view of the aspx page,
Add below item template code.</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590">
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">asp</span><span style="color: blue;">:</span><span style="color: maroon;">Repeater</span> <span style="color: red;">ID</span><span style="color: blue;">="Repeater1"</span> <span style="color: red;">runat</span><span style="color: blue;">="server"</span> <span style="color: red;">DataSourceID</span><span style="color: blue;">="XmlDataSource1"></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">ItemTemplate</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">br</span> <span style="color: blue;">/></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">a</span> <span style="color: red;">target</span><span style="color: blue;">="_blank"</span> <span style="color: red;">href</span><span style="color: blue;">='</span><span style="background: yellow; mso-highlight: yellow;"><%</span><span style="color: blue;">#</span>
XPath("link[@rel='alternate']/@href") <span style="background: yellow; mso-highlight: yellow;">%></span><span style="color: blue;">'></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">strong</span><span style="color: blue;">></span> <span style="background: yellow; mso-highlight: yellow;"><%</span><span style="color: blue;">#</span> XPath(<span style="color: #a31515;">"title"</span>).ToString()<span style="background: yellow; mso-highlight: yellow;">%></span> <span style="color: blue;"></</span><span style="color: maroon;">strong</span><span style="color: blue;">></</span><span style="color: maroon;">a</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">br</span> <span style="color: blue;">/></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"></</span><span style="color: maroon;">ItemTemplate</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"></</span><span style="color: maroon;">asp</span><span style="color: blue;">:</span><span style="color: maroon;">Repeater</span><span style="color: blue;">></span></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 8:</span></b><span style="font-family: "Verdana","sans-serif";"> Compile and run</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Output:</span></b></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_NM88BBZ0Ps-ZfV3ajdMQZspJ92XWnf8Ga3KXpkQxyICAEsONbFUJa5WJPEVWdMyfLKcnV8JrDjMF5ZjqVUbcgsIsL1poaghd_UmawI1iP2R5DOR0JxYePCPs5Oihuola_2wEnMLxsRNp/s1600/Output.png" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="376" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_NM88BBZ0Ps-ZfV3ajdMQZspJ92XWnf8Ga3KXpkQxyICAEsONbFUJa5WJPEVWdMyfLKcnV8JrDjMF5ZjqVUbcgsIsL1poaghd_UmawI1iP2R5DOR0JxYePCPs5Oihuola_2wEnMLxsRNp/s640/Output.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<div class="MsoNormal">
<br /><span style="font-family: "Verdana","sans-serif";"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">On an
additional Note, you can also view the content/summary of the blog along with
the title by using below code in source.</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0pt 5.4pt 0pt 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0pt 5.4pt 0pt 5.4pt; width: 442.8pt;" valign="top" width="590">
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">asp</span><span style="color: blue;">:</span><span style="color: maroon;">Repeater</span> <span style="color: red;">ID</span><span style="color: blue;">="Repeater1"</span> <span style="color: red;">runat</span><span style="color: blue;">="server"</span> <span style="color: red;">DataSourceID</span><span style="color: blue;">="XmlDataSource1"></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">ItemTemplate</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">br</span> <span style="color: blue;">/></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">a</span> <span style="color: red;">target</span><span style="color: blue;">="_blank"</span> <span style="color: red;">href</span><span style="color: blue;">='</span><span style="background: yellow; mso-highlight: yellow;"><%</span><span style="color: blue;">#</span>
XPath("link[@rel='alternate']/@href") <span style="background: yellow; mso-highlight: yellow;">%></span><span style="color: blue;">'></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">strong</span><span style="color: blue;">></span> <span style="background: yellow; mso-highlight: yellow;"><%</span><span style="color: blue;">#</span> XPath(<span style="color: #a31515;">"title"</span>).ToString()<span style="background: yellow; mso-highlight: yellow;">%></span> <span style="color: blue;"></</span><span style="color: maroon;">strong</span><span style="color: blue;">></</span><span style="color: maroon;">a</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: maroon;">br</span> <span style="color: blue;">/></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-tab-count: 1;"> </span><span style="background: yellow; mso-highlight: yellow;"><%</span><span style="color: blue;">#</span> XPath(<span style="color: #a31515;">"content"</span>).ToString()
<span style="background: yellow; mso-highlight: yellow;">%></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"></</span><span style="color: maroon;">ItemTemplate</span><span style="color: blue;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"></</span><span style="color: maroon;">asp</span><span style="color: blue;">:</span><span style="color: maroon;">Repeater</span><span style="color: blue;">></span></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Note:</span></b><span style="font-family: "Verdana","sans-serif";"> No Code behind involved.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">References:</span></b></div>
<ul type="disc">
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;">Blog on adding RSS <a href="http://blogs.msdn.com/b/benko/archive/2011/11/30/adding-an-rss-feed-to-a-site-or-how-to-use-the-xmldatasource-and-a-repeater.aspx">http://blogs.msdn.com/b/benko/archive/2011/11/30/adding-an-rss-feed-to-a-site-or-how-to-use-the-xmldatasource-and-a-repeater.aspx</a>
</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;">BLOG Basic XMLDataSource
and Repeater tutorial <a href="http://beecy.net/post/2009/04/17/Making-XmlDataSource-Work-with-RSS-10-RSS-20-and-Atom-Feeds.aspx" title="http://beecy.net/post/2009/04/17/Making-XmlDataSource-Work-with-RSS-10-RSS-20-and-Atom-Feeds.aspx">http://beecy.net/post/2009/04/17/Making-XmlDataSource-Work-with-RSS-10-RSS-20-and-Atom-Feeds.aspx</a>
</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;">BLOG Working with XPath
queries <a href="http://www.willasrari.com/blog/create-keyword-filtered-rss-feeds-using-xmldatasource/000107.aspx" title="http://www.willasrari.com/blog/create-keyword-filtered-rss-feeds-using-xmldatasource/000107.aspx">http://www.willasrari.com/blog/create-keyword-filtered-rss-feeds-using-xmldatasource/000107.aspx</a>
</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;">BLOG XPath Syntax <a href="http://www.w3schools.com/xpath/xpath_syntax.asp" title="http://www.w3schools.com/xpath/xpath_syntax.asp">http://www.w3schools.com/xpath/xpath_syntax.asp</a>
</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;">MSDN XPath Reference <a href="http://msdn.microsoft.com/en-us/library/ms256122.aspx" title="http://msdn.microsoft.com/en-us/library/ms256122.aspx">http://msdn.microsoft.com/en-us/library/ms256122.aspx</a>
</li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;">MSDN XPath Examples <a href="http://msdn.microsoft.com/en-us/library/ms256086.aspx" title="http://msdn.microsoft.com/en-us/library/ms256086.aspx">http://msdn.microsoft.com/en-us/library/ms256086.aspx</a>
</li>
</ul>
</div>Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com1tag:blogger.com,1999:blog-7522253738128323307.post-20389904225760956852012-05-03T14:10:00.001-07:002012-05-03T14:19:34.875-07:00How to feed RSS into your ASP.Net application using Repeater control?<div dir="ltr" style="text-align: left;" trbidi="on">
<title></title><link href="Blog_How%20to%20feed%20RSS%20into%20your%20ASPHtml_styles.css" rel="stylesheet" type="text/css"></link><br />
<div class="Section0">
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
</div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">In this blog post, I will show you step by step illustration on how to feed RSS into the ASP.Net application using Repeater control.</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">What is Repeater Control?</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left; text-indent: 36pt;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">The Repeater control is used to display a repeated list of items that are bound to the control. The Repeater control may be bound to a database table, an XML file, or another list of items.</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">What is RSS?</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">RSS (RDF Site Summary) is a family of web feed formats used to publish/post frequently updated works like blog entries, news headlines, audio and video in a standardized forma</span><a href="http://www.blogger.com/blogger.g?blogID=7522253738128323307" id="_GoBack"></a><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">t.</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> For more information refer: </span><a href="http://en.wikipedia.org/wiki/RSS" style="color: blue; font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; text-transform: none;"><span class="Default-Paragraph-Font Hyperlink" style="font-family: Verdana; font-size: 12pt;">RSS</span><span class="Default-Paragraph-Font Hyperlink" style="font-family: Verdana; font-size: 12pt;">_</span><span class="Default-Paragraph-Font Hyperlink" style="font-family: Verdana; font-size: 12pt;">Wiki</span></a><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">An example document in RSS format</span></div>
<div>
<table cellspacing="0" style="border-collapse: collapse;"><tbody>
<tr style="height: 2px;"><td style="border-bottom-color: #000000; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: #000000; border-left-style: solid; border-left-width: 1pt; border-right-color: #000000; border-right-style: solid; border-right-width: 1pt; border-top-color: #000000; border-top-style: solid; border-top-width: 1pt; padding-bottom: 0pt; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0pt; vertical-align: top; width: 590.4px;"><div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><?</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">xml</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">version</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">=</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">"</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">1.0</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">"</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">encoding</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">=</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">"</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">UTF-8</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">"</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> ?></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">rss</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">version</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">=</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">"</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">2.0</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">"</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">channel</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">title</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">RSS Title</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">title</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">description</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">This is an example of an RSS feed</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">description</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">link</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">http://www.someexamplerssdomain.com/main.html</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">link</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">lastBuildDate</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Mon, 06 Sep 2010 00:01:00 +0000 </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">lastBuildDate</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">pubDate</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Mon, 06 Sep 2009 16:45:00 +0000 </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">pubDate</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">ttl</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">1800</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">ttl</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">item</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">title</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Example entry</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">title</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">description</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Here is some text containing an interesting description.</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">description</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">link</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">http://www.wikipedia.org/</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">link</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">guid</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">unique string per item</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">guid</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> <</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">pubDate</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Mon, 06 Sep 2009 16:45:00 +0000 </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">pubDate</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">item</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">channel</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">rss</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
</td></tr>
<tr style="height: 0px;"><td style="border: none; padding: 0pt; width: 442.8px;"><br /></td></tr>
</tbody></table>
</div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">The best way to learn more about RSS is </span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">go</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> through the xml contents of the feed. </span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">How to add RSS - step by step:</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">Step 1:</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> Create an empty website and add a Default.aspx web page.</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">Step 2:</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> Add data repeater control.</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgujl1sLBpOvcIqwLSsCKLJZkuB7Kaf7GMzbwUWKNvzINXo08cCxQChYhV95NjxOoKMPb32eoqM5TgBpyFpYxncPPVFOfmHsAc0bsNQHr4ONgpClxEW0KTN1lwo75AbfpyrMzJD_f9rACwX/s1600/AddRepeaterControl.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgujl1sLBpOvcIqwLSsCKLJZkuB7Kaf7GMzbwUWKNvzINXo08cCxQChYhV95NjxOoKMPb32eoqM5TgBpyFpYxncPPVFOfmHsAc0bsNQHr4ONgpClxEW0KTN1lwo75AbfpyrMzJD_f9rACwX/s400/AddRepeaterControl.png" width="500" /></a></div>
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;"> </span><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">Step 3:</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> Select new Data source in smart tag.</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWMcYYpkLdQCriVLPhY5FOjJNzGMagzySTb3XAt4jE6eS2YTRhemTFR_4oQLxzq2STRe6yrH3NzDRHBHm4CUQzOfMl1nQj6rN84gyUr8019DKKksdXJXojtNGs9DWYqR6cuLQCNtDDY_eG/s1600/SelectDataSource.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWMcYYpkLdQCriVLPhY5FOjJNzGMagzySTb3XAt4jE6eS2YTRhemTFR_4oQLxzq2STRe6yrH3NzDRHBHm4CUQzOfMl1nQj6rN84gyUr8019DKKksdXJXojtNGs9DWYqR6cuLQCNtDDY_eG/s640/SelectDataSource.png" width="500" /></a></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">Step 4:</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> Add xml data source.</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbdQ95q_4OmIM-abBzkkbN8Kb-WmKZ3z1g0qk3rgl0Ham5ix9nXha8JviUk-p_Se55xIir0DA4ESqJ69ePYbFMQZX_dyzA_FY7Sm8RneEu7lroM4Wo2jL4wNS7rle3dH3IFKKBWPpvCDr9/s1600/AddXMLDataSource.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbdQ95q_4OmIM-abBzkkbN8Kb-WmKZ3z1g0qk3rgl0Ham5ix9nXha8JviUk-p_Se55xIir0DA4ESqJ69ePYbFMQZX_dyzA_FY7Sm8RneEu7lroM4Wo2jL4wNS7rle3dH3IFKKBWPpvCDr9/s640/AddXMLDataSource.png" width="500" /></a></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
</div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">Step 5:</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> Configure XML data source and provide details as in below screenshot.</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijNeyLHU9Q_fH2ForzqQzy0_mg8TKN4d87MpHd20Gx85yAvHpTfHL7DWwDnMluJHWzhyphenhyphenoNRGNmiFXYwUGAdlEuzx46GThUJEmT6mPuqxSSqpI625VWTptL1OJpEp5EFomr-L7jLXmoilTR/s1600/RSSXMLDataconfigure.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijNeyLHU9Q_fH2ForzqQzy0_mg8TKN4d87MpHd20Gx85yAvHpTfHL7DWwDnMluJHWzhyphenhyphenoNRGNmiFXYwUGAdlEuzx46GThUJEmT6mPuqxSSqpI625VWTptL1OJpEp5EFomr-L7jLXmoilTR/s640/RSSXMLDataconfigure.png" width="500" /></a></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Here for RSS feed we are going to provide following details</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">Data file:</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> provide the RSS blog post feed link </span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">from MSDN</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Ex: http://blogs.msdn.com/b/MainFeed.aspx?Type=BlogsOnly </span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">XPath</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">: </span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">rss</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">/channel/item</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">Step 6:</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> I</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">n Source view of the </span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">aspx</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> page, Add below item template code</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> in repeater control</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">.</span></div>
<div>
<table cellspacing="0" style="border-collapse: collapse;"><tbody>
<tr style="height: 2px;"><td style="border-bottom-color: #000000; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: #000000; border-left-style: solid; border-left-width: 1pt; border-right-color: #000000; border-right-style: solid; border-right-width: 1pt; border-top-color: #000000; border-top-style: solid; border-top-width: 1pt; padding-bottom: 0pt; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0pt; vertical-align: top; width: 590.4px;"><div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">asp</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">:</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Repeater</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">ID</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">="Repeater1"</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">runat</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">="server"</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">DataSourceID</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">="XmlDataSource1"></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">ItemTemplate</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">a</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">target</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">="_blank"</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">href</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">='</span><span style="background-color: yellow; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><%</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">#</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">XPath</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">(</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">"link") </span><span style="background-color: yellow; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">%></span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">'></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">strong</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="background-color: yellow; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><%</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">#</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">XPath</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">(</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">"title"</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">).</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">ToString</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">()</span><span style="background-color: yellow; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">%></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">strong</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">a</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">br</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">/></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">ItemTemplate</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">asp</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">:</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Repeater</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
</td></tr>
<tr style="height: 0px;"><td style="border: none; padding: 0pt; width: 442.8px;"><br /></td></tr>
</tbody></table>
</div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">Step 7:</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> Compile and run</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">Output:</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirPVVGg0MvUlhmC03tyIGVlOry81eDcFCU-tCZKTG5sOeBcMjHnN3cv4ukhyFijWNWe-bpdeoWHb4UwhQm2ZmooiwxcEShozE53WTvBXN8JbG6X8XngPUvofeBBjrkQDuCgkarQ-QJTB4O/s1600/RSSOutput.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirPVVGg0MvUlhmC03tyIGVlOry81eDcFCU-tCZKTG5sOeBcMjHnN3cv4ukhyFijWNWe-bpdeoWHb4UwhQm2ZmooiwxcEShozE53WTvBXN8JbG6X8XngPUvofeBBjrkQDuCgkarQ-QJTB4O/s640/RSSOutput.png" width="500" /></a></div>
</div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">On an additional Note, you can also view the description of the blog along with the title by using below code in source.</span></div>
<div>
<table cellspacing="0" style="border-collapse: collapse;"><tbody>
<tr style="height: 2px;"><td style="border-bottom-color: #000000; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: #000000; border-left-style: solid; border-left-width: 1pt; border-right-color: #000000; border-right-style: solid; border-right-width: 1pt; border-top-color: #000000; border-top-style: solid; border-top-width: 1pt; padding-bottom: 0pt; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0pt; vertical-align: top; width: 590.4px;"><div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">asp</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">:</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Repeater</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">ID</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">="Repeater1"</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">runat</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">="server"</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">DataSourceID</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">="XmlDataSource1"></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">ItemTemplate</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">a</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">target</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">="_blank"</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: red; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">href</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">='</span><span style="background-color: yellow; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><%</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">#</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">XPath</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">(</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">"link") </span><span style="background-color: yellow; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">%></span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">'></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">strong</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="background-color: yellow; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><%</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">#</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">XPath</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">(</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">"title"</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">).</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">ToString</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">()</span><span style="background-color: yellow; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">%></span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">strong</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">a</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">br</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">/></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="background-color: yellow; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"><%</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">#</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">XPath</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">(</span><span style="color: #a31515; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">"description"</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">).</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">ToString</span><span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">() </span><span style="background-color: yellow; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">%></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">ItemTemplate</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"></</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">asp</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">:</span><span style="color: maroon; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Repeater</span><span style="color: blue; font-family: Verdana; font-size: 9.5pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">></span></div>
</td></tr>
<tr style="height: 0px;"><td style="border: none; padding: 0pt; width: 442.8px;"><br /></td></tr>
</tbody></table>
</div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">Not</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">e:</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> No code behind involved.</span></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<br /></div>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-transform: none;">References:</span></div>
<ul style="text-align: left;">
<li><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">Blog on adding RSS </span><a href="http://blogs.msdn.com/b/benko/archive/2011/11/30/adding-an-rss-feed-to-a-site-or-how-to-use-the-xmldatasource-and-a-repeater.aspx" style="color: blue; font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; text-transform: none;"><span class="Default-Paragraph-Font Hyperlink" style="font-family: Verdana; font-size: 12pt;">http://blogs.msdn.com/b/benko/archive/2011/11/30/adding-an-rss-feed-to-a-site-or-how-to-use-the-xmldatasource-and-a-repeater.aspx</span></a></li>
<li><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">BLOG Basic </span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">XMLDataSource</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> and Repeater tutorial </span><a href="http://beecy.net/post/2009/04/17/Making-XmlDataSource-Work-with-RSS-10-RSS-20-and-Atom-Feeds.aspx" style="color: blue; font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; text-transform: none;"><span class="Default-Paragraph-Font Hyperlink" style="font-family: Verdana; font-size: 12pt;">http://beecy.net/post/2009/04/17/Making-XmlDataSource-Work-with-RSS-10-RSS-20-and-Atom-Feeds.aspx</span></a></li>
<li><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">BLOG Working with </span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">XPath</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> queries </span><a href="http://www.willasrari.com/blog/create-keyword-filtered-rss-feeds-using-xmldatasource/000107.aspx" style="color: blue; font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; text-transform: none;"><span class="Default-Paragraph-Font Hyperlink" style="font-family: Verdana; font-size: 12pt;">http://www.willasrari.com/blog/create-keyword-filtered-rss-feeds-using-xmldatasource/000107.aspx</span></a></li>
<li><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">BLOG </span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">XPath</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> Syntax </span><a href="http://www.w3schools.com/xpath/xpath_syntax.asp" style="color: blue; font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; text-transform: none;"><span class="Default-Paragraph-Font Hyperlink" style="font-family: Verdana; font-size: 12pt;">http://www.w3schools.com/xpath/xpath_syntax.asp</span></a></li>
<li><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">MSDN </span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">XPath</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> Reference </span><a href="http://msdn.microsoft.com/en-us/library/ms256122.aspx" style="color: blue; font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; text-transform: none;"><span class="Default-Paragraph-Font Hyperlink" style="font-family: Verdana; font-size: 12pt;">http://msdn.microsoft.com/en-us/library/ms256122.aspx</span></a></li>
<li><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">MSDN </span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">XPath</span><span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> Examples </span><a href="http://msdn.microsoft.com/en-us/library/ms256086.aspx" style="color: blue; font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; text-transform: none;"><span class="Default-Paragraph-Font Hyperlink" style="font-family: Verdana; font-size: 12pt;">http://msdn.microsoft.com/en-us/library/ms256086.aspx</span></a></li>
</ul>
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;"> </span><br />
<ul type="disc">
</ul>
<div style="margin-bottom: 0pt; margin-top: 0pt; page-break-after: auto; page-break-before: auto; page-break-inside: auto; text-align: left;">
<span style="font-family: Verdana; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: normal; text-transform: none;">In my next post, I will show the steps on how to feed Atom into ASP.Net</span></div>
</div>
</div>Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com2tag:blogger.com,1999:blog-7522253738128323307.post-28193400283896873302012-04-25T07:22:00.000-07:002012-04-25T07:22:05.433-07:00Image Comparison using Image Magick freeware.<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: "Verdana","sans-serif";">In my
previous blog post, I have demonstrated the quickest way to identify whether 2
images are identical or different using C#. </span><span style="font-family: "Verdana","sans-serif";">In this
blog post, I will show you how to check exactly the visual difference between 2
different images using Image Magick compare tool.<o:p></o:p></span><br />
<br />
<div class="MsoNormal" style="margin: 0pt;">
<span style="font-family: "Verdana","sans-serif";">ImageMagick
is a software suite to create, edit, compose, or convert bitmap images. Use
ImageMagick to resize, flip, mirror, rotate, distort, shear and transform
images, adjust image colors, apply various special effects, or draw text,
lines, polygons, ellipses and Bézier curves. Here, I am going to demonstrate
Compare utility of Image Magick.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0pt;">
<span style="font-family: "Verdana","sans-serif";"><strong>Step 1:</strong> As
a first step install Image Magick software which you can find in below link.</span></div>
<div class="MsoNormal" style="margin: 0pt;">
<a href="http://www.imagemagick.org/script/command-line-tools.php"><span style="font-family: "Verdana","sans-serif";"><span style="color: blue;">http://www.imagemagick.org/script/command-line-tools.php</span></span></a><span style="font-family: "Verdana","sans-serif";"> <o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0pt;">
<span style="font-family: "Verdana","sans-serif";">This will
install the required compare.exe tool in below location<o:p></o:p></span></div>
<span style="font-family: "Verdana","sans-serif";">C:\Program
Files\ImageMagick-x.x.x-xxx<o:p></o:p></span><br />
<br />
<div class="MsoNormal" style="margin: 0pt;">
<span style="font-family: "Verdana","sans-serif";"><strong>Step 2:</strong> As
a next step take 2 images which you want to compare. For example I have taken 2
bitmap images in which one has a text “Hello” and another one with “Hello World”.<o:p></o:p></span></div>
<span style="font-family: "Verdana","sans-serif";"></span><br />
<span style="font-family: "Verdana","sans-serif";">Hello.bmp –
Standard</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoO7I6l-5hOpbCC0kJGAxN0F2OF_lHO02C152NEEv5lrgvzvegOrXSTwW8ShRnh8KzF9n_xWHyrOvuR_s_51eE7BbnoIi1iEO7q9zaGorUMOQzMkXiy9EpFrvebpZh3t6LgvXf_n4g_CNp/s1600/Hello.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="41" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoO7I6l-5hOpbCC0kJGAxN0F2OF_lHO02C152NEEv5lrgvzvegOrXSTwW8ShRnh8KzF9n_xWHyrOvuR_s_51eE7BbnoIi1iEO7q9zaGorUMOQzMkXiy9EpFrvebpZh3t6LgvXf_n4g_CNp/s320/Hello.bmp" width="320" /></a></div>
<div class="MsoNormal" style="margin: 0pt;">
<span style="font-family: "Verdana","sans-serif"; mso-no-proof: yes;"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
<v:f eqn="sum @0 1 0">
<v:f eqn="sum 0 0 @1">
<v:f eqn="prod @2 1 2">
<v:f eqn="prod @3 21600 pixelWidth">
<v:f eqn="prod @3 21600 pixelHeight">
<v:f eqn="sum @0 0 1">
<v:f eqn="prod @6 1 2">
<v:f eqn="prod @7 21600 pixelWidth">
<v:f eqn="sum @8 21600 0">
<v:f eqn="prod @7 21600 pixelHeight">
<v:f eqn="sum @10 21600 0">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
<o:lock aspectratio="t" v:ext="edit">
</o:lock></v:path></v:stroke></v:shapetype></span><span style="font-family: "Verdana","sans-serif";"><o:p></o:p></span></div>
<br /><br />
<br />
<br />
<span style="font-family: "Verdana","sans-serif";">HelloWorld.bmp
– Image for Comparison<o:p></o:p></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVRkZZPudNECJ7TGG8h4ZO5ZWtKClSX0GE1ZU30P3rOmk_4YTKNBn80K9IVuQUpjR2f3w8yDXltXKOfWWnGIJAJCB7x2hjrB57LEO5Z7hGxexBhSs6LwhpM8JW2nV8p6BJ-lKePcjX56Ju/s1600/HelloWorld.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="41" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVRkZZPudNECJ7TGG8h4ZO5ZWtKClSX0GE1ZU30P3rOmk_4YTKNBn80K9IVuQUpjR2f3w8yDXltXKOfWWnGIJAJCB7x2hjrB57LEO5Z7hGxexBhSs6LwhpM8JW2nV8p6BJ-lKePcjX56Ju/s320/HelloWorld.bmp" width="320" /></a></div>
<br />
<div class="MsoNormal" style="margin: 0pt;">
<br /></div>
<div class="MsoNormal" style="margin: 0pt;">
<br /><br /><span style="font-family: "Verdana","sans-serif";"><strong>Step 3: </strong>Open
command prompt and then type the command following below syntax<o:p></o:p></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM9T9U6Puvzockhaqalm8UKK75mfS1FhyphenhyphenBNH3dRIuItT08010DpSrv07KNNSEgYFnQ0cYjFPjg-t9ItIYQ02sX4IWSp9JUxIn-3lXFrzUSkvF-904G5xJPa3RhLOq9MbFnYy71OsbJHnoU/s1600/cmd.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM9T9U6Puvzockhaqalm8UKK75mfS1FhyphenhyphenBNH3dRIuItT08010DpSrv07KNNSEgYFnQ0cYjFPjg-t9ItIYQ02sX4IWSp9JUxIn-3lXFrzUSkvF-904G5xJPa3RhLOq9MbFnYy71OsbJHnoU/s400/cmd.png" width="500" /></a></div>
<div class="MsoNormal" style="margin: 0pt; page-break-after: avoid;">
<span style="font-family: "Verdana","sans-serif"; mso-no-proof: yes;"></span><o:p></o:p></div>
<br />
<div align="center" class="MsoCaption" style="margin: 0pt 0pt 10pt; text-align: center;">
<br /></div>
<div align="center" class="MsoCaption" style="margin: 0pt 0pt 10pt; text-align: center;">
<br /></div>
<div align="center" class="MsoCaption" style="margin: 0pt 0pt 10pt; text-align: center;">
<br /></div>
<div class="MsoCaption" style="margin: 0pt 0pt 10pt; text-align: left;">
<br />
<strong><span style="font-size: x-small;"><span style="color: #4f81bd;">Command line Image Comparison
using Compare.exe<span style="font-family: "Verdana","sans-serif";"><o:p></o:p></span></span></span></strong></div>
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Syntax:<o:p></o:p></span></b><br />
<span style="font-family: "Verdana","sans-serif";">Compare.exe
–metric type InputImageFullPath1 InputImageFullPath2 DifferenceImageFullPath<o:p></o:p></span><br />
<br />
<div class="MsoNormal" style="margin: 0pt;">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Example:<o:p></o:p></span></b></div>
<span style="font-family: "Verdana","sans-serif";">C:\Program
Files\ImageMagick-6.7.3-Q16>compare.exe -metric AE "D:\ImageComparisonTest\Hello.bmp"
"D:\ImageComparisonTest\HelloWorld.bmp" "D:\ImageComparisonTest\DiffHelloWorld.bmp"<o:p></o:p></span><br />
<br />
<div class="MsoNormal" style="margin: 0pt;">
<span style="font-family: "Verdana","sans-serif";">Where,<o:p></o:p></span></div>
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">-metric {type}</span></b><span style="font-family: "Verdana","sans-serif";"> - measures the differences between
images with this metric.<o:p></o:p></span><br />
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Ex:</span></b><span style="font-family: "Verdana","sans-serif";"> –metric <b style="mso-bidi-font-weight: normal;">AE </b>- Here AE represents absolute error. This will report the
standard error with the number of pixel counts that were actually masked in the
difference output.<o:p></o:p></span><br />
<span style="font-family: "Verdana","sans-serif";"><strong>InputImageFullPath1</strong>
– Provide full path for the standard image.<o:p></o:p></span><br />
<span style="font-family: "Verdana","sans-serif";"><strong>InputImageFullPath2</strong>
– provide full path for the image which you want to compare with the standard
image<o:p></o:p></span><br />
<span style="font-family: "Verdana","sans-serif";"><strong>DifferenceImageFullPath</strong>
– Provide full path to save the difference output image.<o:p></o:p></span><br />
<br />
<div class="MsoNormal" style="margin: 0pt;">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Difference output:<o:p></o:p></span></b></div>
<span style="font-family: "Verdana","sans-serif";">7653 - Pixels
have been masked in generating below difference image.<o:p></o:p></span><br />
<span style="font-family: "Verdana","sans-serif";">DiffHelloWorld.bmp<span style="mso-no-proof: yes;"></span><o:p></o:p></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnEHLYrn43js80wOj3UqVPufSB7sxmmyk1GXxCJ5aSg2Xk7XAo0BKidbQDoQf8XAwtWy9Q9ua0kRyjvDVn-7JRmfokqDnuw7IIKgrjehNyt3ZA_ly3_Sg2OZgnzHqMImyKng64viotPSeJ/s1600/DiffHelloWorld.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="41" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnEHLYrn43js80wOj3UqVPufSB7sxmmyk1GXxCJ5aSg2Xk7XAo0BKidbQDoQf8XAwtWy9Q9ua0kRyjvDVn-7JRmfokqDnuw7IIKgrjehNyt3ZA_ly3_Sg2OZgnzHqMImyKng64viotPSeJ/s320/DiffHelloWorld.bmp" width="320" /></a></div>
<br />
<div class="MsoNormal" style="margin: 0pt;">
<br />
<br /> </div>
<span style="font-family: "Verdana","sans-serif";">Here in the
output image the difference is masked with red color. <o:p></o:p></span><br />
<br />
<div class="MsoNormal" style="margin: 0pt;">
<span style="font-family: "Verdana","sans-serif";">This
utility will be very much helpful in batch processing for comparing large set of
images. For more information on the usage of compare utility refer below link<o:p></o:p></span></div>
<a href="http://www.imagemagick.org/Usage/compare/"><span style="font-family: "Verdana","sans-serif";"><span style="color: blue;">http://www.imagemagick.org/Usage/compare/</span></span></a><span style="font-family: "Verdana","sans-serif";"> <o:p></o:p></span></div>Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com0tag:blogger.com,1999:blog-7522253738128323307.post-33818704391527412032012-04-22T08:05:00.000-07:002012-04-22T08:05:57.172-07:00Image Comparison – What is the quick way to identify whether 2 images are identical or different?<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
mso-para-margin:0pt;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">In this
blog post, i will show you the quickest way to identify whether 2 images are
identical or different using C#.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">As a first
step in determining whether 2 images are identical or not, we use the file size
information for basic comparison. However what happens when 2 different images
have same file size. In this case you cannot determine the difference using
file size. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">Following are
several approaches in comparing the images.</span></div>
<ol style="text-align: left;">
<li><span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Verdana; mso-fareast-font-family: Verdana;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span style="font-family: "Verdana","sans-serif";">Comparing hash of the image </span></li>
<li><span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Verdana; mso-fareast-font-family: Verdana;"><span style="mso-list: Ignore;"></span></span><span style="font-family: "Verdana","sans-serif";">Comparing byte by byte </span></li>
<li><span style="font-family: "Verdana","sans-serif"; mso-bidi-font-family: Verdana; mso-fareast-font-family: Verdana;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span style="font-family: "Verdana","sans-serif";">Comparing pixel by pixel etc..,</span></li>
</ol>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">In the
above approaches, 1<sup>st</sup> one comparing the hash of the images is the
fastest technique to determine whether the images are different.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Image Hash Comparison:</span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 1: Find the hash of the given
image</span></b></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">Using any
hashing technique supported in C#, compute the hash of the image by providing
image bytes as argument. This will create a 32 bytes hash.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">Code
Snippet:</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">HMACSHA1</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> hmacSha1 = <span style="color: blue;">new</span> <span style="color: #2b91af;">HMACSHA1</span>();</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">byte</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">[] imageHash = hmacSha1.ComputeHash(ImageBytes);</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Note:</span></b><span style="font-family: "Verdana","sans-serif";"><span style="mso-spacerun: yes;">
</span>Here ComputeHash() method will always generate 32 bytes of hash
irrespective of the size of the image.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Step 2: Compare the calculated 32
bytes hash</span></b><span style="font-family: "Verdana","sans-serif";"> (byte by
byte) and if any byte differs you can stop the comparison and return that the
images are not equal.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Verdana","sans-serif";">Code
Snippet:</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">private</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> <span style="color: blue;">bool</span>
IsImageEqual(<span style="color: blue;">byte</span>[] imageHash1, <span style="color: blue;">byte</span>[] imageHash2)</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">{</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">bool</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> isImageEqual = <span style="color: blue;">true</span>;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">//Compare the hash values</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">for</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> (<span style="color: blue;">int</span> j = 0; j
< imageHash1.Length && j < imageHash2.Length; j++)</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">{</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">if</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> (imageHash1[j] != imageHash2[j])</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">{</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">isImageEqual = <span style="color: blue;">false</span>;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">break</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">return</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> isImageEqual;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">}</span></div>
</div>Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com0tag:blogger.com,1999:blog-7522253738128323307.post-84175187783147157832012-04-21T22:36:00.000-07:002012-04-22T07:58:03.474-07:00Recursive vs. For Loop, Which is better<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
mso-para-margin:0pt;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]-->
<br />
<div class="MsoNormalCxSpFirst">
<i style="mso-bidi-font-style: normal;"><span style="font-family: "Verdana","sans-serif"; font-size: 11.0pt; mso-bidi-font-size: 12.0pt;">Checked
with factorial program and sequential sum.</span></i></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif";">In
this blog post, I just wanted to post my observation on recursive and for loop
program. I just started creating a factorial program using both recursive and
for loop technique. I am just inquisitive to know which one is better. </span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif";">In
the initial observation both <b style="mso-bidi-font-weight: normal;">recursive </b>and
<b style="mso-bidi-font-weight: normal;">for</b> loop produced results in almost
identical time. 65 is the maximum integer value for which factorial is
calculated properly. Then I did further power testing creating <b style="mso-bidi-font-weight: normal;">for</b> loop to find out factorial for each
integer starting 0 – 65 using both <b style="mso-bidi-font-weight: normal;">recursive</b>
and <b style="mso-bidi-font-weight: normal;">for</b> loop technique. To my
surprise I found out <b style="mso-bidi-font-weight: normal;">recursive</b> did
better than <b style="mso-bidi-font-weight: normal;">for</b> loop by a few
milliseconds.</span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Test case 1: Factorial</span></b></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif";">…</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">for</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> (<span style="color: blue;">uint</span> i = 0; i < 65; i++)</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">{</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">UInt64</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> factPower = FactForLoop(i);</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">}</span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif";">…</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">for</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> (<span style="color: blue;">uint</span> i = 0; i < 65; i++)</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">{</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">UInt64</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> factPower = FactRecursive(i);</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">}</span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif";">…</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">private</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> <span style="color: #2b91af;">UInt64</span> FactRecursive(<span style="color: #2b91af;">UInt64</span>
number)</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">{</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">if</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> (number >
0)</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">fact = number * FactRecursive(number - 1);</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">return</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> fact;</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">}</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">private</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> <span style="color: #2b91af;">UInt64</span> FactForLoop(<span style="color: #2b91af;">UInt64</span>
number)</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">{</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">for</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">(<span style="color: blue;">uint</span> i =1;i<=number;i++)</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">fact*=i;</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">return</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> fact;</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">}</span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif";">Then
I tried sequential sum (i.e) for any given integer (n), the program does is
creating a sum of integers starting 0 to n (0+1+2+..+n). In this case, the
performance of both technique is identical and at some cases <b style="mso-bidi-font-weight: normal;">for</b> loop fared better than the <b style="mso-bidi-font-weight: normal;">recursive</b> technique opposite to what I saw
earlier in factorial program. </span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Verdana","sans-serif";">Test Case 2: Sequential sum</span></b></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif";">…</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; tab-stops: 62.25pt 68.25pt; text-autospace: none;">
<span style="color: green; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">//sum for loop</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">UInt64</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> result = SumForLoop(<span style="color: #2b91af;">Convert</span>.ToUInt64(txtBoxNumber.Text));</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">//sum recursive</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"></span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #2b91af; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">UInt64</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> result = SumRecursive(<span style="color: #2b91af;">Convert</span>.ToUInt64(txtBoxNumber.Text));</span></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif";">…</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">private</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> <span style="color: #2b91af;">UInt64</span> SumRecursive(<span style="color: #2b91af;">UInt64</span>
number)</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">{</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">if</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> (number >
0)</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">sum = number + SumRecursive(number - 1);</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">return</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> sum;</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">}</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">private</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> <span style="color: #2b91af;">UInt64</span> SumForLoop(<span style="color: #2b91af;">UInt64</span>
number)</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">{</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">for</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> (<span style="color: blue;">uint</span> i = 1; i <= number; i++)</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">sum += i;</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">return</span><span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;"> sum;</span></div>
<div class="MsoNormalCxSpMiddle" style="mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Verdana","sans-serif"; font-size: 9.5pt; mso-bidi-font-family: Consolas;">}</span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif";">Additional
observation is that as we all know that the recursive call is being achieved by
maintaining stack, it has its limits. At large number of stack calls (recursive
calls), it may end up in <b style="mso-bidi-font-weight: normal;">stack overflow exception.</b></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<span style="font-family: "Verdana","sans-serif";">From
my observation, you can go for recursive only if the number of stack calls is
not huge otherwise stick to for loop. If you do find any other test results or
different observation kindly let me know in the comments. </span></div>
</div>Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com0tag:blogger.com,1999:blog-7522253738128323307.post-71055327342767565562012-04-20T07:19:00.000-07:002012-04-22T07:58:11.567-07:00GIDS.Net –Where Microsoft Focuses Next?<!--[if gte mso 9]><xml> <o:officedocumentsettings> <o:relyonvml/> <o:allowpng/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:enableopentypekerning/> <w:dontflipmirrorindents/> <w:overridetablestylehps/> </w:Compatibility> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="0" name="Hyperlink"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0pt 5.4pt 0pt 5.4pt; mso-para-margin:0pt; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";} </style> <![endif]--> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">This blog post will provide general details on things which I newly learnt @ the great Indian developer summit held at Bangalore on 4/17/2012. </span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">I attended the following sessions</span></p> <p class="MsoListParagraph" style="margin-left:18.0pt;mso-add-space:auto; text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman""> </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">Windows reimagined</span></b><span style="font-family:"Verdana","sans-serif""> </span><i style="mso-bidi-font-style: normal"><span style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: "Verdana","sans-serif"">by Harish</span></i><span style="font-size:10.0pt; mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif""> <i style="mso-bidi-font-style:normal">Vaidyanathan and Rajasekharan Vengalil</i></span><span style="font-family:"Verdana","sans-serif""> – focused session on Windows 8.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoListParagraph" style="margin-left:18.0pt;mso-add-space:auto; text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman""> </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">Put Web identity to work in your application</span></b><span style="font-family:"Verdana","sans-serif""> </span><i style="mso-bidi-font-style:normal"><span style="font-size:10.0pt;mso-bidi-font-size: 12.0pt;font-family:"Verdana","sans-serif"">by Mike Benkovich</span></i><span style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif""> </span><span style="font-family:"Verdana","sans-serif"">– session on using access control services</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoListParagraph" style="margin-left:18.0pt;mso-add-space:auto; text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman""> </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">How frameworks can kill your projects & patterns to prevent getting killed</span></b><i style="mso-bidi-font-style:normal"><span style="font-size:10.0pt;mso-bidi-font-size: 12.0pt;font-family:"Verdana","sans-serif""> by Sander Hoogendoorn </span></i><span style="font-family:"Verdana","sans-serif"">– session on what to do and what not to on implementing the chosen frameworks.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoListParagraph" style="margin-left:18.0pt;mso-add-space:auto; text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman""> </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">The Windows 8 platform for metro style Apps</span></b><i style="mso-bidi-font-style:normal"><span style="font-size:11.0pt;mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif""> by Ramaprasanna Chellamuthu </span></i><span style="font-family:"Verdana","sans-serif"">– session on how to leverage metro style apps.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoListParagraph" style="margin-left:18.0pt;mso-add-space:auto; text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman""> </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">SQL Server 2012 for Developers</span></b><span style="font-family:"Verdana","sans-serif""> </span><i style="mso-bidi-font-style: normal"><span style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: "Verdana","sans-serif"">by Amit Bansal</span></i><span style="font-size:10.0pt; mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif""> </span><span style="font-family:"Verdana","sans-serif"">– session on new features in SQL Server 2012.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoListParagraphCxSpFirst" style="margin-left:18.0pt;mso-add-space: auto;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman""> </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">Building Metro Style Apps with XAML: What .Net developers need to Know</span></b><span style="font-family:"Verdana","sans-serif""> </span><i style="mso-bidi-font-style:normal"><span style="font-size:10.0pt; font-family:"Verdana","sans-serif"">by Ramaprasanna Chellamuthu</span></i><span style="font-family:"Verdana","sans-serif""> – Introductory session on how to create metro style Apps with familiar XAML features and concepts.</span></p> <p class="MsoListParagraphCxSpMiddle"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoListParagraphCxSpLast" style="margin-left:18.0pt;mso-add-space:auto; text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman""> </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">Windows 8 and Cloud Computing – Notification & Identity</span></b><span style="font-family:"Verdana","sans-serif""> </span><i style="mso-bidi-font-style:normal"><span style="font-size:10.0pt; mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif"">by Mike Benkovich</span></i><span style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif""> </span><span style="font-family:"Verdana","sans-serif"">– session on notifications in metro style apps using Azure.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Based on these sessions, it is obvious that the Microsoft focusses on Windows 8 Metro style apps, Cloud services (Azure and SQL Azure) and SQL Server 2012.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">Windows reimagined</span></b><span style="font-family:"Verdana","sans-serif""> </span><i style="mso-bidi-font-style: normal"><span style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: "Verdana","sans-serif"">by Harish</span></i><span style="font-size:10.0pt; mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif""> <i style="mso-bidi-font-style:normal">Vaidyanathan and Rajasekharan Vengalil</i></span><span style="font-family:"Verdana","sans-serif""></span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Both Harish and Rajasekharan demonstrated the new Windows 8 operating system and the market opportunity for developers. IMO, It’s never been this better, Fluid UI Start menu - which is clean and unique other than that the rest is Windows 7. Windows 8 is a switchable OS common to both tablet and PC. Metro style app menu is a next gen user interface which has live tiles for clear cut notifications on what happens in the app at the background. Ex. Contacts app - live tiles can display the instant updates of images of your social contacts as like in Windows phone 7.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">Put Web identity to work in your application</span></b><span style="font-family:"Verdana","sans-serif""> </span><i style="mso-bidi-font-style:normal"><span style="font-size:10.0pt;mso-bidi-font-size: 12.0pt;font-family:"Verdana","sans-serif"">by Mike Benkovich</span></i><span style="font-family:"Verdana","sans-serif""></span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Mike demonstrated on how to use third party access control service providers like Facebook, Yahoo, and live ID into your cloud application. All you need for that is an active Azure subscription, next add an ACS service namespace, and then add a secure token service (STS) reference to your application. </span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">How frameworks can kill your projects & patterns to prevent getting killed</span></b><i style="mso-bidi-font-style:normal"><span style="font-size:10.0pt;mso-bidi-font-size: 12.0pt;font-family:"Verdana","sans-serif""> by Sander Hoogendoorn </span></i><span style="font-family:"Verdana","sans-serif""></span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Sander demonstrated on how to implement code independent of framework choices. He presented models of layered architectures, and looks at applying bridge patterns, managers-providers, dependency injection, descriptors and layer super-types followed by bad code examples using blocks from MS enterprise library, NHibernate, Log4Net and the entity framework.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">The Windows 8 platform for metro style Apps</span></b><i style="mso-bidi-font-style:normal"><span style="font-size:11.0pt;mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif""> by Ramaprasanna Chellamuthu </span></i><span style="font-family:"Verdana","sans-serif""></span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Ramaprasanna demonstrated on how to leverage metro style apps development. This is an introductory session over the architecture of building windows 8 platform. He introduced the platform design tenets, programming language choices and the integration points with the operating system and across metro style apps.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">SQL Server 2012 for Developers</span></b><span style="font-family:"Verdana","sans-serif""> </span><i style="mso-bidi-font-style: normal"><span style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family: "Verdana","sans-serif"">by Amit Bansal</span></i><span style="font-size:10.0pt; mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif""> </span><span style="font-family:"Verdana","sans-serif""></span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Amit demonstrated the new features of SQL server 2012 with demo codes. Some of the new features help the developer to code less and some with additional performance improvements. Nevertheless session is a walk through over the capabilities of SQL Server 2012.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">Building Metro Style Apps with XAML: What .Net developers need to Know</span></b><span style="font-family:"Verdana","sans-serif""> </span><i style="mso-bidi-font-style:normal"><span style="font-size:10.0pt; font-family:"Verdana","sans-serif"">by Ramaprasanna Chellamuthu</span></i><span style="font-family:"Verdana","sans-serif""> –</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Again Ramaprasanna took a session on Metro style Apps. This time he focused on how to create App with XAML skills learnt with .Net. He covered the features and concepts that are new for Windows 8.</span></p> <p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif""> </span></b></p> <p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="font-family:"Verdana","sans-serif"">Windows 8 and Cloud Computing – Notification & Identity</span></b><span style="font-family:"Verdana","sans-serif""> </span><i style="mso-bidi-font-style:normal"><span style="font-size:10.0pt; mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif"">by Mike Benkovich</span></i><span style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Verdana","sans-serif""> </span><span style="font-family:"Verdana","sans-serif""></span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Mike demonstrated how to deliver notifications in metro style apps (notification enabled services) using Windows Azure. He talked about live tiles and how to interact with users through the use of toast, tile, badge and raw notifications. The process involves is that the client app developer registers the app with windows push notification service (WNS) , then requests a channel to be notified on. It sends the channel to its cloud partner who persist the channel and then uses that to send notifications through WNS to the client. This result in a very rich interactive experience. </span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">You can download windows azure toolkit for windows 8 in below link.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""><a href="http://watwindows8.codeplex.com/">http://watwindows8.codeplex.com/</a></span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> </span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">You can find the details on the session in below link.</span></p> <p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""><a href="http://www.developermarch.com/developersummit/schedule.html">http://www.developermarch.com/developersummit/schedule.html</a><span class="MsoHyperlink"></span></span></p>Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com0tag:blogger.com,1999:blog-7522253738128323307.post-2857714624963208312012-04-19T17:33:00.001-07:002012-04-19T17:38:59.778-07:00Detective vs. Software Engineer…<!--[if gte mso 9]><xml> <o:officedocumentsettings> <o:allowpng/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:enableopentypekerning/> <w:dontflipmirrorindents/> <w:overridetablestylehps/> </w:Compatibility> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0pt 5.4pt 0pt 5.4pt; mso-para-margin:0pt; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";} </style> <![endif]--> <p><span style="font-family:"Verdana","sans-serif"">This blog post in not about comparing detective with a software engineer as might be the topic sounds. But it is all about how to add a light side (role play) to your work and how to make your work with little adventurous and of course with little fun. </span></p> <p><span style="font-size:16.0pt;font-family:"Verdana","sans-serif"">TRY </span></p> <p><span style="font-size:16.0pt;font-family:"Verdana","sans-serif"">{ </span></p> <p><span style="font-family:"Verdana","sans-serif"">As of any story of a detective, you need to have a villain. For a software engineer, it's an issue. Small or big the problem it is, the fix is always inversely proportional. IMO, it is always required less code changes to fix a big and complex issue. </span></p> <p><span style="font-family:"Verdana","sans-serif"">For any detective, it is fact he cannot ignore a small clue or details about the crime. He finds the clues & odd things in ignored area and finds the connections and put the things together to understand anything and everything related to crime. </span></p> <p><span style="font-family:"Verdana","sans-serif"">For a Software engineer, it is fact that he need to understand the base of the issue. </span></p> <ol start="1" type="1"><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1;tab-stops:list 36.0pt"><span style="font-family: "Verdana","sans-serif"">Why the issues happen in the first place? </span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1;tab-stops:list 36.0pt"><span style="font-family: "Verdana","sans-serif"">What's the reason for the issue? </span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1;tab-stops:list 36.0pt"><span style="font-family: "Verdana","sans-serif"">What's the problem in existing implementation? </span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1;tab-stops:list 36.0pt"><span style="font-family: "Verdana","sans-serif"">What's the expected outcome? </span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1;tab-stops:list 36.0pt"><span style="font-family: "Verdana","sans-serif"">What's the specification says and what's the implementation does? </span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1;tab-stops:list 36.0pt"><span style="font-family: "Verdana","sans-serif"">Are we handled the case in the right way? </span></li></ol> <p><span style="font-family:"Verdana","sans-serif"">These numerous inquisitive queries are part of finding the clues in every issues worked by Software engineer. </span></p> <p><span style="font-family:"Verdana","sans-serif"">Yes we are more than a detective, a detective evidence are all physical, he can put things by seeing them but as a software engineer, we need to move beyond what we can perceive because we need to visualize the things in our mind, putting clues together and finding the facts and imagining the expected outcome and go for it. We are tougher in a way and we need to be more analytical. </span></p> <p><span style="font-size:16.0pt;font-family:"Verdana","sans-serif"">} </span></p> <p><span style="font-size:16.0pt;font-family:"Verdana","sans-serif"">CATCH </span></p> <p><span style="font-size:16.0pt;font-family:"Verdana","sans-serif"">{ </span></p> <p><span style="font-family:"Verdana","sans-serif"">Once we find the cause, next step is implementing the fix. The easiest part in any issue fixing process but dangerous too. If any mistake is done it will affect the entire product. </span></p> <p><span style="font-family:"Verdana","sans-serif"">For a detective, he will devise plans and strategies to trap the target villain. Likewise we as a software engineer go for implementation after careful analyzing and understanding the base of the issue. </span></p> <p><span style="font-family:"Verdana","sans-serif"">Detective will follow standard protocols for trap we follow standard coding guidelines for the fix. </span></p> <p><span style="font-family:"Verdana","sans-serif"">Consider now the implementation is done and we are in testing phase/ trapping for possible outcomes to ensure the fix. </span></p> <p><span style="font-family:"Verdana","sans-serif"">Writing test case is more important than implementing the fix for the issue. After careful preparation in collecting evidence and setting traps, without catching villain and allowing him to escape is totally void and entire work of the detective is lost and wasted. Well, this is equivalent to implementing the fix and without proper testing (Test cases) allowing the loopholes in the fix for nurturing future issues. </span></p> <p><span style="font-family:"Verdana","sans-serif"">IMO, test cases allows us to cement the potholes occurring in the fix.</span><span style="font-size:16.0pt; font-family:"Verdana","sans-serif""> </span></p> <p><span style="font-size:16.0pt;font-family:"Verdana","sans-serif"">} </span></p> <p><span style="font-size:16.0pt;font-family:"Verdana","sans-serif"">FINALLY </span></p> <p><span style="font-size:16.0pt;font-family:"Verdana","sans-serif"">{ </span></p> <p><span style="font-family:"Verdana","sans-serif"">No matter what, the end result (ensuring the fix) is always an achievement for any software engineer in the life cycle of issue fixing. When we reach this stage we do always have proudness in our fix and its natural instincts to wanting more of this. </span></p> <p><span style="font-family:"Verdana","sans-serif"">No matter how tougher the issue is, have a lighter side of it and command the issue and don't get succumb to pressure. Hope such approach helps you. Happy fixing</span><span style="font-family:Wingdings">:)</span><span style="font-size:16.0pt;font-family: "Verdana","sans-serif""> </span></p> <p><span style="font-size:16.0pt;font-family:"Verdana","sans-serif"">}</span></p>Rajendran SPhttp://www.blogger.com/profile/16013000538454104943noreply@blogger.com1