<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6431932517498765568</id><updated>2012-02-12T09:22:34.732-08:00</updated><category term='C# and Asp.net'/><title type='text'>(svsv) Asp.net, C#, Sql server - code</title><subtitle type='html'>code code code code code code code code</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>61</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-2255077004857602766</id><published>2009-10-01T03:21:00.001-07:00</published><updated>2009-10-01T03:22:06.651-07:00</updated><title type='text'>Writing XPath Expressions</title><content type='html'>http://www.stylusstudio.com/docs/v60/d_xpath.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-2255077004857602766?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/2255077004857602766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=2255077004857602766&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/2255077004857602766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/2255077004857602766'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/10/writing-xpath-expressions_01.html' title='Writing XPath Expressions'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-5084017178535725606</id><published>2009-10-01T03:21:00.000-07:00</published><updated>2009-10-01T03:22:05.299-07:00</updated><title type='text'>Writing XPath Expressions</title><content type='html'>http://www.stylusstudio.com/docs/v60/d_xpath.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-5084017178535725606?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/5084017178535725606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=5084017178535725606&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/5084017178535725606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/5084017178535725606'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/10/writing-xpath-expressions.html' title='Writing XPath Expressions'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-3988445593441094231</id><published>2009-09-23T05:53:00.000-07:00</published><updated>2009-09-23T05:54:45.627-07:00</updated><title type='text'>TransactionScope</title><content type='html'>http://www.c-sharpcorner.com/UploadFile/mosessaur/TransactionScope04142006103850AM/TransactionScope.aspx&lt;br /&gt;http://www.codeproject.com/KB/dotnet/TransactionScope20.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-3988445593441094231?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/3988445593441094231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=3988445593441094231&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3988445593441094231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3988445593441094231'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/09/transactionscope.html' title='TransactionScope'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-4440035955179085</id><published>2009-09-23T05:31:00.000-07:00</published><updated>2009-09-23T05:32:38.427-07:00</updated><title type='text'>CLR Architecture</title><content type='html'>http://www.codeproject.com/KB/dotnet/DotNetWhitePaper.aspx&lt;br /&gt;http://www.codersource.net/basics_dot_net_framework.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-4440035955179085?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/4440035955179085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=4440035955179085&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4440035955179085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4440035955179085'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/09/clr-architecture.html' title='CLR Architecture'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-1521919007536010693</id><published>2009-09-22T01:07:00.000-07:00</published><updated>2009-09-22T01:08:07.853-07:00</updated><title type='text'>User Defined Functions in SqlServer</title><content type='html'>http://www.sqlteam.com/article/user-defined-functions&lt;br /&gt;http://www.java2s.com/Code/Oracle/Stored-Procedure-Function/Useauserdefinedfunctioninstoredprocedure.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-1521919007536010693?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/1521919007536010693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=1521919007536010693&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/1521919007536010693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/1521919007536010693'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/09/user-defined-functions-in-sqlserver.html' title='User Defined Functions in SqlServer'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-8818418025450619805</id><published>2009-09-22T00:58:00.000-07:00</published><updated>2009-09-22T01:01:36.193-07:00</updated><title type='text'>Wcf</title><content type='html'>http://www.codeproject.com/KB/aspnet/wcfinjavascript.aspx?display=Print&lt;br /&gt;http://nayyeri.net/host-wcf-service-and-asp-net-application-on-same-virtual-directory&lt;br /&gt;http://www.myitblog.com/sundararajan/programming-your-first-wcf-service.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-8818418025450619805?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/8818418025450619805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=8818418025450619805&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8818418025450619805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8818418025450619805'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/09/wcf_22.html' title='Wcf'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-3661955223106750766</id><published>2009-09-21T23:30:00.001-07:00</published><updated>2009-09-21T23:31:38.305-07:00</updated><title type='text'>WCF</title><content type='html'>&lt;a href="http://www.myitblog.com/sundararajan/programming-your-first-wcf-service.html"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-3661955223106750766?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/3661955223106750766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=3661955223106750766&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3661955223106750766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3661955223106750766'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/09/wcf_21.html' title='WCF'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-7062730928138766150</id><published>2009-09-21T23:30:00.000-07:00</published><updated>2009-09-21T23:31:37.597-07:00</updated><title type='text'>WCF</title><content type='html'>&lt;a href="http://www.myitblog.com/sundararajan/programming-your-first-wcf-service.html"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-7062730928138766150?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/7062730928138766150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=7062730928138766150&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/7062730928138766150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/7062730928138766150'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/09/wcf.html' title='WCF'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-7278926771283011261</id><published>2009-09-18T13:21:00.000-07:00</published><updated>2009-09-18T13:23:18.073-07:00</updated><title type='text'>Shortcut keys of special characters in Html and key board</title><content type='html'>Reference : &lt;a href="http://home.earthlink.net/~awinkelried/keyboard_shortcuts.html"&gt;http://home.earthlink.net/~awinkelried/keyboard_shortcuts.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Tip sheet on special characters&lt;br /&gt;On MacOS, the option key functions as a modifier key like the shift key. Hold it down and press another key simultaneously. For option - shift, hold down both the option and shift keys and press another key simultaneously.&lt;br /&gt;&lt;br /&gt;On Windows, the Alt key functions as a modifier like the shift key. To make special characters, hold down the Alt key and type in the numbers from the numeric keypad.&lt;br /&gt;&lt;br /&gt;(Note: I’m mentioning a useful little program because I use it at home on my Macintosh and a Windows machine and it helps you find a special character when you forget the key combination for it. Here’s how the author describes it:&lt;br /&gt;&lt;br /&gt;If you don’t want to remember all these numbers, you should try the little shareware utility PopChar from ergonis software. One click, and PopChar displays a table of all characters of the current font. Select the desired character and it instantly appears in your document. You can also insert HTML symbols. PopChar is available for Mac OS 9, Mac OS X, and Windows.)&lt;br /&gt;&lt;br /&gt;For more HTML number codes, see Character entity references in HTML 4.&lt;br /&gt;&lt;br /&gt;HTML Name Code HTML Number Code Glyph MacOS Windows Description &lt;br /&gt;&amp;lsquo; &amp;#8216; ‘   option - ] Alt + 0145 left single quote &lt;br /&gt;&amp;rsquo; &amp;#8217; ’   option - shift - ] Alt + 0146 right single quote &lt;br /&gt;&amp;sbquo; &amp;#8218; ‚       single low-9 quote &lt;br /&gt;&amp;ldquo; &amp;#8220; “   option - [ Alt + 0147 left double quote &lt;br /&gt;&amp;rdquo; &amp;#8221; ”  option - shift - [ Alt + 0148 right double quote &lt;br /&gt;&amp;bdquo; &amp;#8222; „   option - shift - w   double low-9 quote &lt;br /&gt;&amp;dagger; &amp;#8224; †   option - t Alt + 0134 dagger &lt;br /&gt;&amp;Dagger; &amp;#8225; ‡   option - shift - 7 Alt + 0135 double dagger &lt;br /&gt;  &amp;#8230; … option - ;   horizontal ellipsis &lt;br /&gt;&amp;permil; &amp;#8240; ‰   option - shift - r Alt + 0137 per mill sign &lt;br /&gt;&amp;lsaquo; &amp;#8249; ‹   option - shift - 3 Alt + 0139 single left-pointing angle quote &lt;br /&gt;&amp;rsaquo; &amp;#8250; ›   option - shift - 4 Alt + 0155 single right-pointing angle quote &lt;br /&gt;&amp;spades; &amp;#9824; ♠       black spade suit &lt;br /&gt;&amp;clubs; &amp;#9827; ♣       black club suit &lt;br /&gt;&amp;hearts; &amp;#9829; ♥       black heart suit &lt;br /&gt;&amp;diams; &amp;#9830; ♦       black diamond suit &lt;br /&gt;&amp;oline; &amp;#8254; ‾       overline, = spacing overscore &lt;br /&gt;&amp;larr; &amp;#8592; ←       leftward arrow &lt;br /&gt;&amp;uarr; &amp;#8593; ↑       upward arrow &lt;br /&gt;&amp;rarr; &amp;#8594; →       rightward arrow &lt;br /&gt;&amp;darr; &amp;#8595; ↓       downward arrow &lt;br /&gt;&amp;trade; &amp;#8482; ™   option - 2 Alt + 0153 trademark sign &lt;br /&gt;&amp;quot; &amp;#34; "     double quotation mark &lt;br /&gt;&amp;amp; &amp;#38; &amp;       ampersand &lt;br /&gt;&amp;lt; &amp;#60; &lt;       less-than sign &lt;br /&gt;&amp;gt; &amp;#62; &gt;       greater-than sign &lt;br /&gt; &amp;#91; [       left square bracket &lt;br /&gt; &amp;#93; ]       right square bracket &lt;br /&gt;&amp;ndash; &amp;#150; –   option - hyphen Alt + 0150 en dash &lt;br /&gt;&amp;mdash; &amp;#151; —   option - shift -hyphen Alt + 0151 em dash &lt;br /&gt;&amp;nbsp; &amp;#160;       Alt + 0160 nonbreaking space &lt;br /&gt;&amp;iexcl; &amp;#161; ¡   option - 1 Alt + 0161 inverted exclamation &lt;br /&gt;&amp;cent; &amp;#162; ¢   option - 4 Alt + 0162 cent sign &lt;br /&gt;&amp;pound; &amp;#163; £   option - 3 Alt + 0163 pound sterling &lt;br /&gt;&amp;curren; &amp;#164; ¤     Alt + 0164 general currency sign &lt;br /&gt;&amp;yen; &amp;#165; ¥   option - y Alt + 0165 yen sign &lt;br /&gt;&amp;brvbar; or &amp;brkbar; &amp;#166; ¦     Alt + 0166 broken vertical bar &lt;br /&gt;&amp;sect; &amp;#167; §   option - 6 Alt + 0167 section sign &lt;br /&gt;&amp;uml; or &amp;die; &amp;#168; ¨   option - shift - u Alt + 0168 umlaut &lt;br /&gt;&amp;copy; &amp;#169; ©   option - g Alt + 0169 copyright &lt;br /&gt;&amp;ordf; &amp;#170; ª   option - 9 Alt + 0170 feminine ordinal &lt;br /&gt;&amp;laquo; &amp;#171; «   option - \ Alt + 0171 left angle quote &lt;br /&gt;&amp;not; &amp;#172; ¬   option - l Alt + 0172 not sign &lt;br /&gt;&amp;shy; &amp;#173; ­     Alt + 0173 soft hyphen &lt;br /&gt;&amp;reg; &amp;#174; ®   option - r Alt + 0174 registered trademark &lt;br /&gt;&amp;macr; or &amp;hibar; &amp;#175; ¯     Alt + 0175 macron accent &lt;br /&gt;&amp;deg; &amp;#176; °   option - shift - 8 Alt + 0176 degree sign &lt;br /&gt;&amp;plusmn; &amp;#177; ±   option - shift - = Alt + 0177 plus or minus &lt;br /&gt;&amp;sup2; &amp;#178; ²     Alt + 0178 superscript two &lt;br /&gt;&amp;sup3; &amp;#179; ³     Alt + 0179 superscript three &lt;br /&gt;&amp;acute; &amp;#180; ´   option - shift - e Alt + 0180 acute accent &lt;br /&gt;&amp;micro; &amp;#181; µ   option - m Alt + 0181 micro sign &lt;br /&gt;&amp;para; &amp;#182; ¶   option - 7 Alt + 0182 paragraph sign &lt;br /&gt;&amp;middot; &amp;#183; ·   option - shift - 9 Alt + 0183 middle dot &lt;br /&gt;&amp;cedil; &amp;#184; ¸   option - shift - z Alt + 0184 cedilla &lt;br /&gt;&amp;sup1; &amp;#185; ¹     Alt + 0185 superscript one &lt;br /&gt;&amp;ordm; &amp;#186; º   option - 0 Alt + 0186 masculine ordinal &lt;br /&gt;&amp;raquo; &amp;#187; »   option - shift - \ Alt + 0187 right angle quote &lt;br /&gt;&amp;frac14; &amp;#188; ¼     Alt + 0188 one-fourth &lt;br /&gt;&amp;frac12; &amp;#189; ½     Alt + 0189 one-half &lt;br /&gt;&amp;frac34; &amp;#190; ¾     Alt + 0190 three-fourths &lt;br /&gt;&amp;iquest; &amp;#191; ¿   option - shift - ? Alt + 0191 inverted question mark &lt;br /&gt;&amp;Agrave; &amp;#192; À   option - ` A Alt + 0192 uppercase A, grave accent &lt;br /&gt;&amp;Aacute; &amp;#193; Á   option - e A Alt + 0193 uppercase A, acute accent &lt;br /&gt;&amp;Acirc; &amp;#194; Â   option - i A Alt + 0194 uppercase A, circumflex accent &lt;br /&gt;&amp;Atilde; &amp;#195; Ã   option - n A Alt + 0195 uppercase A, tilde &lt;br /&gt;&amp;Auml; &amp;#196; Ä   option - u A Alt + 0196 uppercase A, umlaut &lt;br /&gt;&amp;Aring; &amp;#197; Å   option - shift - a Alt + 0197 uppercase A, ring &lt;br /&gt;&amp;AElig; &amp;#198; Æ   option - shift - ' Alt + 0198 uppercase AE &lt;br /&gt;&amp;Ccedil; &amp;#199; Ç   option - shift - c Alt + 0199 uppercase C, cedilla &lt;br /&gt;&amp;Egrave; &amp;#200; È   option - ` E Alt + 0200 uppercase E, grave accent &lt;br /&gt;&amp;Eacute; &amp;#201; É   option - e E Alt + 0201 uppercase E, acute accent &lt;br /&gt;&amp;Ecirc; &amp;#202; Ê   option - i E Alt + 0202 uppercase E, circumflex accent &lt;br /&gt;&amp;Euml; &amp;#203; Ë   option - u E Alt + 0203 uppercase E, umlaut &lt;br /&gt;&amp;Igrave; &amp;#204; Ì   option - ` I Alt + 0204 uppercase I, grave accent &lt;br /&gt;&amp;Iacute; &amp;#205; Í   option - e I Alt + 0205 uppercase I, acute accent &lt;br /&gt;&amp;Icirc; &amp;#206; Î   option - i I Alt + 0206 uppercase I, circumflex accent &lt;br /&gt;&amp;Iuml; &amp;#207; Ï   option - u I Alt + 0207 uppercase I, umlaut &lt;br /&gt;&amp;ETH; &amp;#208; Ð     Alt + 0208 uppercase Eth, Icelandic &lt;br /&gt;&amp;Ntilde; &amp;#209; Ñ   option - n N Alt + 0209 uppercase N, tilde &lt;br /&gt;&amp;Ograve; &amp;#210; Ò   option - ` O Alt + 0210 uppercase O, grave accent &lt;br /&gt;&amp;Oacute; &amp;#211; Ó   option - e O Alt + 0211 uppercase O, acute accent &lt;br /&gt;&amp;Ocirc; &amp;#212; Ô   option - i O Alt + 0212 uppercase O, circumflex accent &lt;br /&gt;&amp;Otilde; &amp;#213; Õ   option - n O Alt + 0213 uppercase O, tilde &lt;br /&gt;&amp;Ouml; &amp;#214; Ö   option - u O Alt + 0214 uppercase O, umlaut &lt;br /&gt;&amp;times; &amp;#215; ×     Alt + 0215 multiplication sign &lt;br /&gt;&amp;Oslash; &amp;#216; Ø   option - shift - o Alt + 0216 uppercase O, slash &lt;br /&gt;&amp;Ugrave; &amp;#217; Ù   option - ` U Alt + 0217 uppercase U, grave accent &lt;br /&gt;&amp;Uacute; &amp;#218; Ú   option - e U Alt + 0218 uppercase U, acute accent &lt;br /&gt;&amp;Ucirc; &amp;#219; Û   option - i U Alt + 0219 uppercase U, circumflex accent &lt;br /&gt;&amp;Uuml; &amp;#220; Ü   option - u U Alt + 0220 uppercase U, umlaut &lt;br /&gt;&amp;Yacute; &amp;#221; Ý     Alt + 0221 uppercase Y, acute accent &lt;br /&gt;&amp;THORN; &amp;#222; Þ     Alt + 0222 uppercase THORN, Icelandic &lt;br /&gt;&amp;szlig; &amp;#223; ß   option - s Alt + 0223 lowercase sharps, German &lt;br /&gt;&amp;agrave; &amp;#224; à   option - ` a Alt + 0224 lowercase a, grave accent &lt;br /&gt;&amp;aacute; &amp;#225; á   option - e a Alt + 0225 lowercase a, acute accent &lt;br /&gt;&amp;acirc; &amp;#226; â   option - i a Alt + 0226 lowercase a, circumflex accent &lt;br /&gt;&amp;atilde; &amp;#227; ã   option - n a Alt + 0227 lowercase a, tilde &lt;br /&gt;&amp;auml; &amp;#228; ä   option - u a Alt + 0228 lowercase a, umlaut &lt;br /&gt;&amp;aring; &amp;#229; å   option - a Alt + 0229 lowercase a, ring &lt;br /&gt;&amp;aelig; &amp;#230; æ   option - ' Alt + 0230 lowercase ae &lt;br /&gt;&amp;ccedil; &amp;#231; ç   option - c Alt + 0231 lowercase c, cedilla &lt;br /&gt;&amp;egrave; &amp;#232; è   option - ` e Alt + 0232 lowercase e, grave accent &lt;br /&gt;&amp;eacute; &amp;#233; é   option - e e Alt + 0233 lowercase e, acute accent &lt;br /&gt;&amp;ecirc; &amp;#234; ê   option - i e Alt + 0234 lowercase e, circumflex accent &lt;br /&gt;&amp;euml; &amp;#235; ë   option - u e Alt + 0235 lowercase e, umlaut &lt;br /&gt;&amp;igrave; &amp;#236; ì   option - ` i Alt + 0236 lowercase i, grave accent &lt;br /&gt;&amp;iacute; &amp;#237; í   option - e i Alt + 0237 lowercase i, acute accent &lt;br /&gt;&amp;icirc; &amp;#238; î   option - i i Alt + 0238 lowercase i, circumflex accent &lt;br /&gt;&amp;iuml; &amp;#239; ï   option - u i Alt + 0239 lowercase i, umlaut &lt;br /&gt;&amp;eth; &amp;#240; ð     Alt + 0240 lowercase eth, Icelandic &lt;br /&gt;&amp;ntilde; &amp;#241; ñ   option - n n Alt + 0241 lowercase n, tilde &lt;br /&gt;&amp;ograve; &amp;#242; ò   option - ` o Alt + 0242 lowercase o, grave accent &lt;br /&gt;&amp;oacute; &amp;#243; ó   option - e o Alt + 0243 lowercase o, acute accent &lt;br /&gt;&amp;ocirc; &amp;#244; ô   option - i o Alt + 0244 lowercase o, circumflex accent &lt;br /&gt;&amp;otilde; &amp;#245; õ   option - n o Alt + 0245 lowercase o, tilde &lt;br /&gt;&amp;ouml; &amp;#246; ö   option - u o Alt + 0246 lowercase o, umlaut &lt;br /&gt;&amp;divide; &amp;#247; ÷     Alt + 0247 division sign &lt;br /&gt;&amp;oslash; &amp;#248; ø   option - o Alt + 0248 lowercase o, slash &lt;br /&gt;&amp;ugrave; &amp;#249; ù   option - ` u Alt + 0249 lowercase u, grave accent &lt;br /&gt;&amp;uacute; &amp;#250; ú   option - e u Alt + 0250 lowercase u, acute accent &lt;br /&gt;&amp;ucirc; &amp;#251; û   option - i u Alt + 0251 lowercase u, circumflex accent &lt;br /&gt;&amp;uuml; &amp;#252; ü   option - u u Alt + 0252 lowercase u, umlaut &lt;br /&gt;&amp;yacute; &amp;#253; ý     Alt + 0253 lowercase y, acute accent &lt;br /&gt;&amp;thorn; &amp;#254; þ     Alt + 0254 lowercase thorn, Icelandic &lt;br /&gt;&amp;yuml; &amp;#255; ÿ   option - u y Alt + 0255 lowercase y, umlaut &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;reference : &lt;br /&gt;&lt;a href="http://home.earthlink.net/~awinkelried/keyboard_shortcuts.html"&gt;http://home.earthlink.net/~awinkelried/keyboard_shortcuts.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-7278926771283011261?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/7278926771283011261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=7278926771283011261&amp;isPopup=true' title='28 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/7278926771283011261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/7278926771283011261'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/09/shortcut-keys-of-special-characters-in.html' title='Shortcut keys of special characters in Html and key board'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>28</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-5939239711077595351</id><published>2009-09-06T02:18:00.000-07:00</published><updated>2009-09-08T01:19:43.302-07:00</updated><title type='text'>Articles on WCF</title><content type='html'>Great Tutorials on WCF -&lt;br /&gt;&lt;br /&gt;&lt;a href="http://aspalliance.com/articles/learnwcf.aspx"&gt;http://aspalliance.com/articles/learnwcf.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and &lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/hi-in/magazine/cc163647(en-us).aspx"&gt;http://msdn.microsoft.com/hi-in/magazine/cc163647(en-us).aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you share the same zeal,come, Join the leader&lt;br /&gt;&lt;br /&gt;walk in with a hard copy of your resume along with a passport size photograph on"&lt;br /&gt;&lt;br /&gt;12th september 2009( saturday ) or 13th september 2009 ( sunday)&lt;br /&gt;&lt;br /&gt;Timing : 1.00pm to 3.00pm&lt;br /&gt;&lt;br /&gt;Skill Requirement:&lt;br /&gt;&lt;br /&gt;ïƒ¼MS technologies: VB 6.0, VB.NET, VBA/MS Access&lt;br /&gt;ïƒ¼Java Technologies: J2EE, Core Java, JMS&lt;br /&gt;ïƒ¼PHP- Frontend development with PHP scripting&lt;br /&gt;ïƒ¼C++ - Knowledge on corresponding language features,&lt;br /&gt;ïƒ¼STL, Pointers&lt;br /&gt;ïƒ¼Scripting: UNIX shell scripting, Perl scripting&lt;br /&gt;ïƒ¼Oracle: oracle Database Concepts, PL/SQL,&lt;br /&gt;ïƒ¼Performance tuning preferably in UNIX environment&lt;br /&gt;ïƒ¼Sybase- Sybase Database Concepts, Queries,&lt;br /&gt;Performance Tuning&lt;br /&gt;ïƒ¼SQL Server- SQL database concepts, SQL queries DTS&lt;br /&gt;ïƒ¼Datawarehouse / Bi Technologies â€“Data stage / MSBI / Cognos /&lt;br /&gt;SAS / Hyperion / Crystal Reports&lt;br /&gt;&lt;br /&gt;Walk in Venue :&lt;br /&gt;HCL Technologies Limited&lt;br /&gt;Special Economic Zone, L &amp; T Phoenix Info Park Pvt. Ltd.&lt;br /&gt;Building: H-08: Level â€“ 2 &amp; 3 HITEC CITY 2 â€“ Survey No. 30, 34, 35, &amp; 38&lt;br /&gt;(Behind DELL), Hyderabad-500081. Tel: 040 6698 1000&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-5939239711077595351?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/5939239711077595351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=5939239711077595351&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/5939239711077595351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/5939239711077595351'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/09/articles-on-wcf.html' title='Articles on WCF'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-4064957286446105776</id><published>2009-09-05T02:36:00.000-07:00</published><updated>2009-09-05T02:38:00.235-07:00</updated><title type='text'>IIS</title><content type='html'>&lt;href&gt;http://aspnet.4guysfromrolla.com/articles/011404-1.aspx&lt;/href&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-4064957286446105776?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/4064957286446105776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=4064957286446105776&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4064957286446105776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4064957286446105776'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/09/iis.html' title='IIS'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-8088423188304488100</id><published>2009-08-31T22:27:00.000-07:00</published><updated>2009-08-31T22:32:27.406-07:00</updated><title type='text'>Installing procedure and system requirements for moss 2007</title><content type='html'>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;br /&gt;&lt;head runat="server"&gt;&lt;br /&gt;    &lt;title&gt;&lt;/title&gt;&lt;br /&gt;    &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.Normal&lt;br /&gt;{&lt;br /&gt;font-family: Verdana, Tahoma, Helvetica, Arial;&lt;br /&gt;}&lt;br /&gt;.Normal, .NormalDisabled&lt;br /&gt;{&lt;br /&gt;	font-family: Tahoma, Arial, Helvetica;&lt;br /&gt;	font-size: 11px;&lt;br /&gt;	font-weight: normal;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;table, tr, td, p {font-family: Verdana; font-size: 11px; line-height: 1.4em; margin: 0;}&lt;br /&gt;&lt;br /&gt;.Head   {&lt;br /&gt;font-family: Verdana, Tahoma, Helvetica, Arial;&lt;br /&gt; color: #003366;&lt;br /&gt;}&lt;br /&gt;.Head&lt;br /&gt;{&lt;br /&gt;	font-family: Tahoma, Arial, Helvetica;&lt;br /&gt;	font-size: 20px;&lt;br /&gt;	font-weight: normal;&lt;br /&gt;	color: #333333;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.SubHead    {&lt;br /&gt;color: #003366;&lt;br /&gt;}&lt;br /&gt;.SubHead&lt;br /&gt;{&lt;br /&gt;	font-family: Tahoma, Arial, Helvetica;&lt;br /&gt;	font-size: 11px;&lt;br /&gt;	font-weight: bold;&lt;br /&gt;	color: #003366;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;UL LI&lt;br /&gt;{&lt;br /&gt;	list-style-type: square;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;OL LI&lt;br /&gt;{&lt;br /&gt;	list-style-type: decimal;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;BLOCKQUOTE, PRE&lt;br /&gt;{&lt;br /&gt;	font-family: Lucida Console, monospace;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;UL LI LI&lt;br /&gt;{&lt;br /&gt;	list-style-type: disc;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;    &lt;/style&gt;&lt;br /&gt;&lt;/head&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;    &lt;form id="form1" runat="server"&gt;&lt;br /&gt;        &lt;div id="dnn_ctr644_HtmlModule_lblContent" class="Normal"&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;strong&gt;&lt;i&gt;&lt;span class="head"&gt;Deployment for 2007 Microsoft Office &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;                &lt;/strong&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;strong&gt;&lt;i&gt;&lt;span class="head"&gt;&lt;/span&gt;&lt;/i&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;strong&gt;&lt;i&gt;&lt;span class="head"&gt;SharePoint Server&lt;/span&gt;&lt;/i&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;strong&gt;&lt;i&gt;&lt;span class="head"&gt;&lt;/span&gt;&lt;/i&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                A server farm typically consists of one or two back-end database servers and one &lt;br /&gt;                or more front-end servers that provide Web services and Office SharePoint Server &lt;br /&gt;                2007 services, such as search, Excel Services, and indexing.&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Hardware and software requirements &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                Before you install and configure Office SharePoint Server 2007, make sure your &lt;br /&gt;                servers have the recommended hardware and software. To deploy a server farm, you &lt;br /&gt;                need at least one server computer acting as a Web server and an application &lt;br /&gt;                server, and one server computer acting as a database server. The server &lt;br /&gt;                computers must meet the following requirements:&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Hardware requirements &lt;/span&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;                &lt;li&gt;Front-end Web server and application server computers: a dual-processor computer &lt;br /&gt;                    with processor clock speeds of 2.5-gigahertz (GHz) or higher and a minimum of 2 &lt;br /&gt;                    gigabytes (GB) of RAM. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Back-end database server: a dual-processor computer with processor clock speeds &lt;br /&gt;                    of 2.0 GHz or higher and a minimum of 2 GB of RAM. &lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Software requirements Web and Application Server &lt;/span&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;                &lt;li&gt;Microsoft Windows Server 2003 (Standard, Enterprise, Datacenter, or Web Edition) &lt;br /&gt;                    with Service Pack 1 (SP1) &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Microsoft .Net Framework 2.0 &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Microsoft .Net Framework 3.0 &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;The Web server and application server computers must be configured as Web &lt;br /&gt;                    servers running Microsoft Internet Information Services (IIS) in IIS 6.0 worker &lt;br /&gt;                    process isolation mode. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Each of the computers must be using the NTFS file system. Windows Server 2003 &lt;br /&gt;                    includes a conversion utility (Convert.exe) that you can use to convert an &lt;br /&gt;                    existing file allocation table (FAT) volume to NTFS without losing data.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;strong&gt;&lt;span class="subhead"&gt;Back-End Database Server&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;                &lt;li&gt;The back-end database server computer must be running Microsoft SQL Server 2005 &lt;br /&gt;                    or Microsoft SQL Server 2000 with Service Pack 3 (SP3) or later. It is assumed &lt;br /&gt;                    that you have installed and configured the database program on the back-end &lt;br /&gt;                    server computer. You do not need to set up or create specific databases for &lt;br /&gt;                    Office SharePoint Server 2007. The Office SharePoint Server 2007 Setup program &lt;br /&gt;                    will create the necessary databases when you install and configure Office &lt;br /&gt;                    SharePoint Server 2007. &lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                In addition to these requirements, if you are using SQL Server 2005, you need to &lt;br /&gt;                configure surface area settings. Use the following procedure to do this.&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Configure surface area settings in SQL Server 2005 &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Start&lt;/strong&gt;, point to &lt;strong&gt;All Programs&lt;/strong&gt;, point to&lt;br /&gt;                    &lt;strong&gt;Microsoft SQL Server 2005&lt;/strong&gt;, point to &lt;strong&gt;Configuration Tools&lt;/strong&gt;, &lt;br /&gt;                    and then click &lt;strong&gt;SQL Server Surface Area Configuration&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;SQL Server Surface Area Configuration&lt;/strong&gt; dialog box, click&lt;br /&gt;                    &lt;strong&gt;Surface Area Configuration for Services and Connections&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the tree, open your instance of SQL Server, open &lt;strong&gt;Database Engine&lt;/strong&gt;, &lt;br /&gt;                    and then click &lt;strong&gt;Remote Connections&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Local and Remote Connections&lt;/strong&gt;, click &lt;strong&gt;Using both &lt;br /&gt;                    TCP/IP and named pipes&lt;/strong&gt;, and then click &lt;strong&gt;OK&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Security account requirements &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                To install Office SharePoint Server 2007 in a server farm environment, at-least &lt;br /&gt;                2 accounts are required:&lt;/p&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;                &lt;li&gt;A user account that you can use to install Office SharePoint Server 2007 and run &lt;br /&gt;                    the SharePoint Products and Technologies Configuration Wizard. This account must &lt;br /&gt;                    be: &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;A domain user account. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;A member of the Administrators group on each of your front-end servers. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;A member of the SQL Server Logins, which grants login access to your SQL Server &lt;br /&gt;                    instance. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;A member of the SQL Server Database Creator server role, which grants permission &lt;br /&gt;                    to create and alter databases. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;A member of the SQL Server Security Administrators server role, which grants &lt;br /&gt;                    permission to manage server logins. &lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;img alt="Sharepointe%202007%20Install" border="0" &lt;br /&gt;                        src="http://www.datasprings.com/Portals/0/MOSS_2007_Deployment_files/image002.jpg" /&gt;&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;                &lt;li&gt;A unique domain user account that you can specify as the Office SharePoint &lt;br /&gt;                    Server 2007 service account. This user account is used to access your SharePoint &lt;br /&gt;                    configuration database. It also acts as the application pool identity for the &lt;br /&gt;                    SharePoint Central Administration application pool and it is the account under &lt;br /&gt;                    which the Windows SharePoint Services Timer service runs. The SharePoint &lt;br /&gt;                    Products and Technologies Configuration Wizard adds this account to the SQL &lt;br /&gt;                    Server Logins, the SQL Server Database Creator server role, and the SQL Server &lt;br /&gt;                    Security Administrators server role. It is recommended that you follow the &lt;br /&gt;                    principle of least privilege and do not make this user account a member of any &lt;br /&gt;                    particular security group on your front-end servers or your back-end servers.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Configure the server as a Web server &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                Before you install and configure Office SharePoint Server 2007, you must install &lt;br /&gt;                and configure the required software on each of your front-end servers. This &lt;br /&gt;                includes installing and configuring IIS so your front-end servers act as Web &lt;br /&gt;                servers, installing Windows .NET Framework 2.0, enabling ASP.NET 2.0, and &lt;br /&gt;                installing Windows Workflow Foundation Runtime Components Beta 2.2 (build &lt;br /&gt;                3807.7).&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                Install and configure IIS&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                IIS is not installed or enabled by default in Windows Server 2003. To make your &lt;br /&gt;                server a Web server, you must install and enable IIS, and you must make sure &lt;br /&gt;                that IIS is running in IIS 6.0 worker process isolation mode.&lt;/p&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Start&lt;/strong&gt;, point to &lt;strong&gt;All Programs&lt;/strong&gt;, point to&lt;br /&gt;                    &lt;strong&gt;Administrative Tools&lt;/strong&gt;, and then click &lt;strong&gt;Configure Your &lt;br /&gt;                    Server Wizard&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Welcome to the Configure Your Server Wizard page, click &lt;strong&gt;Next&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Preliminary Steps page, click &lt;strong&gt;Next&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Server Role page, click &lt;strong&gt;Application server (IIS, ASP.NET)&lt;/strong&gt;, &lt;br /&gt;                    and then click &lt;strong&gt;Next&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Application Server Options page, click &lt;strong&gt;Next&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Summary of Selections page, click &lt;strong&gt;Next&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Finish&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Start&lt;/strong&gt;, point to &lt;strong&gt;All Programs&lt;/strong&gt;, point to&lt;br /&gt;                    &lt;strong&gt;Administrative Tools&lt;/strong&gt;, and then click &lt;strong&gt;Internet &lt;br /&gt;                    Information Services (IIS) Manager&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the IIS Manager tree, click the plus sign ( ) next to the server name, and &lt;br /&gt;                    then right-click the &lt;strong&gt;Web Sites&lt;/strong&gt; folder and select &lt;strong&gt;&lt;br /&gt;                    Properties&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Web Sites Properties&lt;/strong&gt; dialog box, click the &lt;strong&gt;&lt;br /&gt;                    Service&lt;/strong&gt; tab. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Isolation mode&lt;/strong&gt; section, clear the &lt;strong&gt;Run WWW &lt;br /&gt;                    service in IIS 5.0 isolation mode&lt;/strong&gt; check box, and then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;strong&gt;Note: &lt;/strong&gt;The &lt;strong&gt;Run WWW in IIS 5.0 isolation mode&lt;/strong&gt; &lt;br /&gt;                check box is only selected if you have upgraded to IIS 6.0 on Windows Server &lt;br /&gt;                2003 from IIS 5.0 on Microsoft Windows 2000. New installations of IIS 6.0 use &lt;br /&gt;                IIS 6.0 worker process isolation mode by default.&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Install Windows .NET Framework 2.0 &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;Run .Net Framework 2.0 Setup &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Enable ASP.NET 2.0 &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Start&lt;/strong&gt;, point to &lt;strong&gt;All Programs&lt;/strong&gt;, point to&lt;br /&gt;                    &lt;strong&gt;Administrative Tools&lt;/strong&gt;, and then click &lt;strong&gt;Internet &lt;br /&gt;                    Information Services (IIS) Manager&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the IIS Manager tree, click the plus sign ( ) next to the server name, and &lt;br /&gt;                    then click the &lt;strong&gt;Web Service Extensions&lt;/strong&gt; folder. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the details pane, click &lt;strong&gt;ASP.NET v2.0.50727&lt;/strong&gt;, and then click&lt;br /&gt;                    &lt;strong&gt;Allow&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Install .Net Framework 3.0 &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                1. Run .Net Framework 3.0 Setup&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Install Microsoft Windows Workflow Foundation Runtime.&lt;br /&gt;            &lt;a name="5"&gt;&lt;/a&gt;Install and configure 2007 Office SharePoint Server &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                It is recommended that you install and configure Office SharePoint Server 2007 &lt;br /&gt;                on all of your front-end servers before you configure Office SharePoint Server &lt;br /&gt;                2007 services and create sites. If you want to build a minimal server farm &lt;br /&gt;                configuration, and incrementally add front-end servers to expand the farm, you &lt;br /&gt;                can install and configure Office SharePoint Server 2007 on a single front-end &lt;br /&gt;                server and configure the front-end server as both a Web server and an &lt;br /&gt;                application server. Regardless how many front-end servers you have in your &lt;br /&gt;                server farm, you must have SQL Server running on at least one back-end database &lt;br /&gt;                server before you install Office SharePoint Server 2007 on your front-end &lt;br /&gt;                servers.&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                Run 2007 Office SharePoint Server Setup&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;ol&gt;&lt;br /&gt;                &lt;li&gt;Run Officeserver.exe, on one of your Web server computers. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Enter your Product Key page, enter your product key and click &lt;strong&gt;&lt;br /&gt;                    Continue&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;img alt="Sharepointe%202007%20Install" border="0" &lt;br /&gt;                        src="http://www.datasprings.com/Portals/0/MOSS_2007_Deployment_files/image004.jpg" /&gt;&lt;br /&gt;                &lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;ol&gt;&lt;br /&gt;                &lt;li&gt;On the Read the Microsoft Software License Terms page, review the terms, select &lt;br /&gt;                    the &lt;strong&gt;I accept the terms of this agreement&lt;/strong&gt; check box, and then &lt;br /&gt;                    click &lt;strong&gt;Continue&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;img alt="Sharepointe%202007%20Install" border="0" &lt;br /&gt;                        src="http://www.datasprings.com/Portals/0/MOSS_2007_Deployment_files/image005.jpg" /&gt;&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;ol start="4" type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the Choose the installation you want page, click &lt;strong&gt;Advanced&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;img alt="Sharepointe%202007%20Install" border="0" &lt;br /&gt;                        src="http://www.datasprings.com/Portals/0/MOSS_2007_Deployment_files/image008.jpg" /&gt;&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;ol start="5" type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the &lt;strong&gt;Server Type&lt;/strong&gt; tab, do one of the following:&lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    If you are setting up a computer that will act as an application server, or a &lt;br /&gt;                    Web server and an application server, click &lt;strong&gt;Complete&lt;/strong&gt;, and then &lt;br /&gt;                    click &lt;strong&gt;Install Now&lt;/strong&gt;.&lt;br /&gt;                &lt;/p&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &amp;nbsp;&lt;/p&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    If you are setting up a computer that will act as a Web server only, click&lt;br /&gt;                    &lt;strong&gt;Web Front End&lt;/strong&gt;, and then click &lt;strong&gt;Install Now&lt;/strong&gt;.&lt;br /&gt;                &lt;/p&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;img alt="Sharepointe%202007%20Install" border="0" &lt;br /&gt;                        src="http://www.datasprings.com/Portals/0/MOSS_2007_Deployment_files/image009.jpg" /&gt;&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;ol start="6" type="1"&gt;&lt;br /&gt;                &lt;li&gt;When Setup finishes, a dialog box appears telling you that you must complete the &lt;br /&gt;                    configuration of your server. Make sure that the &lt;strong&gt;Run the SharePoint &lt;br /&gt;                    Products and Technologies Configuration Wizard now&lt;/strong&gt; check box is &lt;br /&gt;                    selected. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Close&lt;/strong&gt; to start the configuration wizard. Instructions for &lt;br /&gt;                    completing the wizard are provided in the next set of steps. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Run the SharePoint Products and Technologies Configuration &lt;br /&gt;            Wizard &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                After Setup finishes, you can use the SharePoint Products and Technologies &lt;br /&gt;                Configuration Wizard to configure Office SharePoint Server 2007. The SharePoint &lt;br /&gt;                Products and Technologies Configuration Wizard automates several configuration &lt;br /&gt;                tasks, including: installing and configuring the configuration database, &lt;br /&gt;                installing Office SharePoint Server 2007 services, and installing SharePoint &lt;br /&gt;                Central Administration. Use the following instructions to run the SharePoint &lt;br /&gt;                Products and Technologies Configuration Wizard.&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the Welcome to SharePoint Products and Technologies page, click &lt;strong&gt;Next&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;img alt="Sharepointe%202007%20Install" border="0" &lt;br /&gt;                        src="http://www.datasprings.com/Portals/0/MOSS_2007_Deployment_files/image012.jpg" /&gt;&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;ol start="2" type="1"&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Yes&lt;/strong&gt; in the warning dialog box that appears notifying you &lt;br /&gt;                    that some services might need to be restarted during configuration. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Connect to a server farm page, do one of the following: &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    If this is the first front-end server that you are configuring in your server &lt;br /&gt;                    farm, click &lt;strong&gt;No, I want to create a new server farm&lt;/strong&gt;, and then &lt;br /&gt;                    click &lt;strong&gt;Next&lt;/strong&gt;.&lt;br /&gt;                &lt;/p&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &amp;nbsp;&lt;/p&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    If you have already configured your first server in your server farm, click&lt;br /&gt;                    &lt;strong&gt;Yes, I want to connect to an existing server farm&lt;/strong&gt;, and then &lt;br /&gt;                    click &lt;strong&gt;Next&lt;/strong&gt;.&lt;br /&gt;                &lt;/p&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &amp;nbsp;&lt;/p&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;img alt="Sharepointe%202007%20Install" border="0" &lt;br /&gt;                        src="http://www.datasprings.com/Portals/0/MOSS_2007_Deployment_files/image014.jpg" /&gt;&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;ol start="4" type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the &lt;strong&gt;Specify Configuration Database Settings&lt;/strong&gt; dialog box, in&lt;br /&gt;                    &lt;strong&gt;Database server&lt;/strong&gt;, type the name of the computer that is running &lt;br /&gt;                    SQL Server. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Do one of the following: &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    If this is the first server that you are configuring in your server farm, type a &lt;br /&gt;                    name for your configuration database in &lt;strong&gt;Database name&lt;/strong&gt;, or use &lt;br /&gt;                    the default database name.&lt;br /&gt;                &lt;/p&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &amp;nbsp;&lt;/p&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    If you have already configured the first server in your server farm, click&lt;br /&gt;                    &lt;strong&gt;Retrieve Database Names&lt;/strong&gt;, and in &lt;strong&gt;Database name&lt;/strong&gt; &lt;br /&gt;                    click the database name that you created when you configured the first server in &lt;br /&gt;                    your server farm. The default name is SharePoint_Config.&lt;br /&gt;                &lt;/p&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &amp;nbsp;&lt;/p&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;img alt="Sharepointe%202007%20Install" border="0" &lt;br /&gt;                        src="http://www.datasprings.com/Portals/0/MOSS_2007_Deployment_files/image016.jpg" /&gt;&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;ol start="6" type="1"&gt;&lt;br /&gt;                &lt;li&gt;In &lt;strong&gt;User name&lt;/strong&gt; , type the user name of the account used to &lt;br /&gt;                    connect to the computer running SQL Server (be sure to type the user name in the &lt;br /&gt;                    format DOMAIN\username). &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;strong&gt;Important: &lt;/strong&gt;This account is the Office SharePoint Server 2007 &lt;br /&gt;                    service account under which several Office SharePoint Server 2007 services run. &lt;br /&gt;                    The user account that you specify as the Office SharePoint Server 2007 service &lt;br /&gt;                    account must be a domain user account, but it does not need to be a member of &lt;br /&gt;                    any specific security group on your front-end servers or your back-end database &lt;br /&gt;                    servers. However, the user account that you specify must be a member of the &lt;br /&gt;                    following two SQL Server security roles on your back-end database servers: &lt;br /&gt;                    Database Creator and Security Administrator. It is recommended that you follow &lt;br /&gt;                    the principle of least privilege and specify a user account that is not a member &lt;br /&gt;                    of the Administrators group as your Office SharePoint Server 2007 service &lt;br /&gt;                    account.&lt;br /&gt;                &lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;ol start="7" type="1"&gt;&lt;br /&gt;                &lt;li&gt;In &lt;strong&gt;Password&lt;/strong&gt;, type the user&amp;#39;s password, and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Skip the next step if you have already configured first server in your server &lt;br /&gt;                    farm. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Configure SharePoint Central Administration Web Application page, select &lt;br /&gt;                    the &lt;strong&gt;Specify port number&lt;/strong&gt; check box and type a port number if you &lt;br /&gt;                    want the SharePoint Central Administration Web application to use a specific &lt;br /&gt;                    port, or leave the &lt;strong&gt;Specify port number&lt;/strong&gt; check box unchecked if &lt;br /&gt;                    you do not care which port number the SharePoint Central Administration Web &lt;br /&gt;                    application uses.&lt;br /&gt;                    &lt;img alt="Sharepointe%202007%20Install" border="0" &lt;br /&gt;                        src="http://www.datasprings.com/Portals/0/MOSS_2007_Deployment_files/image018.jpg" /&gt;&lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;ol start="10" type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the &lt;strong&gt;Configure SharePoint Central Administration Web Application&lt;/strong&gt; &lt;br /&gt;                    dialog box, select NTLM authentication (the default), click &lt;strong&gt;Next&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Completing the SharePoint Products and Technologies Wizard page, click&lt;br /&gt;                    &lt;strong&gt;Next&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Configuration Successful page, click &lt;strong&gt;Finish&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;span class="subhead"&gt;The SharePoint Central Administration Web page opens.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;span class="subhead"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;strong&gt;Notes&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;                &lt;li&gt;If you are prompted for your user name and password, you might need to add the &lt;br /&gt;                    SharePoint Central Administration site to the list of trusted sites and &lt;br /&gt;                    configure user authentication settings in Internet Explorer. Instructions for &lt;br /&gt;                    configuring these settings are provided in the next set of steps. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;If you see a proxy server error message, you might need to configure your proxy &lt;br /&gt;                    server settings so that local addresses bypass the proxy server. Instructions &lt;br /&gt;                    for configuring this setting are provided later in this section. &lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Add the SharePoint Central Administration site to the list &lt;br /&gt;            of trusted sites &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;In Internet Explorer, on the &lt;strong&gt;Tools&lt;/strong&gt; menu, click &lt;strong&gt;Internet &lt;br /&gt;                    Options&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the &lt;strong&gt;Security&lt;/strong&gt; tab, in the &lt;strong&gt;Select a Web content zone &lt;br /&gt;                    to specify its security settings&lt;/strong&gt; box, click&lt;strong&gt; Trusted Sites&lt;/strong&gt;, &lt;br /&gt;                    and then click &lt;strong&gt;Sites&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Clear the &lt;strong&gt;Require server verification (https:) for all sites in this &lt;br /&gt;                    zone&lt;/strong&gt; check box. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Add this Web site to the zone&lt;/strong&gt; box, type the URL for the &lt;br /&gt;                    SharePoint Central Administration site, and then click &lt;strong&gt;Add&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Select the &lt;strong&gt;Require server verification (https:) for all sites in this &lt;br /&gt;                    zone&lt;/strong&gt; check box. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Close&lt;/strong&gt; to close the &lt;strong&gt;Trusted Sites&lt;/strong&gt; dialog &lt;br /&gt;                    box. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; to close the &lt;strong&gt;Internet Options&lt;/strong&gt; dialog &lt;br /&gt;                    box. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Configure user authentication settings for trusted sites&lt;br /&gt;            &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;In Internet Explorer, on the &lt;strong&gt;Tools&lt;/strong&gt; menu, click &lt;strong&gt;Internet &lt;br /&gt;                    Options&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the &lt;strong&gt;Security&lt;/strong&gt; tab, in the &lt;strong&gt;Select a Web content zone &lt;br /&gt;                    to specify its security settings&lt;/strong&gt; box, click &lt;strong&gt;Trusted sites&lt;/strong&gt;, &lt;br /&gt;                    and then click &lt;strong&gt;Custom Level&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Settings&lt;/strong&gt; list box, under &lt;strong&gt;User Authentication&lt;/strong&gt;, &lt;br /&gt;                    click &lt;strong&gt;Automatic logon with current username and password&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; twice. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;strong&gt;Note: &lt;/strong&gt;If you do not want to add the SharePoint Central &lt;br /&gt;                Administration site to the list of trusted sites, but you do not want to be &lt;br /&gt;                prompted for your user name and password every time you access the SharePoint &lt;br /&gt;                Central Administration site, you can instead add the SharePoint Central &lt;br /&gt;                Administration site to the Local intranet zone. If you do this, you must enable &lt;br /&gt;                the Automatic logon only in Intranet zone user authentication setting instead of &lt;br /&gt;                the Automatic logon with current username and password user authentication &lt;br /&gt;                setting&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;a name="6"&gt;&lt;/a&gt;&lt;span class="subhead"&gt;Configure 2007 Office SharePoint Server &lt;br /&gt;            services &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                After you have installed and configured Office SharePoint Server 2007 on all of &lt;br /&gt;                your front-end servers, you must configure Office SharePoint Server 2007 &lt;br /&gt;                services. The services you need to configure depends on your server topology and &lt;br /&gt;                the server roles you deploy. Use the following guidelines to determine which &lt;br /&gt;                services you need to configure in your server farm.&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;                &lt;li&gt;&lt;strong&gt;Search and indexing servers&lt;/strong&gt; You must start and configure the &lt;br /&gt;                    Office SharePoint Server Search service on at least one of your front-end &lt;br /&gt;                    servers. This service provides search and indexing services. You can start and &lt;br /&gt;                    configure this service on any type of server, including a server that is acting &lt;br /&gt;                    as an application server and provides only Office SharePoint Server 2007 &lt;br /&gt;                    services, a server that is acting as both an application server and a Web server &lt;br /&gt;                    and provides both Office SharePoint Server 2007 services and Web services, or a &lt;br /&gt;                    server that is acting as a Web server and provides only Web services. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;&lt;strong&gt;Web servers&lt;/strong&gt; The Web server role is implemented by IIS and the &lt;br /&gt;                    Windows SharePoint Services Web Application service. The Windows SharePoint &lt;br /&gt;                    Services Web Application service must be running on any server that acts as a &lt;br /&gt;                    Web server and renders Web content. This service is started by default on &lt;br /&gt;                    servers that you set up using the &lt;strong&gt;Web Front End&lt;/strong&gt; option during &lt;br /&gt;                    Setup. If you set up a server using the &lt;strong&gt;Complete&lt;/strong&gt; option during &lt;br /&gt;                    Setup, and you want that server to act as a Web server and render Web content, &lt;br /&gt;                    then you must start the Windows SharePoint Services Web Application service on &lt;br /&gt;                    that server.&lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;img alt="Sharepointe%202007%20Install" border="0" &lt;br /&gt;                        src="http://www.datasprings.com/Portals/0/MOSS_2007_Deployment_files/image020.jpg" /&gt;&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;br /&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;img alt="Sharepointe%202007%20Install" border="0" &lt;br /&gt;                        src="http://www.datasprings.com/Portals/0/MOSS_2007_Deployment_files/image022.jpg" /&gt;&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                In addition to configuring services on your front-end servers, you must create &lt;br /&gt;                the Shared Services Provider (SSP). The SSP makes it possible to share the &lt;br /&gt;                Office SharePoint Server 2007 services across your server farm. You must create &lt;br /&gt;                the SSP before you can use it in a farm environment; Office SharePoint Server &lt;br /&gt;                2007 does not create the SSP by default in a farm environment.&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                The following procedures step you through the process of configuring Office &lt;br /&gt;                SharePoint Server 2007 services, creating a Web application for the SSP, &lt;br /&gt;                creating the SSP, and configuring indexing settings.&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                Start and configure the Search service&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the SharePoint Central Administration home page, click the &lt;strong&gt;Operations&lt;/strong&gt; &lt;br /&gt;                    tab on the top navigation bar. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Operations page, in &lt;strong&gt;Topology and Services&lt;/strong&gt;, click &lt;strong&gt;&lt;br /&gt;                    Servers in farm&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Servers in Farm page, click the server on which you want to configure the &lt;br /&gt;                    search service. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Start&lt;/strong&gt; next to &lt;strong&gt;Office SharePoint Server Search&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Office SharePoint Server Search Settings page, in the &lt;strong&gt;Query and &lt;br /&gt;                    Indexing&lt;/strong&gt; section, make sure that the &lt;strong&gt;Use this server for &lt;br /&gt;                    indexing content&lt;/strong&gt; and &lt;strong&gt;Use this server for serving search queries&lt;/strong&gt; &lt;br /&gt;                    check boxes are selected. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Default Catalog Location&lt;/strong&gt; section, type a path to a &lt;br /&gt;                    physical folder to store the index files, or use the default location that is &lt;br /&gt;                    specified. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Contact E-Mail Address&lt;/strong&gt; section, specify a valid e-mail &lt;br /&gt;                    address. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the Service Account section, click &lt;strong&gt;Configurable&lt;/strong&gt;, and in&lt;br /&gt;                    &lt;strong&gt;User name&lt;/strong&gt; and &lt;strong&gt;Password&lt;/strong&gt;, type the user name and &lt;br /&gt;                    password for the user account under which you want the Search service to run. &lt;br /&gt;                    The user account must be a member of the Administrators group on the computer &lt;br /&gt;                    that is running the Search service. If you want to use the principle of least &lt;br /&gt;                    privilege and select a unique user account that does not have administrative &lt;br /&gt;                    rights on your front-end servers or on your back-end database servers, see the &lt;br /&gt;                    Known Issues/Readme for Office SharePoint Server 2007 Beta 2. The user name must &lt;br /&gt;                    be in the format DOMAIN\username. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Web Front End And Crawling&lt;/strong&gt; section, do one of the &lt;br /&gt;                    following:&lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;ul dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;ul&gt;&lt;br /&gt;                    &lt;li&gt;If you are configuring the search service on a server that provides Web services &lt;br /&gt;                        and renders Web content, click &lt;strong&gt;No dedicated Web front-end computer for &lt;br /&gt;                        crawling&lt;/strong&gt; &lt;/li&gt;&lt;br /&gt;                    &lt;li&gt;If you are configuring the search service on a server that is a standalone &lt;br /&gt;                        search server that does not provide Web services and render Web content, click&lt;br /&gt;                        &lt;strong&gt;Use a dedicated web front end computer for crawling&lt;/strong&gt;, and then, &lt;br /&gt;                        in &lt;strong&gt;Select a web front end computer&lt;/strong&gt;, click the computer you want &lt;br /&gt;                        to use for crawling. &lt;/li&gt;&lt;br /&gt;                &lt;/ul&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;            &lt;ol start="10" type="1"&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Start&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Start the Windows SharePoint Services Web Application &lt;br /&gt;            service &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                You must start the Windows SharePoint Services Web Application service on every &lt;br /&gt;                computer that you want to act as a Web server and was set up using the &lt;strong&gt;&lt;br /&gt;                Complete&lt;/strong&gt; option during Setup. This service is started by default on &lt;br /&gt;                servers that were set up using the &lt;strong&gt;Web Front End&lt;/strong&gt; option. To &lt;br /&gt;                enhance security, you can leave this service turned off on application servers &lt;br /&gt;                that do not provide Web content to client computers. Also, you do not need to &lt;br /&gt;                turn this service on to use SharePoint Central Administration on a server.&lt;/p&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the SharePoint Central Administration home page, click the &lt;strong&gt;Operations&lt;/strong&gt; &lt;br /&gt;                    tab on the top navigation bar. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Operations page, in &lt;strong&gt;Topology and Services&lt;/strong&gt;, click &lt;strong&gt;&lt;br /&gt;                    Servers in farm&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Servers in Farm page, click the server on which you want to start the &lt;br /&gt;                    Windows SharePoint Services Web Application service. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Start&lt;/strong&gt; next to &lt;strong&gt;Window SharePoint Services Web &lt;br /&gt;                    Application&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Create the Shared Services Provider &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the SharePoint Central Administration home page, click the &lt;strong&gt;&lt;br /&gt;                    Application Management&lt;/strong&gt; tab on the top navigation bar. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Application Management page, in the &lt;strong&gt;Office SharePoint Server &lt;br /&gt;                    Shared Services&lt;/strong&gt; section, click &lt;strong&gt;Create or configure this farm&amp;#39;s &lt;br /&gt;                    shared services&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Manage this Farm&amp;#39;s Shared Services page, click &lt;strong&gt;New SSP&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;strong&gt;Important: &lt;/strong&gt;If you have not created a Web application for the &lt;br /&gt;                    SSP administration site, you need to create one before you create the SSP. If &lt;br /&gt;                    you have already created a Web application for the SSP administration site, skip &lt;br /&gt;                    to step 14.&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;ol start="4" type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the New Shared Services Provider page, click &lt;strong&gt;Create a new Web &lt;br /&gt;                    application&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Create New Web Application page, in the &lt;strong&gt;IIS Web Site&lt;/strong&gt; &lt;br /&gt;                    section, click &lt;strong&gt;Create a new IIS web site&lt;/strong&gt;, and do not modify the &lt;br /&gt;                    default settings in this section. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Security Configuration&lt;/strong&gt; section, under &lt;strong&gt;&lt;br /&gt;                    Authentication provider&lt;/strong&gt;, select the appropriate option for your &lt;br /&gt;                    environment, and do not modify the default settings in the remainder of this &lt;br /&gt;                    section. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Load Balanced URL&lt;/strong&gt; section, do not modify the default &lt;br /&gt;                    settings. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Application Pool&lt;/strong&gt; section, click &lt;strong&gt;Create new &lt;br /&gt;                    application pool&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In &lt;strong&gt;Application pool name&lt;/strong&gt;, enter the name of your application &lt;br /&gt;                    pool or use the default name. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Configurable&lt;/strong&gt;, and in &lt;strong&gt;User name&lt;/strong&gt; and&lt;br /&gt;                    &lt;strong&gt;Password&lt;/strong&gt;, type the user name and password for the user account &lt;br /&gt;                    under which you want the application pool to run. The user account does not have &lt;br /&gt;                    to be a member of any particular security group. It is recommended that you use &lt;br /&gt;                    the principle of least privilege and select a unique user account that does not &lt;br /&gt;                    have administrative rights on your front-end servers or on your back-end &lt;br /&gt;                    database servers. You can use the user account that you specified as the Office &lt;br /&gt;                    SharePoint Server 2007 service account; however, if that user account is a &lt;br /&gt;                    member of a security group that has administrative rights on your front-end &lt;br /&gt;                    servers or your back-end database servers, you will not be following the &lt;br /&gt;                    principle of least privilege. The user name must be in the format &lt;br /&gt;                    DOMAIN\username. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Database Name and Authentication&lt;/strong&gt; section, verify the &lt;br /&gt;                    database information and make sure that &lt;strong&gt;Windows Authentication &lt;br /&gt;                    (recommended)&lt;/strong&gt;is selected. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Search Server&lt;/strong&gt; section, do not modify the default &lt;br /&gt;                    settings. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt;. Upon successful creation of the Web application, the &lt;br /&gt;                    New Shared Services Provider page appears. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;SSP Name&lt;/strong&gt; section, in &lt;strong&gt;Web Application&lt;/strong&gt;, &lt;br /&gt;                    select the Web application that you created for the SSP, and do not modify any &lt;br /&gt;                    of the default settings in this section. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;My Site Location&lt;/strong&gt; section, do not modify any of the &lt;br /&gt;                    default settings. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;SSP Service Credentials&lt;/strong&gt; section, in &lt;strong&gt;User name&lt;/strong&gt; &lt;br /&gt;                    and &lt;strong&gt;Password&lt;/strong&gt;, type the user name and password for the user &lt;br /&gt;                    account under which you want the SSP to run. The user account does not have to &lt;br /&gt;                    be a member of any particular security group. It is recommended that you use the &lt;br /&gt;                    principle of least privilege and select a unique user account that does not have &lt;br /&gt;                    administrative rights on your front-end servers or on your back-end database &lt;br /&gt;                    servers. You can use the user account that you specified as the Office &lt;br /&gt;                    SharePoint Server 2007 service account; however, if that user account is a &lt;br /&gt;                    member of a security group that has administrative rights on your front-end &lt;br /&gt;                    servers or your back-end database servers, you will not be following the &lt;br /&gt;                    principle of least privilege. The user name must be in the format &lt;br /&gt;                    DOMAIN\username. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;SSP Database&lt;/strong&gt; section, you can either accept the default &lt;br /&gt;                    settings (recommended), or specify your own settings for the database server, &lt;br /&gt;                    the database name, or the SQL authentication credentials. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Search Database&lt;/strong&gt; section, you can either accept the &lt;br /&gt;                    default settings (recommended), or specify your own settings for the search &lt;br /&gt;                    database server, the database name, or the SQL Server authentication &lt;br /&gt;                    credentials. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Index Server&lt;/strong&gt; section, in &lt;strong&gt;Index Server&lt;/strong&gt;, &lt;br /&gt;                    click the server on which you configured the Search service. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;strong&gt;Note:&lt;/strong&gt; If there is no index server listed in the &lt;strong&gt;Index &lt;br /&gt;                    Server&lt;/strong&gt; section, then no server in your farm has been assigned the index &lt;br /&gt;                    server role. To assign the index server role to a server in your farm, follow &lt;br /&gt;                    the instructions in the &amp;quot;Configure the Search service&amp;quot; section earlier in this &lt;br /&gt;                    topic.&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;ol start="20" type="1"&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;SSL for Web Services&lt;/strong&gt; section, click &lt;strong&gt;No&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt;. Upon successful creation of the SSP, the Success page &lt;br /&gt;                    appears. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Success page, click &lt;strong&gt;OK&lt;/strong&gt; to return to the Manage this &lt;br /&gt;                    Farm&amp;#39;s Core Services page. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Configure indexing settings &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the SharePoint Central Administration home page, click the &lt;strong&gt;&lt;br /&gt;                    Application Management&lt;/strong&gt; tab on the navigation bar. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Application Management page, in the &lt;strong&gt;Office SharePoint Server &lt;br /&gt;                    Shared Services&lt;/strong&gt; section, click &lt;strong&gt;Create or configure this farm&amp;#39;s &lt;br /&gt;                    shared services&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Manage this Farm&amp;#39;s Shared Services page, click &lt;strong&gt;SharedServices1&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Shared Services Administration page, in &lt;strong&gt;Search&lt;/strong&gt;, click&lt;br /&gt;                    &lt;strong&gt;Search Settings&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Configure Search Settings page, in the &lt;strong&gt;Crawl Settings&lt;/strong&gt; &lt;br /&gt;                    section, click &lt;strong&gt;Default content access account&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the Default content access account section, in &lt;strong&gt;Account&lt;/strong&gt;,&lt;br /&gt;                    &lt;strong&gt;Password&lt;/strong&gt;, and &lt;strong&gt;Confirm Password&lt;/strong&gt;, type the user &lt;br /&gt;                    name and password for the user account that you want to use to crawl content on &lt;br /&gt;                    your sites. This account must be a domain user account. It is recommended that &lt;br /&gt;                    you use the principle of least privilege and select a unique user account that &lt;br /&gt;                    cannot modify content and does not have administrative rights on your front-end &lt;br /&gt;                    servers or on your back-end database servers. You can use the user account that &lt;br /&gt;                    you specified as the Office SharePoint Server 2007 service account; however, if &lt;br /&gt;                    that user account is a member of a security group that has administrative rights &lt;br /&gt;                    on your front-end servers or your back-end database servers, you will not be &lt;br /&gt;                    following the principle of least privilege. The user account that you specify &lt;br /&gt;                    will be added to the Web application Full Read policy for your farm. The user &lt;br /&gt;                    name must be in the format DOMAIN\username. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Crawl Settings&lt;/strong&gt; section, click &lt;strong&gt;Content sources&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Manage Content Sources page, click &lt;strong&gt;Local Office SharePoint Server &lt;br /&gt;                    sites&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Edit Content Source page, in the &lt;strong&gt;Crawl Schedules&lt;/strong&gt; &lt;br /&gt;                    section, under &lt;strong&gt;Full Crawl&lt;/strong&gt;, click &lt;strong&gt;Create schedule&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Manage Schedules&lt;/strong&gt; dialog box, configure schedule settings &lt;br /&gt;                    for full crawls of your content, and then click &lt;strong&gt;OK&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Crawl Schedules&lt;/strong&gt; section, under &lt;strong&gt;Incremental Crawl&lt;/strong&gt;, &lt;br /&gt;                    click &lt;strong&gt;Create schedule&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Manage Schedules&lt;/strong&gt; dialog box, configure schedule settings &lt;br /&gt;                    for incremental crawls of your content, and then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Start Full Crawl&lt;/strong&gt; section, select the &lt;strong&gt;Start full &lt;br /&gt;                    crawl of this content source&lt;/strong&gt; check box, and then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;a name="7"&gt;&lt;/a&gt;&lt;span class="subhead"&gt;Create and configure a site &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                After you configure services in your server farm, you can create a Web &lt;br /&gt;                application and a site collection. You should create the Web application on the &lt;br /&gt;                first server on which you installed Office SharePoint Server 2007 (in other &lt;br /&gt;                words, the same server that is running the SharePoint Central Administration &lt;br /&gt;                service).&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                Create a Web application for your SharePoint site&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;/span&gt;On the SharePoint Central Administration home page, click the &lt;strong&gt;&lt;br /&gt;                Application Management&lt;/strong&gt; tab on the top navigation bar.&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;SharePoint Web Application Management&lt;/strong&gt; section, click&lt;br /&gt;                    &lt;strong&gt;Create or extend Web application&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Create or Extend Web Application page, click &lt;strong&gt;Create a new Web &lt;br /&gt;                    Application&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Create New Web Application page, in the &lt;strong&gt;IIS Web Site&lt;/strong&gt; &lt;br /&gt;                    section, click &lt;strong&gt;Create a new IIS web site&lt;/strong&gt;, and change the port &lt;br /&gt;                    setting to port 80. This will allow you to access your site by typing http://&lt;i&gt;ServerName&lt;/i&gt;. &lt;br /&gt;                    If you use a nonstandard port number you will have to include the port number in &lt;br /&gt;                    the URL to access your site (for example, http://&lt;i&gt;ServerName&lt;/i&gt;:&lt;i&gt;port&lt;/i&gt;).&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Security Configuration&lt;/strong&gt; section, under &lt;strong&gt;&lt;br /&gt;                    Authentication provider&lt;/strong&gt;, select the appropriate option for your &lt;br /&gt;                    environment, and do not modify any other settings in this section. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;strong&gt;Note: &lt;/strong&gt;By default, the authentication provider is set to &lt;strong&gt;&lt;br /&gt;                    NTLM&lt;/strong&gt;.&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;ol start="6" type="1"&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Load Balanced URL&lt;/strong&gt; section, do not modify the default &lt;br /&gt;                    settings. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Application Pool&lt;/strong&gt; section, select &lt;strong&gt;Create new &lt;br /&gt;                    application pool&lt;/strong&gt;, and use the default settings for the application pool &lt;br /&gt;                    name. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Configurable&lt;/strong&gt;, and in &lt;strong&gt;User name&lt;/strong&gt; and&lt;br /&gt;                    &lt;strong&gt;Password&lt;/strong&gt;, type the user name and password for the user account &lt;br /&gt;                    under which you want the application pool to run. The user account does not have &lt;br /&gt;                    to be a member of any particular security group. It is recommended that you use &lt;br /&gt;                    the principle of least privilege and select a unique user account that does not &lt;br /&gt;                    have administrative rights on your front-end servers or on your back-end &lt;br /&gt;                    database servers. You can use the user account that you specified as the Office &lt;br /&gt;                    SharePoint Server 2007 service account; however, if that user account is a &lt;br /&gt;                    member of a security group that has administrative rights on your front-end &lt;br /&gt;                    servers or your back-end database servers, you will not be following the &lt;br /&gt;                    principle of least privilege. The user name must be in the format &lt;br /&gt;                    DOMAIN\username. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Database Name and Authentication&lt;/strong&gt; section, verify the &lt;br /&gt;                    database information and ensure &lt;strong&gt;Windows Authentication (recommended)&lt;/strong&gt;is &lt;br /&gt;                    selected. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Search Server&lt;/strong&gt; section, do not modify the default &lt;br /&gt;                    settings. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Application Created page, which appears after successful creation of the &lt;br /&gt;                    Web application, click &lt;strong&gt;Create a new Windows SharePoint Services site &lt;br /&gt;                    collection&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Create the site collection for your Web application &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the Create Site Collection page, in the &lt;strong&gt;Title and Description&lt;/strong&gt; &lt;br /&gt;                    section, in &lt;strong&gt;Title&lt;/strong&gt;, enter a title for the new site. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In &lt;strong&gt;Description&lt;/strong&gt;, enter a description of the site collection.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Web Site Address&lt;/strong&gt; section, click &lt;strong&gt;Create site at &lt;br /&gt;                    this URL&lt;/strong&gt;, and in &lt;strong&gt;URL path&lt;/strong&gt; click &lt;strong&gt;(root)&lt;/strong&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                It is most common to create a site collection at the root; however, you can &lt;br /&gt;                create a site collection at a specific URL path.&lt;/p&gt;&lt;br /&gt;            &lt;ol start="4" type="1"&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Primary Site Collection Administrator&lt;/strong&gt; section, in&lt;br /&gt;                    &lt;strong&gt;User name&lt;/strong&gt;, type the user name of the site collection &lt;br /&gt;                    administrator. This can be the same user account that you specified as the &lt;br /&gt;                    Office SharePoint Server 2007 service account, but you should follow the &lt;br /&gt;                    principle of least privilege and use a user account that does not have &lt;br /&gt;                    administrative privileges or rights on your front-end or back-end servers.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Quota Template&lt;/strong&gt; section, select a predefined quota &lt;br /&gt;                    template to limit resources used for this site collection. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;strong&gt;Note: &lt;/strong&gt;You can also select &lt;strong&gt;No Quota&lt;/strong&gt;, thereby &lt;br /&gt;                    allowing this site collection to use any available resources.&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;ol start="6" type="1"&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Template Selection&lt;/strong&gt; section, click the &lt;strong&gt;Publishing&lt;/strong&gt; &lt;br /&gt;                    tab, and then click &lt;strong&gt;Corporate Intranet Site&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; to create the site collection with the attributes you &lt;br /&gt;                    specified.&amp;nbsp; Upon successful completion, a Top-Level Site Successfully Created &lt;br /&gt;                    page appears. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; to return to the SharePoint Central Administration &lt;br /&gt;                    home page, or click the http://&lt;i&gt;ComputerName&lt;/i&gt; link to go to your new &lt;br /&gt;                    SharePoint site home page. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;a name="8"&gt;&lt;/a&gt;&lt;span class="subhead"&gt;After you install and configure Office &lt;br /&gt;            SharePoint Server 2007 &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                After you finish creating your first site, you can start adding content to the &lt;br /&gt;                site and you can start customizing the site. However, it is recommended that you &lt;br /&gt;                first configure several administrative settings to ensure that your Office &lt;br /&gt;                SharePoint Server 2007 environment is operating properly and you are using all &lt;br /&gt;                of the features and capabilities provided by Office SharePoint Server 2007.&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                Install and configure Excel Calculation Services&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;/span&gt;To take full advantage of the business intelligence capabilities of &lt;br /&gt;                Office SharePoint Server 2007 you need to start and configure Excel Calculation &lt;br /&gt;                Services. Instructions for doing this are provided below.&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &lt;strong&gt;Note: &lt;/strong&gt;Excel Services is only available if you use a product key &lt;br /&gt;                that activates the Enterprise version of Office SharePoint Server 2007.&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Start and configure Excel Calculation Services &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the SharePoint Central Administration home page, click &lt;strong&gt;Administrative &lt;br /&gt;                    Tasks&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Administrative Tasks page, click &lt;strong&gt;Add Excel Services Trusted &lt;br /&gt;                    Locations&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Add Excel Services Trusted Locations page, in &lt;strong&gt;Action&lt;/strong&gt;, &lt;br /&gt;                    click &lt;strong&gt;Add Excel Services Trusted Locations&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Excel Services Trusted File Locations page, click &lt;strong&gt;Add Trusted &lt;br /&gt;                    File Location&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;Location&lt;/strong&gt; section, in &lt;strong&gt;Address&lt;/strong&gt;, type the &lt;br /&gt;                    address of the trusted file location. It is recommended that the trusted file &lt;br /&gt;                    location be an Office SharePoint Server 2007 site, but you can also specify &lt;br /&gt;                    universal naming convention (UNC) paths or HTTP Web sites. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In &lt;strong&gt;Location Type&lt;/strong&gt;, click &lt;strong&gt;Windows SharePoint Services&lt;/strong&gt; &lt;br /&gt;                    if you specified an Office SharePoint Server 2007 site, click &lt;strong&gt;UNC&lt;/strong&gt; &lt;br /&gt;                    if you specified a UNC path, or click &lt;strong&gt;HTTP&lt;/strong&gt; if you specified an &lt;br /&gt;                    HTTP Web site. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the &lt;strong&gt;External Data&lt;/strong&gt; section, in &lt;strong&gt;Allow External Data&lt;/strong&gt;, &lt;br /&gt;                    select the trust level for external data sources that you want to enable by &lt;br /&gt;                    doing one of the following: &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;                &lt;ul&gt;&lt;br /&gt;                    &lt;li&gt;Click &lt;strong&gt;None&lt;/strong&gt; to prevent Excel Calculation Services from &lt;br /&gt;                        processing connections to any external data connection. &lt;/li&gt;&lt;br /&gt;                    &lt;li&gt;Click &lt;strong&gt;Trusted data connection libraries only&lt;/strong&gt; to prevent Excel &lt;br /&gt;                        Calculation Services from processing connections to external data sources that &lt;br /&gt;                        are embedded within workbooks. This setting permits Excel Calculation Services &lt;br /&gt;                        to process links to trusted data connection libraries. &lt;/li&gt;&lt;br /&gt;                    &lt;li&gt;Click &lt;strong&gt;Trusted data connection libraries and embedded&lt;/strong&gt; to permit &lt;br /&gt;                        Excel Calculation Services to process direct connections to external data &lt;br /&gt;                        sources that are embedded within workbooks. This setting also permits Excel &lt;br /&gt;                        Calculation Services to process links to trusted data connection libraries.&lt;br /&gt;                    &lt;/li&gt;&lt;br /&gt;                &lt;/ul&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Configure alternate access mappings for your Web &lt;br /&gt;            applications &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                If you installed and configured Office SharePoint Server 2007 on a single &lt;br /&gt;                front-end server, and a user browses to your server, the server will render the &lt;br /&gt;                content that is in your Web application. However, if you added subsequent &lt;br /&gt;                front-end servers to your server farm, the newly-added servers will not have &lt;br /&gt;                alternate access mappings configured to your Web application. To map newly-added &lt;br /&gt;                front-end servers to your existing Web application, you need to configure &lt;br /&gt;                alternate access mappings.&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                Before you configure alternate access mappings, install and configure Office &lt;br /&gt;                SharePoint Server 2007 on all of the front-end servers that you want to add to &lt;br /&gt;                your server farm, and make sure that the servers are joined to your server farm. &lt;br /&gt;                See &amp;quot;Run Windows SharePoint Services Setup&amp;quot; and &amp;quot;Run the SharePoint Products and &lt;br /&gt;                Technologies Configuration Wizard&amp;quot; for information about installing and &lt;br /&gt;                configuring Office SharePoint Server 2007.&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;To configure alternate access mappings &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;On the SharePoint Central Administration home page, click the &lt;strong&gt;Operations&lt;/strong&gt; &lt;br /&gt;                    tab. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Operations page, in the &lt;strong&gt;Global Configuration&lt;/strong&gt; section, &lt;br /&gt;                    click &lt;strong&gt;Alternate access mappings&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In &lt;strong&gt;Alternate Access Mapping Collection&lt;/strong&gt;, click &lt;strong&gt;Change &lt;br /&gt;                    Alternate Access Mapping Collection&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;In the Select an Alternate Access Mapping Collection dialog box, click the Web &lt;br /&gt;                    application that you want to modify. If you have created only one Web &lt;br /&gt;                    application, and you specified port 80 for the Web application, the Web &lt;br /&gt;                    application should be listed as SharePoint (80). &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click Edit Outbound URLs, and verify that your Web application is listed in the &lt;br /&gt;                    Default zone for outbound URLs. The outbound URL is the URL that you want users &lt;br /&gt;                    to use to access your Web application. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;strong&gt;Note: &lt;/strong&gt;If you have a load-balanced configuration with a host &lt;br /&gt;                    name, add the host name to the Outbound URL for the Default zone.&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;ol start="6" type="1"&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Add Incoming URLs&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Add Incoming URLs page, in &lt;strong&gt;New default zone URL protocol, host &lt;br /&gt;                    and port&lt;/strong&gt; type the URL for the server that you want to map to your Web &lt;br /&gt;                    application. Typically, this is http://&lt;i&gt;servername&lt;/i&gt;:&lt;i&gt;portnumber&lt;/i&gt;.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;p&gt;&lt;br /&gt;                    &lt;strong&gt;Note: &lt;/strong&gt;If you have a load-balanced configuration, you should add &lt;br /&gt;                    the server name of each of your front-end Web servers to the list of internal &lt;br /&gt;                    URLs. This will allow each of your Web servers to reach the content in your &lt;br /&gt;                    common Web application. Also, make sure the zone you selected for the incoming &lt;br /&gt;                    URL matches the zone of the outbound URL for the load balancer. You can have &lt;br /&gt;                    multiple incoming URLs associated with a single outbound URL.&lt;/p&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;ol start="9" type="1"&gt;&lt;br /&gt;                &lt;li&gt;In &lt;strong&gt;Zone&lt;/strong&gt;, make sure that &lt;strong&gt;Default&lt;/strong&gt; is selected.&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Configure additional administrative settings &lt;/span&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                After you have deployed the SharePoint Server, there are some other additional &lt;br /&gt;                settings which you need to configure. You should perform these tasks to take &lt;br /&gt;                full advantage of the SharePoint 2007 administrative Features:&lt;/p&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;                &amp;nbsp;&lt;/p&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;                &lt;li&gt;&lt;strong&gt;Email Settings:&lt;/strong&gt;&lt;br /&gt;                    &lt;ul&gt;&lt;br /&gt;                        &lt;li&gt;Incoming:&lt;/li&gt;&lt;br /&gt;                    &lt;/ul&gt;&lt;br /&gt;                &lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;            &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                    &lt;p&gt;&lt;br /&gt;                        Configuring server for incoming emails will enable you to get advantage of the &lt;br /&gt;                        following SPS 2007 features:&lt;/p&gt;&lt;br /&gt;                    &lt;p&gt;&lt;br /&gt;                        1. SharePoint sites can accept and archive incoming e-mail.&lt;br /&gt;                    &lt;/p&gt;&lt;br /&gt;                    &lt;p&gt;&lt;br /&gt;                        2. SharePoint sites can archive e-mail discussions as they happen, save e-mailed &lt;br /&gt;                        documents, and show e-mailed meetings on site calendars.&lt;/p&gt;&lt;br /&gt;                    &lt;p&gt;&lt;br /&gt;                        3. In addition, configure the SharePoint Directory Management Service for e-mail &lt;br /&gt;                        distribution list creation and management.&lt;br /&gt;                    &lt;/p&gt;&lt;br /&gt;                &lt;/blockquote&gt;&lt;br /&gt;                &lt;ul&gt;&lt;br /&gt;                    &lt;li&gt;Outgoing&lt;/li&gt;&lt;br /&gt;                &lt;/ul&gt;&lt;br /&gt;                &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;br /&gt;                    &lt;p&gt;&lt;br /&gt;                        Configure Outgoing SMTP Email server to enable SPS 2007 for sending &lt;br /&gt;                        Notifications and alerts to the site users and administrators. You can configure &lt;br /&gt;                        “From” and “Reply to” email addresses for outgoing emails.&lt;/p&gt;&lt;br /&gt;                &lt;/blockquote&gt;&lt;br /&gt;            &lt;/blockquote&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;                &lt;li&gt;&lt;strong&gt;Create SharePoint sites: &lt;/strong&gt;Create more SharePoint sites and Web &lt;br /&gt;                    applications if your site design requires multiple sites or multiple Web &lt;br /&gt;                    applications. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;&lt;strong&gt;Diagnostic logging settings&lt;/strong&gt;To get yourself helped in &lt;br /&gt;                    troubleshooting, configure various logging and diagnostics settings including &lt;br /&gt;                    trace logs, event messages, user-mode error messages, and Customer Experience &lt;br /&gt;                    Improvement Program events. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;&lt;strong&gt;Configure antivirus protection settings&lt;/strong&gt;Configure Antivirus &lt;br /&gt;                    Settings for Server to enable the virus scanning for document upload and &lt;br /&gt;                    downloads, also configure virus scanning timeout and execution threads on the &lt;br /&gt;                    server for antivirus. A SharePoint Server 2007 compatible Antivirus program is &lt;br /&gt;                    required for this. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;You can use the following procedure to configure optional administrative &lt;br /&gt;                    settings using SharePoint Central Administration.&lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;            &lt;span class="subhead"&gt;Configure administrative settings using SharePoint Central &lt;br /&gt;            Administration &lt;/span&gt;&lt;br /&gt;            &lt;ol type="1"&gt;&lt;br /&gt;                &lt;li&gt;Click &lt;strong&gt;Start&lt;/strong&gt;, point to &lt;strong&gt;All Programs&lt;/strong&gt;, point to&lt;br /&gt;                    &lt;strong&gt;Administrative Tools&lt;/strong&gt;, and then click &lt;strong&gt;SharePoint 3.0 &lt;br /&gt;                    Central Administration&lt;/strong&gt;. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the SharePoint Central Administration home page, under &lt;strong&gt;Administrative &lt;br /&gt;                    Tasks&lt;/strong&gt;, click the administrative task you want to perform. &lt;/li&gt;&lt;br /&gt;                &lt;li&gt;On the Administrative Tasks page, next to &lt;strong&gt;Action&lt;/strong&gt;, click the &lt;br /&gt;                    task. &lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;            &lt;p&gt;&lt;br /&gt;            &lt;/p&gt;&lt;br /&gt;        &lt;/div&gt;&lt;br /&gt;    &lt;/form&gt;&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;reference : &lt;a href="http://www.datasprings.com/Resources/ArticlesInformation/OverviewonInstallingSharepoint2007/tabid/774/language/en-US/Default.aspx"&gt;http://www.datasprings.com/Resources/ArticlesInformation/OverviewonInstallingSharepoint2007/tabid/774/language/en-US/Default.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-8088423188304488100?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/8088423188304488100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=8088423188304488100&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8088423188304488100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8088423188304488100'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/08/installing-procedure-and-system.html' title='Installing procedure and system requirements for moss 2007'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-1544815680005244691</id><published>2009-08-31T06:15:00.000-07:00</published><updated>2009-08-31T06:16:05.904-07:00</updated><title type='text'>Merrit Scholarships</title><content type='html'>&lt;a href="http://203.199.178.89/cce/State%20Merit%20Scholarships%20of%20Govt%20of%20AP.pdf"&gt;Merit Scholarship for Ap Students&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-1544815680005244691?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/1544815680005244691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=1544815680005244691&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/1544815680005244691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/1544815680005244691'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/08/merrit-scholarships.html' title='Merrit Scholarships'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-2730233553751314278</id><published>2009-08-30T08:02:00.000-07:00</published><updated>2009-08-30T08:04:23.364-07:00</updated><title type='text'>WindowsCommunicationFoundation.</title><content type='html'>Below is link for small sample on WindowsCommunicationFoundation.&lt;br /&gt;&lt;a href="http://www.codeproject.com/KB/WCF/wcf_bohansen.aspx"&gt;http://www.codeproject.com/KB/WCF/wcf_bohansen.aspx: windowdcommunicationfoundation&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-2730233553751314278?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/2730233553751314278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=2730233553751314278&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/2730233553751314278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/2730233553751314278'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/08/windowscommunicationfoundation.html' title='WindowsCommunicationFoundation.'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-6680019091096773910</id><published>2009-08-29T02:07:00.000-07:00</published><updated>2009-08-29T02:08:22.285-07:00</updated><title type='text'>MVC Architecture</title><content type='html'>The main aim of the MVC architecture  is to separate the&lt;br /&gt;business logic and application data from the presentation&lt;br /&gt;data to the user.&lt;br /&gt;&lt;br /&gt;Here are the reasons why we should use the MVC design pattern.&lt;br /&gt;&lt;br /&gt;   1. They are resuable : When the problems recurs, there is&lt;br /&gt;no need to invent a new solution, we just have to follow the&lt;br /&gt;pattern and adapt it as necessary.&lt;br /&gt;   2. They are expressive: By using the MVC design pattern&lt;br /&gt;our application becomes more expressive.&lt;br /&gt;&lt;br /&gt;1).  Model: The model object knows about all the data that&lt;br /&gt;need to be displayed. It is model who is aware about all the&lt;br /&gt;operations that can be applied to transform that object. It&lt;br /&gt;only represents the data of an application. The model&lt;br /&gt;represents enterprise data and the business rules that&lt;br /&gt;govern access to and updates of this data. Model is not&lt;br /&gt;aware about the presentation data and how that data will be&lt;br /&gt;displayed to the browser.  &lt;br /&gt;&lt;br /&gt;2). View : The view represents the presentation of the&lt;br /&gt;application. The view object refers to the model. It uses&lt;br /&gt;the query methods of the model to obtain the contents and&lt;br /&gt;renders it. The view is not dependent on the application&lt;br /&gt;logic. It remains same if there is any modification in the&lt;br /&gt;business logic. In other words, we can say that it is the&lt;br /&gt;responsibility of the of the view's to maintain the&lt;br /&gt;consistency in its presentation when the model changes.&lt;br /&gt;&lt;br /&gt;3). Controller:  Whenever the user sends a request for&lt;br /&gt;something then it always go through the controller. The&lt;br /&gt;controller is responsible for intercepting the requests from&lt;br /&gt;view and passes it to the model for the appropriate action.&lt;br /&gt;After the action has been taken on the data, the controller&lt;br /&gt;is responsible for directing the appropriate view to the&lt;br /&gt;user. In  GUIs, the views and the controllers often work&lt;br /&gt;very closely together.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-6680019091096773910?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/6680019091096773910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=6680019091096773910&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6680019091096773910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6680019091096773910'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/08/mvc-architecture.html' title='MVC Architecture'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-4906233309605428486</id><published>2009-08-27T22:58:00.001-07:00</published><updated>2009-08-27T22:58:50.070-07:00</updated><title type='text'>OverLoading in Webservice</title><content type='html'>using System;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Services;&lt;br /&gt;using System.Web.Services.Protocols;&lt;br /&gt;&lt;br /&gt;[WebService(Namespace = "http://tempuri.org/")]&lt;br /&gt;[WebServiceBinding(ConformsTo = WsiProfiles.None)]&lt;br /&gt;public class Service : System.Web.Services.WebService&lt;br /&gt;{&lt;br /&gt;    public Service ()&lt;br /&gt;    { &lt;br /&gt;    }&lt;br /&gt;   [WebMethod(MessageName = "One param", Description = "str Value", EnableSession = true)] &lt;br /&gt;    public string Method( string str)&lt;br /&gt;    {&lt;br /&gt;        return "Hello World";&lt;br /&gt;    }&lt;br /&gt;    [WebMethod(MessageName = "two param", Description = "two str values", EnableSession = true)] &lt;br /&gt;    public string Method(string str,string str1)&lt;br /&gt;    {&lt;br /&gt;        return "Hi";&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-4906233309605428486?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/4906233309605428486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=4906233309605428486&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4906233309605428486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4906233309605428486'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/08/overloading-in-webservice.html' title='OverLoading in Webservice'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-8095661635963355570</id><published>2009-08-27T03:03:00.001-07:00</published><updated>2009-08-27T03:03:50.685-07:00</updated><title type='text'>Dynamic Controls</title><content type='html'>using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;&lt;br /&gt;public partial class _Default : System.Web.UI.Page &lt;br /&gt;{&lt;br /&gt;    protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        if (Page.IsPostBack != true)&lt;br /&gt;        {&lt;br /&gt;            List&lt;string&gt; temp1 = new List&lt;string&gt;();&lt;br /&gt;            ViewState["allData"] = temp1;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;        if (ViewState["allData"] != null)&lt;br /&gt;        {&lt;br /&gt;            List&lt;string&gt; values = (List&lt;string&gt;)ViewState["allData"];&lt;br /&gt;            foreach (string strdata in values)&lt;br /&gt;            {&lt;br /&gt;                TableRow row = new TableRow();&lt;br /&gt;                TableCell cell = new TableCell();&lt;br /&gt;                TextBox text = new TextBox();&lt;br /&gt;                text.Width = 200;&lt;br /&gt;                text.Text = strdata;&lt;br /&gt;                cell.Controls.Add(text);// = strdata.Split(',')[1];&lt;br /&gt;                row.Cells.Add(cell);&lt;br /&gt;                Table1.Rows.Add(row);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;    protected void Button1_Click(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        TableRow row = new TableRow();&lt;br /&gt;        TableCell cell = new TableCell();&lt;br /&gt;        TextBox txt = new TextBox();        &lt;br /&gt;        txt.Width = 200;&lt;br /&gt;        cell.Controls.Add(txt);&lt;br /&gt;        row.Cells.Add(cell);&lt;br /&gt;        Table1.Rows.Add(row);&lt;br /&gt;        List&lt;string&gt; myData = (List&lt;string&gt;)ViewState["allData"];&lt;br /&gt;        myData.Add(txt.Text);&lt;br /&gt;        ViewState["allData"] = myData;&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-8095661635963355570?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/8095661635963355570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=8095661635963355570&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8095661635963355570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8095661635963355570'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/08/dynamic-controls.html' title='Dynamic Controls'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-3610393332315164955</id><published>2009-08-27T02:03:00.000-07:00</published><updated>2009-08-27T02:07:07.054-07:00</updated><title type='text'>MaintaningDynamicControlsi Asp.net</title><content type='html'>Paste This Code in Page_load&lt;br /&gt;------------------------------&lt;br /&gt;  if (Page.IsPostBack != true)&lt;br /&gt;            {&lt;br /&gt;                List&lt;string&gt; temp1 = new List&lt;string&gt;();&lt;br /&gt;                ViewState["allData"] = temp1;&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt; List&lt;string&gt; values = (List&lt;string&gt;)ViewState["allData"];&lt;br /&gt; foreach (string strdata in values)&lt;br /&gt;            {&lt;br /&gt;                TableRow row = new TableRow();&lt;br /&gt;                TableCell cell = new TableCell();&lt;br /&gt;&lt;br /&gt;                Label label = new Label();&lt;br /&gt;                label.Text = strdata.Split(',')[0];&lt;br /&gt;                cell.Text = strdata.Split(',')[0];&lt;br /&gt;                row.Cells.Add(cell);&lt;br /&gt;                //pnlDynamiclabelsandtxt.Controls.Add(label);&lt;br /&gt;                TextBox text = new TextBox();&lt;br /&gt;                text.Text = strdata.Split(',')[1];&lt;br /&gt;                cell = new TableCell();&lt;br /&gt;                cell.Controls.Add(text);// = strdata.Split(',')[1];&lt;br /&gt;                row.Cells.Add(cell);&lt;br /&gt;                table.Rows.Add(row);&lt;br /&gt;                //pnlDynamiclabelsandtxt.Controls.Add(table);&lt;br /&gt;                &lt;br /&gt;                //pnlDynamiclabelsandtxt.Controls.Add(text);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Paste This Code In BtnAdd_click&lt;br /&gt;-----------------------------------------------------&lt;br /&gt;&lt;br /&gt;  for (int i = 0; i &lt; gvUser.Rows.Count; i++)&lt;br /&gt;            {&lt;br /&gt;                CheckBox chk = (CheckBox)gvUser.Rows[i].Cells[0].FindControl("cbUser");&lt;br /&gt;                if (chk.Checked == true)&lt;br /&gt;                {&lt;br /&gt;                  string   strUserName = gvUser.Rows[i].Cells[2].Text;&lt;br /&gt;                  string  strUserID = gvUser.Rows[i].Cells[1].Text.ToString();&lt;br /&gt;                  DataSet ds = DisplayUserAll();&lt;br /&gt;                  DataRow[] drarr = ds.Tables[0].Select("FIELD1='" + strUserID + "'");&lt;br /&gt;                  string strPhoneN0 = drarr[0]["FIELD10"].ToString();&lt;br /&gt;&lt;br /&gt;                  TableRow row = new TableRow();&lt;br /&gt;                  TableCell cell = new TableCell();&lt;br /&gt;&lt;br /&gt;                  cell.Text = strUserName;&lt;br /&gt;                  row.Cells.Add(cell);&lt;br /&gt;                  //AddDynamicLabel(strUserName);&lt;br /&gt;                  TextBox txt = new TextBox();&lt;br /&gt;                  txt.Text = strPhoneN0;&lt;br /&gt;                  txt.Width = 200;&lt;br /&gt;                  cell = new TableCell();&lt;br /&gt;                  cell.Controls.Add(txt);// = strPhoneN0;                  &lt;br /&gt;                  row.Cells.Add(cell);&lt;br /&gt;                &lt;br /&gt;                  table.Rows.Add(row);                &lt;br /&gt;&lt;br /&gt;                  //pnlDynamiclabelsandtxt.Controls.Add(txt);&lt;br /&gt;                  List&lt;string&gt; myData = (List&lt;string&gt;)ViewState["allData"];&lt;br /&gt;                  myData.Add(strUserName + "," + strPhoneN0);&lt;br /&gt;                  ViewState["allData"] = myData;&lt;br /&gt;                  pnlDynamiclabelsandtxt.Visible = true;&lt;br /&gt;                 &lt;br /&gt;                }&lt;br /&gt;            }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-3610393332315164955?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/3610393332315164955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=3610393332315164955&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3610393332315164955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3610393332315164955'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/08/maintaningdynamiccontrolsi-aspnet.html' title='MaintaningDynamicControlsi Asp.net'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-5288013499358214653</id><published>2009-08-25T04:35:00.000-07:00</published><updated>2009-08-25T04:36:15.399-07:00</updated><title type='text'>ASP.NET Caching</title><content type='html'>http://aspnet.4guysfromrolla.com/articles/022802-1.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-5288013499358214653?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/5288013499358214653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=5288013499358214653&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/5288013499358214653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/5288013499358214653'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/08/aspnet-caching.html' title='ASP.NET Caching'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-4873846264785111968</id><published>2009-08-07T22:51:00.000-07:00</published><updated>2009-08-07T22:52:25.479-07:00</updated><title type='text'>Lean Wpf</title><content type='html'>http://www.wpftutorial.net/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-4873846264785111968?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/4873846264785111968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=4873846264785111968&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4873846264785111968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4873846264785111968'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/08/lean-wpf.html' title='Lean Wpf'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-7670153405439936309</id><published>2009-07-24T22:47:00.000-07:00</published><updated>2009-07-24T22:48:03.222-07:00</updated><title type='text'>LINQ With Asp.net</title><content type='html'>http://weblogs.asp.net/scottgu/archive/2006/05/14/Using-LINQ-with-ASP.NET-_2800_Part-1_2900_.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-7670153405439936309?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/7670153405439936309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=7670153405439936309&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/7670153405439936309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/7670153405439936309'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/07/linq-with-aspnet.html' title='LINQ With Asp.net'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-3814832272268123985</id><published>2009-07-23T23:57:00.001-07:00</published><updated>2009-07-23T23:57:31.413-07:00</updated><title type='text'>Introduction to .Net Framework 2.0 Nullable Types</title><content type='html'>http://www.c-sharpcorner.com/UploadFile/mosessaur/nullabletypes08222006164135PM/nullabletypes.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-3814832272268123985?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/3814832272268123985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=3814832272268123985&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3814832272268123985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3814832272268123985'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/07/introduction-to-net-framework-20.html' title='Introduction to .Net Framework 2.0 Nullable Types'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-4930459477584670632</id><published>2009-07-13T22:41:00.000-07:00</published><updated>2009-07-13T22:43:41.291-07:00</updated><title type='text'>Session Management</title><content type='html'>http://www.codeproject.com/KB/aspnet/ExploringSession.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-4930459477584670632?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/4930459477584670632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=4930459477584670632&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4930459477584670632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4930459477584670632'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/07/session-management.html' title='Session Management'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-6622762462435283822</id><published>2009-07-09T02:45:00.000-07:00</published><updated>2009-07-09T02:46:46.990-07:00</updated><title type='text'>Forms Authentication in asp.net</title><content type='html'>refer this url&lt;br /&gt;http://www.4guysfromrolla.com/webtech/110701-1.shtml&lt;br /&gt;&lt;br /&gt;http://www.15seconds.com/Issue/020220.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-6622762462435283822?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/6622762462435283822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=6622762462435283822&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6622762462435283822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6622762462435283822'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/07/forms-authentication-in-aspnet.html' title='Forms Authentication in asp.net'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-6004028724225262718</id><published>2009-07-03T03:39:00.000-07:00</published><updated>2009-07-03T03:49:17.247-07:00</updated><title type='text'>create html table from javascript</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_JEdS6F9w0_Q/Sk3h-7I04SI/AAAAAAAAAEg/rTsPOUnTiug/s1600-h/sv.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 350px;" src="http://3.bp.blogspot.com/_JEdS6F9w0_Q/Sk3h-7I04SI/AAAAAAAAAEg/rTsPOUnTiug/s400/sv.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5354184003156238626" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-6004028724225262718?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/6004028724225262718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=6004028724225262718&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6004028724225262718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6004028724225262718'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/07/create-html-table-from-javascript.html' title='create html table from javascript'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JEdS6F9w0_Q/Sk3h-7I04SI/AAAAAAAAAEg/rTsPOUnTiug/s72-c/sv.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-6041226465857209212</id><published>2009-07-02T23:32:00.000-07:00</published><updated>2009-07-02T23:33:57.484-07:00</updated><title type='text'>SqlQuery for copying data from one table to another table when serial no is even</title><content type='html'>insert into table1 (id,sal) select sal,id  from example where cast(sal as int)%2&lt;&gt;1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-6041226465857209212?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/6041226465857209212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=6041226465857209212&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6041226465857209212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6041226465857209212'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/07/sqlquery-for-copying-data-from-one.html' title='SqlQuery for copying data from one table to another table when serial no is even'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-6696089938884607090</id><published>2009-07-02T22:33:00.000-07:00</published><updated>2009-07-02T22:35:41.940-07:00</updated><title type='text'>Stored Procedure with 2 SqlStatements</title><content type='html'>create procedure sp_Retrive&lt;br /&gt;as&lt;br /&gt;select ID,Sal from Example &lt;br /&gt;select Id,Name from Test&lt;br /&gt;go&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  SqlConnection cnn = new SqlConnection("user id=sa;password=;database=samples;server=localhost\\SQLEXPRESS");&lt;br /&gt;&lt;br /&gt;SqlCommand cmd = new SqlCommand("Retrive",cnn);        &lt;br /&gt;            cmd.CommandType = CommandType.StoredProcedure;&lt;br /&gt;            SqlDataAdapter da = new SqlDataAdapter(cmd);&lt;br /&gt;            DataSet ds = new DataSet();&lt;br /&gt;            da.Fill(ds);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-6696089938884607090?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/6696089938884607090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=6696089938884607090&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6696089938884607090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6696089938884607090'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/07/stored-procedure-with-2-sqlstatements.html' title='Stored Procedure with 2 SqlStatements'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-628518329898533175</id><published>2009-07-02T20:02:00.000-07:00</published><updated>2009-07-02T20:04:46.107-07:00</updated><title type='text'>webservice.htc document for calling webservice from html</title><content type='html'>&lt;a href="http://www.4shared.com/file/115660413/830e45f0/webservice.html" target=_blank&gt;webservice.htc&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;sample application for calling webservice from HTML in asp.net using Javascript&lt;br /&gt;&lt;a href="http://www.4shared.com/file/115660416/f364b17f/MyWebSite.html" target=_blank&gt;Callingwebservice.rar&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-628518329898533175?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/628518329898533175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=628518329898533175&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/628518329898533175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/628518329898533175'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/07/webservicehtc-document-for-calling.html' title='webservice.htc document for calling webservice from html'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-3640705165783764668</id><published>2009-07-02T07:01:00.000-07:00</published><updated>2009-07-02T09:33:32.222-07:00</updated><title type='text'>Getting directory information</title><content type='html'>int count = 0;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            string[] strFiles = Directory.GetFiles("E://svsv");         &lt;br /&gt;            string[] strarr =new string[1];&lt;br /&gt;            strarr[0] = "E://svsv";&lt;br /&gt;            direc(strarr);      &lt;br /&gt;          &lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;        catch &lt;br /&gt;        {&lt;br /&gt;            &lt;br /&gt;           &lt;br /&gt;        }&lt;br /&gt;    }  &lt;br /&gt;    public void direc(string[] str)&lt;br /&gt;    {&lt;br /&gt;        for (int inti = 0; inti &lt; str.Length; inti++)&lt;br /&gt;        {&lt;br /&gt;            string[] strFiles = Directory.GetFiles(str[inti]);&lt;br /&gt;            count =count+ strFiles.Length; &lt;br /&gt;            string[] strDirectory = Directory.GetDirectories(str[inti]);&lt;br /&gt;            for (int i = 0; i &lt; strDirectory.Length; i++)&lt;br /&gt;            {&lt;br /&gt;                string[] strFiles1 = Directory.GetFiles(strDirectory[i]);&lt;br /&gt;                count = count + strFiles1.Length;&lt;br /&gt;            }&lt;br /&gt;            for (int i = 0; i &lt; strDirectory.Length; i++)&lt;br /&gt;            {&lt;br /&gt;                string[] strFiles1 = Directory.GetDirectories(strDirectory[i]);&lt;br /&gt;                if (strFiles1.Length != 0)&lt;br /&gt;                {&lt;br /&gt;                    //string[] strarr = new string[strFiles1.Length];&lt;br /&gt;                    //for (int j = 0; j &lt; strarr.Length; j++)&lt;br /&gt;                    //{&lt;br /&gt;                    //    strarr[j] = str[inti]+"//"+strarr[j]+"//";&lt;br /&gt;                    //}&lt;br /&gt;                    direc(strFiles1);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;       &lt;br /&gt;    }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-3640705165783764668?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/3640705165783764668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=3640705165783764668&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3640705165783764668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3640705165783764668'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/07/getting-directory-information.html' title='Getting directory information'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-5704952163437082255</id><published>2009-06-20T03:22:00.000-07:00</published><updated>2009-06-20T03:24:12.553-07:00</updated><title type='text'>Skins,Themes,StyleSheets in asp.net2.0</title><content type='html'>http://www.beansoftware.com/ASP.NET-Tutorials/Themes-Skins.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-5704952163437082255?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/5704952163437082255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=5704952163437082255&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/5704952163437082255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/5704952163437082255'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/06/skinsthemesstylesheets-in-aspnet20.html' title='Skins,Themes,StyleSheets in asp.net2.0'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-8379347115268806252</id><published>2009-06-19T22:49:00.000-07:00</published><updated>2009-06-19T22:51:01.937-07:00</updated><title type='text'>Samples on  Update Pannel</title><content type='html'>http://www.asp.net/AJAX/documentation/live/Tutorials/UpdatePanelTutorials.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-8379347115268806252?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/8379347115268806252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=8379347115268806252&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8379347115268806252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8379347115268806252'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/06/samples-on-update-pannel.html' title='Samples on  Update Pannel'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-6347653092802962961</id><published>2009-06-18T22:13:00.000-07:00</published><updated>2009-06-18T22:15:39.938-07:00</updated><title type='text'>Sample Articles on Dot Net</title><content type='html'>&lt;a href="http://www.4shared.com/file/112801601/bfce0cc8/Impersonation.html"&gt;Impersonation in asp.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.4shared.com/file/112801599/629181ea/CREATE_TRIGGER_on_sql_server.htm"&gt;Creating Triggers in sql server&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.4shared.com/file/112801600/c8c93c5e/ASPnet_page_lifecycle.html"&gt;Asp.net Page Life Cycle&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-6347653092802962961?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/6347653092802962961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=6347653092802962961&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6347653092802962961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6347653092802962961'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/06/sample-articles-on-dot-net.html' title='Sample Articles on Dot Net'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-1333382625749212602</id><published>2009-06-08T19:18:00.000-07:00</published><updated>2009-06-08T19:24:30.046-07:00</updated><title type='text'>Serialization and Deserialization in .net</title><content type='html'>&lt;h2&gt;&lt;br /&gt;            Introduction&lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            Serialization is a process of converting an object into a stream of data so that&lt;br /&gt;            it can be easily transmittable over the network or can be continued in a persistent&lt;br /&gt;            storage location. This storage location can be a physical file, database or ASP.NET&lt;br /&gt;            cache. Serialization is the technology that enables an object to be converted into&lt;br /&gt;            a linear stream of data that can be easily passed across process boundaries and&lt;br /&gt;            machines. This stream of data needs to be in a format that can be understood by&lt;br /&gt;            both ends of a communication channel so that the object can be serialized and reconstructed&lt;br /&gt;            easily. The advantage of serialization is the ability to transmit data across the&lt;br /&gt;            network in a cross-platform-compatible format, as well as saving it in a persistent&lt;br /&gt;            or non-persistent storage medium in a non-proprietary format. Serialization is used&lt;br /&gt;            by Remoting, Web Services SOAP for transmitting data between a server and a client.&lt;br /&gt;            De-serialization is the reverse; it is the process of reconstructing the same object&lt;br /&gt;            later. The Remoting technology of .NET makes use of serialization to pass objects&lt;br /&gt;            by value from one application domain to another.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            In this article, I will discuss .NET's support for Serialization and how we can&lt;br /&gt;            build a class that supports custom serialization.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            What is Serialization and De-Serialization?&lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            Serialization is the process of saving the state of an object in a persistent storage&lt;br /&gt;            media by converting the object to a linear stream of bytes. The object can be persisted&lt;br /&gt;            to a file, a database or even in the memory. The reverse process of serialization&lt;br /&gt;            is known as de-serialization and enables us to re-construct the object from the&lt;br /&gt;            previously serialized instance of the same in the persistent or non-persistent storage&lt;br /&gt;            media.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            Serialization in .NET is provided by the &lt;code&gt;System.Runtime.Serialization &lt;/code&gt;&lt;br /&gt;            namespace. This namespace contains an interface called &lt;code&gt;IFormatter &lt;/code&gt;which&lt;br /&gt;            in turn contains the methods Serialize and De-serialize that can be used to save&lt;br /&gt;            and load data to and from a stream. In order to implement serialization in .NET,&lt;br /&gt;            we basically require a stream and a formatter. While the stream acts as a container&lt;br /&gt;            for the serialized object(s), the formatter is used to serialize these objects onto&lt;br /&gt;            the stream.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            The basic advantage of serialization is the ability of an object to be serialized&lt;br /&gt;            into a persistent or a non-persistent storage media and then reconstructing the&lt;br /&gt;            same object if required at a later point of time by de-serializing the object. Remoting&lt;br /&gt;            and Web Services depend heavily on Serialization and De-serialization.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            Advantages and Disadvantages of Serialization&lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            The following are the basic advantages of serialization:&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;ol&gt;&lt;br /&gt;            &lt;li&gt;Facilitate the transportation of an object through a network &lt;/li&gt;&lt;br /&gt;            &lt;li&gt;Create a clone of an object &lt;/li&gt;&lt;br /&gt;        &lt;/ol&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            The primary disadvantage of serialization can be attributed to the resource overhead&lt;br /&gt;            (both the CPU and the IO devices) that is involved in serializing and de-serializing&lt;br /&gt;            the data and the latency issues that are involved for transmitting the data over&lt;br /&gt;            the network. Further, serialization is quite slow. Moreover, XML serialization is&lt;br /&gt;            insecure, consumes a lot of space on the disk and it works on &lt;code&gt;&lt;span class="code-keyword"&gt;&lt;br /&gt;                public&lt;/span&gt; &lt;/code&gt;members and &lt;code&gt;&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;/code&gt;&lt;br /&gt;            classes and not on the &lt;code&gt;&lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;/code&gt;or&lt;br /&gt;            &lt;code&gt;internal &lt;/code&gt;classes. Therefore, it compels the developer to allow the&lt;br /&gt;            class to be accessed by the outside world.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            The Serializable Attribute&lt;br /&gt;        &lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            In order for a class to be serializable, it must have the attribute &lt;code&gt;SerializableAttribute&lt;br /&gt;            &lt;/code&gt;set and all its members must also be serializable, except if they are ignored&lt;br /&gt;            with the attribute &lt;code&gt;NonSerializedAttribute&lt;/code&gt;. However, the &lt;code&gt;&lt;span&lt;br /&gt;                class="code-keyword"&gt;private&lt;/span&gt; &lt;/code&gt;and &lt;code&gt;&lt;span class="code-keyword"&gt;public&lt;/span&gt;&lt;br /&gt;                &lt;/code&gt;members of a class are always serialized by default. The &lt;code&gt;SerializationAttribute&lt;br /&gt;                &lt;/code&gt;is only used for binary serialization. The code snippet below shows the&lt;br /&gt;            usage of &lt;code&gt;SerializableAttribute&lt;/code&gt;.&lt;/p&gt;&lt;br /&gt;        &lt;pre id="pre0" lang="cs" style="margin-top: 0px"&gt;&lt;br /&gt;&lt;span class="code-keyword"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span class="code-keyword"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span class="code-keyword"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span class="code-keyword"&gt;using&lt;/span&gt; System.Xml.Serialization;&lt;br /&gt;&lt;span class="code-keyword"&gt;namespace&lt;/span&gt; DemoSerialization&lt;br /&gt;{&lt;br /&gt;    [Serializable]&lt;br /&gt;    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;class&lt;/span&gt; Employee&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;int&lt;/span&gt; empCode;&lt;br /&gt;        &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;string&lt;/span&gt; empName;&lt;br /&gt;        [XmlAttribute(empName)]&lt;br /&gt;        &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;string&lt;/span&gt; EmpName&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="code-keyword"&gt;get&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="code-keyword"&gt;return&lt;/span&gt; empName;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span class="code-keyword"&gt;set&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                empName = value;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            Note the &lt;code&gt;Serializable &lt;/code&gt;attribute that is specified at the beginning&lt;br /&gt;            of the class in the code listing above. The &lt;code&gt;SerializableAttribute &lt;/code&gt;is&lt;br /&gt;            useful for situations where the object has to be transported to other application&lt;br /&gt;            domains. It needs to be applied even irrespective of whether the class implements&lt;br /&gt;            the &lt;code&gt;ISerializable &lt;/code&gt;interface. If this attribute is not set in that case,&lt;br /&gt;            then when we try to serialize an object, the CLR throws a &lt;code&gt;SerializationException&lt;/code&gt;.&lt;/p&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            Types of Serialization&lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            Serialization can be of the following types:&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;ul&gt;&lt;br /&gt;            &lt;li&gt;Binary Serialization &lt;/li&gt;&lt;br /&gt;            &lt;li&gt;SOAP Serialization &lt;/li&gt;&lt;br /&gt;            &lt;li&gt;XML Serialization &lt;/li&gt;&lt;br /&gt;        &lt;/ul&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            All these types of serialization are explained in detail in the sections that follow.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            Binary Serialization&lt;br /&gt;        &lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            Binary serialization is a mechanism which writes the data to the output stream such&lt;br /&gt;            that it can be used to re-construct the object automatically. The term binary in&lt;br /&gt;            its name implies that the necessary information that is required to create an exact&lt;br /&gt;            binary copy of the object is saved onto the storage media. &lt;em&gt;A notable difference&lt;br /&gt;                between Binary serialization and XML serialization is that Binary serialization&lt;br /&gt;                preserves instance identity while XML serialization does not.&lt;/em&gt; In other&lt;br /&gt;            words, in Binary serialization the entire object state is saved while in XML serialization&lt;br /&gt;            only some of the object data is saved. Binary serialization can handle graphs with&lt;br /&gt;            multiple references to the same object; XML serialization will turn each reference&lt;br /&gt;            into a unique object. The following code listing shows how we can implement binary&lt;br /&gt;            serialization.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;pre id="pre1" lang="cs" style="margin-top: 0px"&gt;&lt;br /&gt;&lt;span class="code-preprocessor"&gt;#region&lt;/span&gt; Binary&lt;br /&gt;&lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; btnBSerialize_Click(&lt;span&lt;br /&gt;    class="code-keyword"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;    Employee emp=new Employee();&lt;br /&gt;    emp.empCode=Convert.ToInt16(txtbEmpCode.Text);&lt;br /&gt;    emp.EmpName=txtBEmpName.Text;&lt;br /&gt;    BinarySerialize(txtBinary.Text, emp);&lt;br /&gt;    MessageBox.Show(Binary Serialize Done!);&lt;br /&gt;}&lt;br /&gt;&lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; btnBDSerialize_Click(&lt;span&lt;br /&gt;    class="code-keyword"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;    Employee emp = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Employee();&lt;br /&gt;    emp = (Employee)BinaryDeserialize(txtBinary.Text);&lt;br /&gt;    lblBEmpCode.Text =Emp Code: + Convert.ToString(emp.empCode);&lt;br /&gt;    lblBEmpName.Text = Emp Name: + emp.EmpName;&lt;br /&gt;}&lt;br /&gt;&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; BinarySerialize(&lt;span&lt;br /&gt;    class="code-keyword"&gt;string&lt;/span&gt; filename, Employee emp)&lt;br /&gt;{&lt;br /&gt;    FileStream fileStreamObject;&lt;br /&gt;&lt;br /&gt;    fileStreamObject = &lt;span class="code-keyword"&gt;new&lt;/span&gt; FileStream(filename, FileMode.Create);&lt;br /&gt;    BinaryFormatter binaryFormatter = &lt;span class="code-keyword"&gt;new&lt;/span&gt; BinaryFormatter();&lt;br /&gt;    binaryFormatter.Serialize(fileStreamObject, emp);&lt;br /&gt;    fileStreamObject.Close();&lt;br /&gt;}&lt;br /&gt;&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;static&lt;/span&gt; &lt;span&lt;br /&gt;    class="code-keyword"&gt;object&lt;/span&gt; BinaryDeserialize(&lt;span class="code-keyword"&gt;string&lt;/span&gt; filename)&lt;br /&gt;{&lt;br /&gt;    FileStream fileStreamObject = &lt;span class="code-keyword"&gt;new&lt;/span&gt; FileStream(filename, FileMode.Open);&lt;br /&gt;    BinaryFormatter binaryFormatter = &lt;span class="code-keyword"&gt;new&lt;/span&gt; BinaryFormatter();&lt;br /&gt;    &lt;span class="code-keyword"&gt;object&lt;/span&gt; obj = (&lt;span class="code-keyword"&gt;object&lt;/span&gt;)binaryFormatter.Deserialize(fileStreamObject);&lt;br /&gt;    fileStreamObject.Close();&lt;br /&gt;    &lt;span class="code-keyword"&gt;return&lt;/span&gt; obj;&lt;br /&gt;}&lt;br /&gt;&lt;span class="code-preprocessor"&gt;#endregion&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            Advantages and Disadvantages of Binary Serialization&lt;br /&gt;        &lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            One of the major advantages of using Binary Serialization in the managed environment&lt;br /&gt;            is that the object can be de-serialized from the same data you serialized it to.&lt;br /&gt;            Besides, the other advantage of Binary Serialization is enhanced performance as&lt;br /&gt;            it is faster and even more powerful in the sense that it provides support for complex&lt;br /&gt;            objects, read only properties and even circular references. However, the downside&lt;br /&gt;            to this is that it is not easily portable to another platform.&lt;/p&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            SOAP Serialization&lt;br /&gt;        &lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            The SOAP protocol is ideal for communicating between applications that use heterogeneous&lt;br /&gt;            architectures. In order to use SOAP serialization in .NET we have to add a reference&lt;br /&gt;            to &lt;code&gt;System.Runtime.Serialization.Formatters.Soap&lt;/code&gt; in the application.&lt;br /&gt;            The basic advantage of SOAP serialization is portability. The &lt;code&gt;SoapFormatter &lt;/code&gt;&lt;br /&gt;            serializes objects into SOAP messages or parses SOAP messages and extracts serialized&lt;br /&gt;            objects from the message. The following code listing shows how we can implement&lt;br /&gt;            serialization using the SOAP protocol:&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;pre id="pre2" lang="cs" style="margin-top: 0px"&gt;&lt;br /&gt;&lt;span class="code-preprocessor"&gt;#region&lt;/span&gt; SOAP&lt;br /&gt;&lt;br /&gt;&lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; btnSSerialize_Click(&lt;span&lt;br /&gt;    class="code-keyword"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;    Employee emp = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Employee();&lt;br /&gt;    emp.empCode = Convert.ToInt16(txtSEmpCode.Text);&lt;br /&gt;    emp.EmpName = txtSEmpName.Text;&lt;br /&gt;    SOAPSerialize(txtSoap.Text, emp);&lt;br /&gt;    MessageBox.Show(SOAP Serialize Done!);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; btnSDeSerialize_Click(&lt;span&lt;br /&gt;    class="code-keyword"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;    Employee emp = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Employee();&lt;br /&gt;    emp = (Employee)SOAPDeserialize(txtSoap.Text);&lt;br /&gt;    lblSEmpCode.Text = Emp Code: + Convert.ToString(emp.empCode);&lt;br /&gt;    lblSEmpName.Text = Emp Name: + emp.EmpName;&lt;br /&gt;}&lt;br /&gt;&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; SOAPSerialize(&lt;span&lt;br /&gt;    class="code-keyword"&gt;string&lt;/span&gt; filename, Employee employeeObject)&lt;br /&gt;{&lt;br /&gt;    FileStream fileStreamObject = &lt;span class="code-keyword"&gt;new&lt;/span&gt; FileStream(filename, FileMode.Create);&lt;br /&gt;    SoapFormatter soapFormatter = &lt;span class="code-keyword"&gt;new&lt;/span&gt; SoapFormatter();&lt;br /&gt;    soapFormatter.Serialize(fileStreamObject, employeeObject);&lt;br /&gt;    fileStreamObject.Close();&lt;br /&gt;}&lt;br /&gt;&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;static&lt;/span&gt; &lt;span&lt;br /&gt;    class="code-keyword"&gt;object&lt;/span&gt; SOAPDeserialize(&lt;span class="code-keyword"&gt;string&lt;/span&gt; filename)&lt;br /&gt;{&lt;br /&gt;    FileStream fileStreamObject = &lt;span class="code-keyword"&gt;new&lt;/span&gt; FileStream(filename, FileMode.Open);&lt;br /&gt;    SoapFormatter soapFormatter = &lt;span class="code-keyword"&gt;new&lt;/span&gt; SoapFormatter();&lt;br /&gt;    &lt;span class="code-keyword"&gt;object&lt;/span&gt; obj = (&lt;span class="code-keyword"&gt;object&lt;/span&gt;)soapFormatter.Deserialize(fileStreamObject);&lt;br /&gt;    fileStreamObject.Close();&lt;br /&gt;    &lt;span class="code-keyword"&gt;return&lt;/span&gt; obj;&lt;br /&gt;}&lt;br /&gt;&lt;span class="code-preprocessor"&gt;#endregion&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            XML Serialization&lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            According to MSDN, "XML serialization converts (serializes) the &lt;code&gt;&lt;span class="code-keyword"&gt;&lt;br /&gt;                public&lt;/span&gt; &lt;/code&gt;fields and properties of an object or the parameters and&lt;br /&gt;            returns values of methods, into an XML stream that conforms to a specific XML Schema&lt;br /&gt;            definition language (XSD) document. XML serialization results in strongly typed&lt;br /&gt;            classes with &lt;code&gt;&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;/code&gt;properties and&lt;br /&gt;            fields that are converted to a serial format (in this case, XML) for storage or&lt;br /&gt;            transport. Because XML is an open standard, the XML stream can be processed by any&lt;br /&gt;            application, as needed, regardless of platform." Implementing XML Serialization&lt;br /&gt;            in .NET is quite simple. The basic class that we need to use is the &lt;code&gt;XmlSerializer&lt;br /&gt;            &lt;/code&gt;for both serialization and de-serialization. The Web Services use the SOAP&lt;br /&gt;            protocol for communication and the return types and the parameters are all serialized&lt;br /&gt;            using the &lt;code&gt;XmlSerializer &lt;/code&gt;class. XML Serialization is however, much slower&lt;br /&gt;            compared to Binary serialization. We can set a property as an XML attribute as shown&lt;br /&gt;            in the code listing below.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;pre id="pre3" lang="cs" style="margin-top: 0px"&gt;&lt;br /&gt;&lt;span class="code-preprocessor"&gt;#region&lt;/span&gt; Xml&lt;br /&gt;&lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; btnXSerialize_Click(&lt;span&lt;br /&gt;    class="code-keyword"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;    Employee emp = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Employee();&lt;br /&gt;    emp.empCode = Convert.ToInt16(txtXEmpCode.Text);&lt;br /&gt;    emp.EmpName = txtXEmpName.Text;&lt;br /&gt;    XMLSerialize(txtXml.Text, emp);&lt;br /&gt;    MessageBox.Show(Xml Serialize Done!&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;);&lt;br /&gt;        } private void btnXDeSerialize_Click(object sender, EventArgs e) { Employee emp&lt;br /&gt;        = new Employee(); emp = (Employee)XMLDeserialize(txtXml.Text); lblXEmpCode.Text&lt;br /&gt;        = Emp Code:"&lt;/span&gt; + Convert.ToString(emp.empCode);&lt;br /&gt;    lblXEmpName.Text = Emp Name:&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;&lt;br /&gt;        + emp.EmpName; } public void XMLSerialize(String filename, Employee emp) { XmlSerializer&lt;br /&gt;        serializer = null; FileStream stream = null; serializer = new XmlSerializer(typeof(Employee));&lt;br /&gt;        stream = new FileStream(filename, FileMode.Create, FileAccess.Write); serializer.Serialize(stream,&lt;br /&gt;        emp); if (stream != null) stream.Close(); } public static Employee XMLDeserialize(String&lt;br /&gt;        filename) { XmlSerializer serializer = null; FileStream stream = null; Employee&lt;br /&gt;        emp = new Employee(); serializer = new XmlSerializer(typeof(Employee)); stream =&lt;br /&gt;        new FileStream(filename, FileMode.Open); emp = (Employee)serializer.Deserialize(stream);&lt;br /&gt;        if (stream != null) stream.Close(); return emp; } #endregion&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            Advantages of XML Serialization&lt;br /&gt;        &lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            The advantages of XML Serialization are as follows:&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;ol&gt;&lt;br /&gt;            &lt;li&gt;XML based &lt;/li&gt;&lt;br /&gt;            &lt;li&gt;Support for cross platforms &lt;/li&gt;&lt;br /&gt;            &lt;li&gt;Easily readable and editable &lt;/li&gt;&lt;br /&gt;        &lt;/ol&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            Working with Formatters&lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            A formatter is used to determine the serialization format for objects. In other&lt;br /&gt;            words, it is used to control the serialization of an object to and from a stream.&lt;br /&gt;            They are the objects that are used to encode and serialize data into an appropriate&lt;br /&gt;            format before they are transmitted over the network. They expose an interface called&lt;br /&gt;            the &lt;code&gt;IFormatter &lt;/code&gt;interface. &lt;code&gt;IFormatter&lt;/code&gt;'s significant methods&lt;br /&gt;            are Serialize and De-serialize which perform the actual serialization and de-serialization.&lt;br /&gt;            There are two formatter classes provided within .NET, the &lt;code&gt;BinaryFormatter &lt;/code&gt;&lt;br /&gt;            and the &lt;code&gt;SoapFormatter&lt;/code&gt;. Both these classes extend the &lt;code&gt;IFormatter &lt;/code&gt;&lt;br /&gt;            interface.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            The Binary Formatter&lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            The Binary formatter provides support for serialization using binary encoding. The&lt;br /&gt;            &lt;code&gt;BinaryFormater &lt;/code&gt;class is responsible for binary serialization and is&lt;br /&gt;            used commonly in .NET's Remoting technology. This class is not appropriate when&lt;br /&gt;            the data is supposed to be transmitted through a firewall.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            The SOAP Formatter&lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            The SOAP formatter provides formatting that can be used to serialize objects using&lt;br /&gt;            the SOAP protocol. It is used to create a Soap envelop and it uses an object graph&lt;br /&gt;            to generate the result. It is responsible for serializing objects into SOAP messages&lt;br /&gt;            or parsing the SOAP messages and extracting these serialized objects from the SOAP&lt;br /&gt;            messages. SOAP formatters in .NET are widely used by the Web Services.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            Points to Remember&lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            This section deals with some of the points that we have already covered in this&lt;br /&gt;            article and some others that we have not, but are still very important and relate&lt;br /&gt;            to the serialization and de-serialization concepts of .NET. When you apply the &lt;code&gt;&lt;br /&gt;                Serializable &lt;/code&gt;custom attribute to a type, all instance fields of the class&lt;br /&gt;            (&lt;code&gt;&lt;span class="code-keyword"&gt;public&lt;/span&gt;&lt;/code&gt;, &lt;code&gt;&lt;span class="code-keyword"&gt;&lt;br /&gt;                private&lt;/span&gt;&lt;/code&gt;, &lt;code&gt;&lt;span class="code-keyword"&gt;protected&lt;/span&gt;&lt;/code&gt;,&lt;br /&gt;            etc.) are serialized automatically. &lt;code&gt;XmlSerializer &lt;/code&gt;does not use the&lt;br /&gt;            &lt;code&gt;ISerializable &lt;/code&gt;interface; rather, it uses the &lt;code&gt;IXmlSerializable &lt;/code&gt;&lt;br /&gt;            interface. The &lt;code&gt;XmlSerializer &lt;/code&gt;class can only serialize the &lt;code&gt;&lt;span&lt;br /&gt;                class="code-keyword"&gt;public&lt;/span&gt; &lt;/code&gt;properties of the class, whereas the&lt;br /&gt;            &lt;code&gt;BinaryFormatter &lt;/code&gt;class can serialize &lt;code&gt;&lt;span class="code-keyword"&gt;private&lt;/span&gt;&lt;br /&gt;            &lt;/code&gt;fields using the &lt;code&gt;ISerializable &lt;/code&gt;interface.&lt;/p&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            The &lt;code&gt;Serializable &lt;/code&gt;attribute is a must for making a class serializable&lt;br /&gt;            irrespective of whether we have implemented the &lt;code&gt;ISerializable &lt;/code&gt;interface&lt;br /&gt;            in this class. When we serialize a class, the objects of the references to other&lt;br /&gt;            classes that are contained in this class are also serialized if they are marked&lt;br /&gt;            as serializable. All members are serialized, including &lt;code&gt;&lt;span class="code-keyword"&gt;&lt;br /&gt;                public&lt;/span&gt;&lt;/code&gt;, &lt;code&gt;&lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;/code&gt;&lt;br /&gt;            or &lt;code&gt;&lt;span class="code-keyword"&gt;protected&lt;/span&gt; &lt;/code&gt;members. Furthermore,&lt;br /&gt;            even circular references are supported by binary serialization. Note that read only&lt;br /&gt;            properties are not serialized except the collection class objects. However, the&lt;br /&gt;            read only properties can be serialized using binary serialization.&lt;/p&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            If we do not require serializing a particular property of a class when using an&lt;br /&gt;            &lt;code&gt;XmlSerializer&lt;/code&gt;, we have to mark the property with the custom attribute&lt;br /&gt;            &lt;code&gt;XmlIgnoreAttribute&lt;/code&gt;. When using a &lt;code&gt;SoapFormatter &lt;/code&gt;we have&lt;br /&gt;            to use the &lt;code&gt;SoapIgnoreAttribute &lt;/code&gt;instead. The &lt;code&gt;XmlSerializer &lt;/code&gt;&lt;br /&gt;            generates an in-memory assembly optimized for each type since the initial invocation&lt;br /&gt;            to a Web Service always takes so much time. To combat this, we can use the &lt;em&gt;sgen.exe&lt;/em&gt;&lt;br /&gt;            tool to pre-generate the serialization assembly.&lt;/p&gt;&lt;br /&gt;        &lt;h2&gt;&lt;br /&gt;            Conclusion&lt;/h2&gt;&lt;br /&gt;        &lt;p&gt;&lt;br /&gt;            Serialization is the process of storing an object, including all of its members,&lt;br /&gt;            to a persistent or a non-persistent storage media by converting the object into&lt;br /&gt;            a linear stream of data. De-serialization is the process of restoring an object's&lt;br /&gt;            values from the said stream. The advantage of serialization is to save the state&lt;br /&gt;            of an object in order to have the ability to recreate the same object at a later&lt;br /&gt;            point of time if and when it is required. The .NET Framework provides a strong support&lt;br /&gt;            for serialization of objects. The .NET Framework provides a unified standard for&lt;br /&gt;            serializing and de-serializing objects for building distributed heterogeneous systems.&lt;br /&gt;            This article has explored Serialization and De-serialization and the various types&lt;br /&gt;            of Serialization concepts with code examples wherever necessary. It has discussed&lt;br /&gt;            what Custom Serialization is and how to implement it. However, I would recommend&lt;br /&gt;            not using serialization unless it is absolutely necessary due to the drawbacks that&lt;br /&gt;            I have already explained in this article.&lt;br /&gt;        &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;reference : &lt;br /&gt;&lt;a href="http://www.codeproject.com/KB/aspnet/Serialization.aspx"&gt;http://www.codeproject.com/KB/aspnet/Serialization.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.developer.com/net/csharp/article.php/3110371"&gt;http://www.developer.com/net/csharp/article.php/3110371&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-1333382625749212602?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/1333382625749212602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=1333382625749212602&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/1333382625749212602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/1333382625749212602'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/06/serialization-and-deserialization-in.html' title='Serialization and Deserialization in .net'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-7784923390453267869</id><published>2009-06-04T05:16:00.001-07:00</published><updated>2009-06-04T05:17:27.927-07:00</updated><title type='text'>ajax tool kit sample url</title><content type='html'>&lt;a href='http://www.asp.net/ajax/AjaxControlToolkit/Samples/'&gt;http://www.asp.net/ajax/AjaxControlToolkit/Samples/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-7784923390453267869?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/7784923390453267869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=7784923390453267869&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/7784923390453267869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/7784923390453267869'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/06/ajax-tool-kit-sample-url.html' title='ajax tool kit sample url'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-6290369397257340837</id><published>2009-05-30T03:24:00.001-07:00</published><updated>2009-05-30T03:24:55.465-07:00</updated><title type='text'>Enum - Enumerator in C#</title><content type='html'>&lt;div&gt; &lt;br /&gt;&lt;input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGSW8FguPPjvo6VCtzmV/Kp/1UV7Yw==" /&gt; &lt;br /&gt;&lt;/div&gt; &lt;br /&gt; &lt;br /&gt;        &lt;span class="Apple-style-span" style="word-spacing: 0px; font: 13px Verdana; text-transform: none;&lt;br /&gt;&lt;br /&gt;            color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal;&lt;br /&gt;&lt;br /&gt;            border-collapse: separate; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 0px;&lt;br /&gt;&lt;br /&gt;            webkit-border-vertical-spacing: 0px; webkit-text-decorations-in-effect: none;&lt;br /&gt;&lt;br /&gt;            webkit-text-size-adjust: auto; webkit-text-stroke-width: 0"&gt; &lt;br /&gt;            &lt;table border="0" cellpadding="0" cellspacing="0" style="z-index: 100; left: 0px;&lt;br /&gt;&lt;br /&gt;                position: absolute; top: 0px"&gt; &lt;br /&gt;                &lt;tr&gt; &lt;br /&gt;                    &lt;td colspan="2" style="font-size: 10pt; color: black; font-family: Verdana, arial, helvetica, sans-serif"&lt;br /&gt;&lt;br /&gt;                        valign="top" width="100%"&gt; &lt;br /&gt;                        &lt;h1 style="font-weight: normal; font-size: 160%; color: rgb(255,0,0); font-style: normal;&lt;br /&gt;&lt;br /&gt;                            font-family: Verdana, arial, helvetica, sans-serif; text-align: left; text-decoration: none"&gt; &lt;br /&gt;                            Enumerators in C#&lt;/h1&gt; &lt;br /&gt;                    &lt;/td&gt; &lt;br /&gt;                &lt;/tr&gt; &lt;br /&gt;                &lt;tr&gt; &lt;br /&gt;                    &lt;td colspan="2" height="1" style="font-size: 10pt; color: black; font-family: Verdana, arial, helvetica, sans-serif"&lt;br /&gt;&lt;br /&gt;                        valign="top"&gt; &lt;br /&gt;                        &lt;hr color="#c0c0c0" noshade="noshade" size="1" /&gt; &lt;br /&gt;                    &lt;/td&gt; &lt;br /&gt;                &lt;/tr&gt; &lt;br /&gt;                &lt;tr&gt; &lt;br /&gt;                    &lt;td style="font-size: 10pt; color: black; font-family: Verdana, arial, helvetica, sans-serif"&lt;br /&gt;&lt;br /&gt;                        valign="top"&gt; &lt;br /&gt;                        Enumerators can be used to store lists of value types with set values, much like&lt;br /&gt;                        constants. For example, a C# constant could be defined using the statement below:&lt;font&lt;br /&gt;&lt;br /&gt;                            color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;p&gt; &lt;br /&gt;                                &lt;font color="#0000ff" size="2"&gt;const&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                                &lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                                &lt;/span&gt;EngineCapacity = 1000;&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            If there was more than one engine capacity, then a range of constants could be defined,&lt;br /&gt;                            such as:&lt;/p&gt; &lt;br /&gt;                        &lt;font color="#0000ff" size="2"&gt;&lt;/font&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            &lt;font color="#0000ff" size="2"&gt;const&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                            &lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                            &lt;/span&gt;EngineCapacitySmall = 600;&lt;br /&gt; &lt;br /&gt;                                &lt;font color="#0000ff" size="2"&gt;const&lt;/font&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                                &lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                                EngineCapacityMedium = 1000;&lt;br /&gt; &lt;br /&gt;                                &lt;font color="#0000ff" size="2"&gt;const&lt;/font&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                                &lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                                EngineCapacityLarge = 1200;&lt;br /&gt; &lt;br /&gt;                                &lt;font color="#0000ff" size="2"&gt;const&lt;/font&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                                &lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                                EngineCapacityExtraLarge = 1800;&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;                        &lt;font size="2"&gt;&lt;/font&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            If even more constants were needed then this list could get pretty large, so it&lt;br /&gt;                            would be more convenient to group them into a single enumerator, by using syntax&lt;br /&gt;                            such as that shown below:&lt;/p&gt; &lt;br /&gt;                        &lt;font color="#808080" size="2"&gt;&lt;/font&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            &lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                            &lt;/span&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt; &lt;br /&gt;                                ///&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                                    Engine capacity enumerator&lt;br /&gt; &lt;br /&gt;                                &lt;/font&gt;&lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;span&lt;br /&gt;&lt;br /&gt;                                    class="Apple-converted-space"&gt; &lt;/span&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt; &lt;br /&gt;                                    &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;enum&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                                    &lt;/span&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;EngineCapacity&lt;/font&gt;&lt;font size="2"&gt;&lt;span&lt;br /&gt;&lt;br /&gt;                                        class="Apple-converted-space"&gt; &lt;/span&gt;:&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                                    &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;br /&gt; &lt;br /&gt;                                    &lt;/font&gt;&lt;font size="2"&gt;{&lt;br /&gt; &lt;br /&gt;                                        &amp;nbsp; Small = 600,&lt;br /&gt; &lt;br /&gt;                                        &amp;nbsp; Medium = 1000,&lt;br /&gt; &lt;br /&gt;                                        &amp;nbsp; Large = 1200,&lt;br /&gt; &lt;br /&gt;                                        &amp;nbsp; ExtraLarge = 1800&lt;br /&gt; &lt;br /&gt;                                        }&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;                        &lt;font size="2"&gt;&lt;/font&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            Each enumerator is assigned a name (in this case it is&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                            &lt;/span&gt;&lt;em&gt;EngineCapacity&lt;/em&gt;) and an optional data type. Here, the EngineCapacity&lt;br /&gt;                            enumerator is assigned a type of&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;em&gt;int&lt;/em&gt;,&lt;br /&gt;                            although being the default data type for enumerators it does not need to be specified&lt;br /&gt;                            - the following code will also work:&lt;/p&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            &lt;font color="#0000ff" size="2"&gt;enum&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                            &lt;/span&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;EngineCapacity&lt;/font&gt;&lt;font size="2"&gt;&lt;span&lt;br /&gt;&lt;br /&gt;                                class="Apple-converted-space"&gt; &lt;/span&gt;:&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                            &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;br /&gt; &lt;br /&gt;                            &lt;/font&gt;&lt;font size="2"&gt;{&lt;br /&gt; &lt;br /&gt;                                &amp;nbsp; Small = 600,&lt;br /&gt; &lt;br /&gt;                                &amp;nbsp; Medium = 1000,&lt;br /&gt; &lt;br /&gt;                                &amp;nbsp; Large = 1200,&lt;br /&gt; &lt;br /&gt;                                &amp;nbsp; ExtraLarge = 1800&lt;br /&gt; &lt;br /&gt;                                }&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            &lt;font size="2"&gt;A value for the enumerator's type does not need to be specified - if&lt;br /&gt;                                it is not then the value of a type is incremented by one from the previous type&lt;br /&gt;                                (taking 0 as the first value). So in the example below, the small engine capacity&lt;br /&gt;                                will be 0 and the large engine capacity value will be 1001:&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            &lt;font color="#0000ff" size="2"&gt;enum&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                            &lt;/span&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;EngineCapacity&lt;/font&gt;&lt;font size="2"&gt;&lt;span&lt;br /&gt;&lt;br /&gt;                                class="Apple-converted-space"&gt; &lt;/span&gt;:&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                            &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;br /&gt; &lt;br /&gt;                            &lt;/font&gt;&lt;font size="2"&gt;{&lt;br /&gt; &lt;br /&gt;                                &amp;nbsp; Small,&lt;br /&gt; &lt;br /&gt;                                &amp;nbsp; Medium = 1000,&lt;br /&gt; &lt;br /&gt;                                &amp;nbsp; Large,&lt;br /&gt; &lt;br /&gt;                                &amp;nbsp; ExtraLarge = 1800&lt;br /&gt; &lt;br /&gt;                                }&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;                        &lt;h2 style="font-weight: normal; font-size: 140%; color: rgb(255,0,0); font-style: normal;&lt;br /&gt;&lt;br /&gt;                            font-family: Verdana, arial, helvetica, sans-serif; text-align: left; text-decoration: none"&gt; &lt;br /&gt;                            Using the enumerator&lt;/h2&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            Once the enumerator has been assigned it may be used in instances such as that shown&lt;br /&gt;                            below:&lt;/p&gt; &lt;br /&gt;                        &lt;font color="#0000ff" size="2"&gt;&lt;/font&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            &lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                            &lt;/span&gt;RequiredCapacity = 1000;&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;                        &lt;font size="2"&gt;&lt;/font&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            &lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                            &lt;/span&gt;(RequiredCapacity == (&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;font&lt;br /&gt;&lt;br /&gt;                                size="2"&gt;)&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;/font&gt;&lt;font color="#2b91af"&lt;br /&gt;&lt;br /&gt;                                    size="2"&gt;EngineCapacity&lt;/font&gt;&lt;font size="2"&gt;.ExtraLarge)&lt;br /&gt; &lt;br /&gt;                                        {&lt;br /&gt; &lt;br /&gt;                                        &lt;font color="#008000"&gt;&amp;nbsp;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;/font&gt;&lt;font&lt;br /&gt;&lt;br /&gt;                                            color="#008000" size="2"&gt;//Check customer has the required maintenance contract&lt;br /&gt; &lt;br /&gt;                                        &lt;/font&gt;&lt;font color="#008000"&gt;&amp;nbsp;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;/font&gt; &lt;br /&gt;                                        &lt;font color="#008000" size="2"&gt;//for the largest engine type&lt;br /&gt; &lt;br /&gt;                                        &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;nbsp;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;/font&gt; &lt;br /&gt;                                        &lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                                        (CheckCustomerHasMaintenenceContract() ==&lt;span class="Apple-converted-space"&gt; &lt;/span&gt; &lt;br /&gt;                                        &lt;font color="#0000ff" size="2"&gt;false&lt;/font&gt;)&lt;br /&gt; &lt;br /&gt;                                        &amp;nbsp; &amp;nbsp; {&lt;br /&gt; &lt;br /&gt;                                        &lt;font color="#0000ff"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-converted-space"&gt; &lt;br /&gt;                                        &lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;return&lt;/font&gt;;&lt;br /&gt; &lt;br /&gt;                                        &amp;nbsp; &amp;nbsp; }&lt;br /&gt; &lt;br /&gt;                                        }&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;                        &lt;font size="2"&gt;&lt;/font&gt; &lt;br /&gt;                        &lt;p&gt; &lt;br /&gt;                            Note that Visual Studio understands enumerators, and will usefully include their&lt;br /&gt;                            value types in the intellisense for that enumerator.&lt;/p&gt; &lt;br /&gt;                    &lt;/td&gt; &lt;br /&gt;                &lt;/tr&gt; &lt;br /&gt;            &lt;/table&gt; &lt;br /&gt;        &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-6290369397257340837?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/6290369397257340837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=6290369397257340837&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6290369397257340837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6290369397257340837'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/05/enum-enumerator-in-c.html' title='Enum - Enumerator in C#'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-8337637023448556476</id><published>2009-05-26T01:45:00.001-07:00</published><updated>2009-05-26T01:46:36.944-07:00</updated><title type='text'>federal bank</title><content type='html'>&lt;a href="http://www.federalbank.co.in/Careers/jobssep2007/index.htm"&gt;http://www.federalbank.co.in/Careers/jobssep2007/index.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-8337637023448556476?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/8337637023448556476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=8337637023448556476&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8337637023448556476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8337637023448556476'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/05/federal-bank.html' title='federal bank'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-8559722592779361100</id><published>2009-05-22T03:40:00.000-07:00</published><updated>2009-05-22T04:04:17.773-07:00</updated><title type='text'>Regular Express Tutorial.</title><content type='html'>This list of regular expression examples serves several purposes.&lt;br /&gt;Library of useful expressions which you can include in your code&lt;br /&gt;Examples of well written expressions&lt;br /&gt;For advanced examples, see Advanced Regular Expression Examples You can also find some regular expressions on Regular Expressions and Bag of algorithms pages.&lt;br /&gt;Here's a good source-book for useful regular expressions for programmers: http://www.regular-expressions.info/examplesprogrammer.html&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Simple examples demonstrating the [ regexp ] command&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The regexp command has syntax:&lt;br /&gt;    regexp ?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?&lt;br /&gt;If matchVar is specified, its value will be only the part of the string that was matched by the exp. As an example:&lt;br /&gt;    regexp {c.*g} "abcdefghi" matched&lt;br /&gt;    puts $matched       ;# ==&gt; cdefg&lt;br /&gt;If any subMatchVars are specified, their values will be the part of the string that were matched by parenthesized bits in the exp, counting open parentheses from left to right. For example:&lt;br /&gt;    regexp {c((.*)g)(.*)} "abcdefghi" matched sub1 sub2 sub3&lt;br /&gt;    puts $matched       ;# ==&gt; cdefghi&lt;br /&gt;    puts $sub1          ;# ==&gt; defg&lt;br /&gt;    puts $sub2          ;# ==&gt; def&lt;br /&gt;    puts $sub3          ;# ==&gt; hi&lt;br /&gt;Many times, people only care about the subMatchVars and want to ignore matchVar. They use a "dummy" variable as a placeholder in the command for the matchVar. You will often see things like&lt;br /&gt;    regexp $exp $string -&gt; sub1 sub2&lt;br /&gt;where ${-&gt;} holds the matched part. It is a sneaky but legal Tcl variable name.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Splitting a String Into Words&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;"How do I split an arbitrary string into words?" is a frequently asked question. If you use [split $string " "], then multiple spaces will produce a list with empty elements. If you try to use [foreach] or [lindex] or some other list operation, then you must be sure that the string is a well-formed list. (Braces could cause problems.) So use a regular expression like this very simple shorthand for non-space characters.&lt;br /&gt;  {\S+}&lt;br /&gt;You can even split a string of text with arbitrary spaces and special characters into a list of words by using [regexp]s -inline and -all switches.&lt;br /&gt;  set text "Some arbitrary text which might include \$ or {"&lt;br /&gt;  set wordList [regexp -inline -all -- {\S+} $text]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Floating Point Number&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This expression includes options for leading +/- character, digits, decimal points, and a trailing exponent. Note the use of nearly duplicate expressions joined with the or operator "|" to permit the decimal point to lead or follow digits. This was posted to comp.lang.tcl by Roland B. Roberts.&lt;br /&gt; {[-+]?([0-9]+\.?[0-9]*|\.[0-9]+)([eE][-+]?[0-9]+)?}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Letters&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Thanks to Brent Welch for these examples, showing the difference between a traditional character matching and "the Unicode way."&lt;br /&gt; {^[A-Za-z]+$}   Only letters.&lt;br /&gt;&lt;br /&gt;  {^[[:alpha:]]+$} Only letters, the Unicode way.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Special Characters&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Thanks again to Brent Welch for these two examples.&lt;br /&gt; {[][${}\\]} The set of Tcl special characters: ] [ $ { } \&lt;br /&gt;&lt;br /&gt; {[][$^?+*()|\\]} The set of regular expression special characters: ] [ $ ^ ? + * ( ) | \&lt;br /&gt;I don't understand these examples. Why have [, ], and then the rest of the characters inside a [] - that just makes the string have [ and ] there twice, right?&lt;br /&gt;LV: the first regular expression should be seen like this:&lt;br /&gt; { ... } - protect the 9 inner characters&lt;br /&gt;  [ ... ] - these two define a set of characters to process&lt;br /&gt;   ] - if your set of characters is going to include the right bracket character (]) as a specific matching character, then it needs to be first in the set/class definition.&lt;br /&gt;   [${} - these are more individual characters&lt;br /&gt;   \\ - this is doubled because when regexp goes to evaluate the characters, it would otherwise treat a single backslash (\) as a request to quote the next character, the ending right bracket of the set/class.&lt;br /&gt;The second regular expresesion is interpreted in a similar fashion. There are more characters because there are more metacharacters.&lt;br /&gt;Also, not all characters are there - where are the period, equals, bang (exclamation sign), dash, colon, alphas that are a part of character entry escapes or classes, 0, hash/pound sign, and angle brackets (&lt; and &gt;)? These special characters all have meta meanings within regular expressions...&lt;br /&gt;LV Apparently no one has come along and updated the above expression to cover these.&lt;br /&gt;Example posted by KC:&lt;br /&gt;     {[\&lt;\&gt;]} - defines a set containing both angle brackets&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;IP Numbers&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can create a regular expression to check an IP address for correct syntax. Note that this regular expression only checks for groups of 1-3 digits separated by periods. If you want to ensure that the digit groups are from 0-255, or that you have a valid IP address, you'll have to do additional (non regexp) work. This code posted to comp.lang.tcl by George Peter Staplin&lt;br /&gt;  set str 66.70.7.154&lt;br /&gt;&lt;br /&gt;  regexp "(\[0-9]{1,3})\.(\[0-9]{1,3})\.(\[0-9]{1,3})\.(\[0-9]{1,3})" $str all first second third fourth&lt;br /&gt;&lt;br /&gt;  puts "$all \n $first \n $second \n $third \n $fourth \n"&lt;br /&gt;The above regular expression matches any string where there are four groups of 1-3 digits separated by periods. Since it's not anchored to the start and end of the string (with ^ and $) it will match any string that contains four groups of 1-3 digits separated by periods, such as: "66.70.7.154.9".&lt;br /&gt;If you don't mind a longer regexp, there is no reason you can't ensure that each group of 1-3 digits is in the range of 0-255. For example (broken up a bit to make it more readable):&lt;br /&gt;    set octet {(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])}&lt;br /&gt;    set RE "^[join [list $octet $octet $octet $octet] {\.}]\$"&lt;br /&gt;    regexp $RE $str all first second third fourth ;# Michael A. Cleverly&lt;br /&gt;recently on comp.lang.tcl, someone mentioned that http://www.oreilly.com/catalog/regex/chapter/ch04.html#Be_Specific talks about matching IP addresses.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Domain names&lt;/span&gt; First shot&lt;br /&gt;&lt;br /&gt; ^[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)?$&lt;br /&gt;This code does NOT attempt, obviously, to ensure that the last level of the regular expression matches a known domain...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;E-mail addresses:&lt;/span&gt; No warranty, just a first shot:&lt;br /&gt; {^[A-Za-z0-9._-]+@[[A-Za-z0-9.-]+$} ;# RS&lt;br /&gt;&lt;br /&gt;Understand that this expression is an attempt to see if a string has a format that is compatible with normal RFC SMTP email address formats. It does not attempt to see whether the email address is correct. Also, it does not account for comments embedded within email addresses, which are defined even though seldom used.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;XML-like data&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To match something similar to XML-tags you can use regular-expressions, too. Let's assume we have this text:&lt;br /&gt;  % set text {&lt;bo&gt;s&lt;/bo&gt;&lt;it&gt;&lt;bo&gt;M&lt;/bo&gt;&lt;/it&gt;}&lt;br /&gt;We can match the body of bo with this regexp:&lt;br /&gt;  % regexp "&lt;(bo)&gt;(.*?)&lt;/bo&gt;" $text dummy tag body&lt;br /&gt;Now we extend our XML-text with some attributes for the tags, say:&lt;br /&gt;  % set text2 {&lt;bo h="m"&gt;s&lt;/bo&gt;&lt;it&gt;&lt;bo&gt;M&lt;/bo&gt;&lt;/it&gt;}&lt;br /&gt;If we try to match this with:&lt;br /&gt;  % regexp "&lt;(bo)\\s+(.+?)&gt;(.*?)&lt;/bo&gt;" $text2 dummy tag attributes body&lt;br /&gt;it won't work anymore. This is because \\s+ is greedy (in contrary to the non-greedy (.+?) and (.*?)) and that (the one greedy-operator) makes the whole expression greedy. (Refer to this [1] Sept. 1999 posting from Henry Spenter to c.l.t.)&lt;br /&gt;The correct way is:&lt;br /&gt;  % regexp "&lt;(bo)\\s+?(.+?)&gt;(.*?)&lt;/bo&gt;" $text2 dummy tag attributes body&lt;br /&gt;Now we can write a more general XML-to-whatever-translater like this:&lt;br /&gt;Substitute [ and ] with their corresponding [and] to avoid confusion with "subst" in 3.&lt;br /&gt;Substitute the tags and attributes with commands&lt;br /&gt;Do a "subst" on the whole text, thereby calling the inserted commands&lt;br /&gt;  proc xml2whatever {text userCallback} {&lt;br /&gt;    set text [string map {[ [ ] ]} $text]&lt;br /&gt;    # replace all tags with a call to userCallback&lt;br /&gt;    # this has to be done multiple times, because of nested tags&lt;br /&gt;    # match each tag (everything not space after &lt;)&lt;br /&gt;    # and all the attributes (everything behind the tag until &gt;)&lt;br /&gt;    # than match body and the end-tag (which should be the same as the&lt;br /&gt;    # first matched one (\1))&lt;br /&gt;    while {[regsub -all {&lt;(\S+?)(.*?)&gt;(.*?)&lt;/\1&gt;} $text "\[[list $userCallback \\1 \\2 \\3]\]" text]} {&lt;br /&gt;      # do nothing&lt;br /&gt;    }&lt;br /&gt;    return [subst -novariables -nobackslashes $text]&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  # is called from xml2whatever with&lt;br /&gt;  # element: the xml-element&lt;br /&gt;  # attributes: the attributes of xml-element&lt;br /&gt;  # body: body of xml-element&lt;br /&gt;  proc myTranslate {element attributes body} {&lt;br /&gt;    # map bo - b; it - i (leave rest alone)&lt;br /&gt;    # do a subst for the body, because of possible nested tags&lt;br /&gt;    switch -- $element {&lt;br /&gt;      bo { return "&lt;b&gt;[subst -novariables -nobackslashes $body]&lt;/b&gt;"}&lt;br /&gt;      it { return "&lt;i&gt;[subst -novariables -nobackslashes $body]&lt;/i&gt;"}&lt;br /&gt;      default { return "&lt;$element$attributes&gt;[subst -novariables -nobackslashes $body]&lt;/$element&gt;" }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;Call the parser with:&lt;br /&gt;  % xml2whatever $text2 myTranslate&lt;br /&gt;You have to be careful, though. Don't do this for large texts or texts with many nested xml-tags because the regular-expression-machine is not the the right tool to parse large,nested files efficiently. (Stefan Vogel)&lt;br /&gt;DKF - I agree with that last point. If you are really dealing with XML, it is better to use a proper tool like TclDOM or tDOM.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Negated string:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Bruce Hartweg wrote in comp.lang.tcl: You can't negate a regexp, but you CAN negate a regexp that is only a simple string. Logically, it's the follow ing:&lt;br /&gt;match any single char except first letter in the string.&lt;br /&gt;match the first char in string if followed by any letter except the 2nd&lt;br /&gt;match the first two if followed by any but the third, et cetera&lt;br /&gt;Then the only thing more is to allow a partial match of the string at end of line. So for a regexp that matches&lt;br /&gt; any line that DOES NOT have the word ''foo'':&lt;br /&gt;&lt;br /&gt; set exp {^([^f]|f[^o]|fo[^o])*.{0,2}$}&lt;br /&gt;The following proc will build the expression for any given string&lt;br /&gt; proc reg_negate {str} {&lt;br /&gt;    set partial ""&lt;br /&gt;    set branches [list]&lt;br /&gt;    foreach c [split $str ""] {&lt;br /&gt;        lappend branches [format {%s[^%s]} $partial $c]&lt;br /&gt;        append partial $c&lt;br /&gt;    }&lt;br /&gt;    set exp [format {^(%s)*.{0,%d}$} [join $branches "|"] \&lt;br /&gt;        [expr [string length $str] -1]]&lt;br /&gt;}&lt;br /&gt;Donal Fellows followed up with:&lt;br /&gt;That's just set me thinking; you can do this by specifying that the whole string must be either not the character of the antimatch*, or the first character of the antimatch so long as it is not followed by the rest of the antimatch. This leads to a fairly simply expressed pattern.&lt;br /&gt;  set exp {^(?:[^f]|f(?!oo))*$}&lt;br /&gt;In fact, this allows us to strengthen what you say above to allow the matching of any negated regexp directly so long as the first component of the antimatch is a literal, and the rest of the antimatch is expressible in an ERE lookahead constraint (which imposes a number of restrictions, but still allows for some fairly sophisticated patterns.)&lt;br /&gt;* Anything's better than overloading 'string' here!&lt;br /&gt;JMN 2005-12-22 Could someone please explain what is meant by a 'negated string' here? Specifically - what do the above achieve that isn't satisfied by the simpler:&lt;br /&gt; set exp {^(?!(.*foo.*))}&lt;br /&gt;Doesn't the following snippet from the regexp manpage indicate that a regexp can be negated? where does(or did?) the 'simple string' requirement come in? - is this info no longer current?&lt;br /&gt; (?!re)&lt;br /&gt; negative lookahead (AREs only), matches at any point where no substring matching re begins&lt;br /&gt;Lars H: It indeed seems the entire problem is rather trivial. In Tcl 7 (before AREs) one sometimes had to do funny tricks like the ones Bruce Hartweg performs above, but his use of {0,2} means he must be assuming AREs. Perhaps there was a transitory period where one was available but not the other.&lt;br /&gt;VisualRegExp is a good way to learn about REs.&lt;br /&gt;Visual Regexp is a terrific way to learn about REs.&lt;br /&gt;Redet is another tool for learning about and working with REs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Turn a string into %hex-escaped (url encoded) characters:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; e.g. Csan -&gt; %43%73%61%6E&lt;br /&gt;&lt;br /&gt; regsub -all -- {(.)} $string {%[format "%02lX" [scan \1 "%c"]]} new_string&lt;br /&gt; subst $new_string&lt;br /&gt;This demonstrates the power of using regsub together with subst, which is regarded as one of the most powerful ways to use regular expressions in Tcl.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Turn a string into %hex-escaped (url encoded) characters (part 2)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This one makes the result more readable and still quite safe to use in URLs e.g. http://wiki.tcl.tk -&gt; http%3A%2F%2Fwiki%2Etcl%2Etk&lt;br /&gt; regsub -all -- {([^A-Za-z0-9_-])} $string {%[format "%02lX" [scan \1 "%c"]]} new_string&lt;br /&gt; subst $new_string&lt;br /&gt;nl&lt;br /&gt;Joe Mistachkin&lt;br /&gt;The inverse of the above (not optimized):&lt;br /&gt; regsub -all -- {%([0123456789ABCDEF][0123456789ABCDEF])} $string {[format "%c" 0x\1]} new_string&lt;br /&gt; subst $new_string&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Caveats about using [regsub] with [subst]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;glennj 20081216: It can be dangerous to blindly apply [subst] to the results of [regsub], particularly if you have not validated the input string. Here's an example that's not too contrived:&lt;br /&gt; set string {[some malicious command]}&lt;br /&gt; regsub -all {\w+} $string {[string totitle &amp;]} result&lt;br /&gt; subst $result&lt;br /&gt;This results in "invalid command name "Some"". What if $string was {[exec format c:]}?&lt;br /&gt;See DKF's "proc regsub-eval" contribution in regsub to properly prepare the input string for substitution. Paraphrased:&lt;br /&gt; set string {[some malicious command]}&lt;br /&gt; set escaped [string map {\[ \\[ \] \\] \$ \\$ \\ \\\\} $string]&lt;br /&gt; regsub -all {\w+} $escaped {[string totitle &amp;]} result&lt;br /&gt; subst $result&lt;br /&gt;which results in what you'd expect: the string "[Some Malicious Command]"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Maintain proper spacing when formatting for HTML&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;DG got this from Kevin Kenny on c.l.t.&lt;br /&gt; regsub -all { (?= )} $line {\&amp;nbsp;} line&lt;br /&gt;&lt;br /&gt; set line {this is an    example}&lt;br /&gt; regsub -all { (?= )} $line {\&amp;nbsp;} line&lt;br /&gt; set line&lt;br /&gt; this is an&amp;nbsp;&amp;nbsp;&amp;nbsp; example&lt;br /&gt;And tabs require replacement, too:&lt;br /&gt; set tabFill "[string repeat \\&amp;nbsp\; 7] "&lt;br /&gt; regsub -all {\t} $line $tabFill line&lt;br /&gt;glennj taken from comp.lang.perl.misc, transform variable names into StudlyCapsNames:&lt;br /&gt; set old_vars {VARIABLE_ONE VARIABLE_NUMBER_TWO a_really_long_VARIABLE_name}&lt;br /&gt; set NewVars {}&lt;br /&gt; foreach v $old_vars {&lt;br /&gt;    regsub -all {_?(.)([^_]*)} $v {[string toupper "\1"][string tolower "\2"]} new&lt;br /&gt;    lappend NewVars [subst $new]&lt;br /&gt; }&lt;br /&gt;When using [ASED]'s syntax checker you get an error of you don't insert " -- " after "regexp". Instead of "regexp {([^A-Za-z0-9_-])} $string" you have to write "regexp -- {([^A-Za-z0-9_-])} $string"&lt;br /&gt;LV A user recently asked:&lt;br /&gt;I have a string that I'm trying to parse. Why doesn't this seem to work?&lt;br /&gt; % set str {Acc No: 12345}&lt;br /&gt; % set num [regexp {.*?(\d+).*} $str junk result]&lt;br /&gt; % puts $result&lt;br /&gt; 1&lt;br /&gt;It looks to me like the *? causes the subsequent \d+ to also be greedy and only match the first hit. Did I figure that out correctly? I presume that we currently don't have a way to turn off the greediness item?&lt;br /&gt;Of course, in this simplified problem, one could just drop the greediness and code&lt;br /&gt; % set num [regexp {(\d+)} $str junk result]&lt;br /&gt; % puts $result&lt;br /&gt; 12345&lt;br /&gt;I'll let the user decide if that suffices.&lt;br /&gt;How do you select from two words?&lt;br /&gt; % set word "foo"&lt;br /&gt; % set result [regexp {(foo|bar)} match zzz]&lt;br /&gt; % set zzz&lt;br /&gt; can't read "zzz": no such variable&lt;br /&gt; ???&lt;br /&gt;LES: You got the regexp syntax wrong and tried to match the regular expression with the string "match". There is no "zzz" variable (the actual match variable in your code) because your regular expression does not match the string "match". Try this:&lt;br /&gt; % set word "foo"&lt;br /&gt; % set result [regexp {(foo|bar)} $word match zzz]&lt;br /&gt; % set match&lt;br /&gt;Note that I could have dropped the "zzz" variable, but left it there as a second match variable, as an exercise to you. You should understand why and what it does if you read the regexp page and assimilate the syntax.&lt;br /&gt;RUJ: Could you match the following pattern of following string: infinite spaces at start and end.&lt;br /&gt; % set str "  sjkhf sdhj   "&lt;br /&gt;LV try&lt;br /&gt;   set rest [regexp {^ +.* +$} $str match]&lt;br /&gt;   puts $rest&lt;br /&gt;which should have a value of 1 (in other words, it matched). Of course, if those leading and trailing spaces are optional, then change the + to a *.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;reference:&lt;/span&gt;&lt;br /&gt;http://regexlib.com/DisplayPatterns.aspx?cattabindex=2&amp;categoryId=3&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-8559722592779361100?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/8559722592779361100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=8559722592779361100&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8559722592779361100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8559722592779361100'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/05/regular-express-tutorial.html' title='Regular Express Tutorial.'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-8859435885347096174</id><published>2009-05-22T02:47:00.000-07:00</published><updated>2009-05-22T02:53:53.949-07:00</updated><title type='text'>Converting Datetime column type to any Datetime formats in Sql Server from Query</title><content type='html'>&lt;span style="font-weight:bold;"&gt;What are the valid styles for converting datetime to string?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I wrote this little table and procedure to help me remember what style 112 did, or how to get HH:MM AM/PM out of a DATETIME column. Basically, it populates a table with the valid style numbers, then loops through those, and produces the result (and the syntax for producing that result) for each style, given the current date and time. &lt;br /&gt; &lt;br /&gt;Yes, it uses a cursor. This is designed to be a helper function, not something you would use as part of a production environment, so I don't think the performance implications should be a big concern. But if you have  &lt;br /&gt; &lt;br /&gt;USE tempdb; &lt;br /&gt;GO &lt;br /&gt; &lt;br /&gt;CREATE PROCEDURE dbo.help_DateTimeFormats &lt;br /&gt;    @styleID TINYINT = NULL &lt;br /&gt;AS &lt;br /&gt;BEGIN &lt;br /&gt;    SET NOCOUNT ON; &lt;br /&gt;     &lt;br /&gt;    IF OBJECTPROPERTY &lt;br /&gt;    ( &lt;br /&gt;        OBJECT_ID('dbo.DateTimeFormats'), &lt;br /&gt;        'IsUserTable' &lt;br /&gt;    ) = 1 &lt;br /&gt;    BEGIN &lt;br /&gt;        DROP TABLE dbo.DateTimeFormats; &lt;br /&gt;    END &lt;br /&gt; &lt;br /&gt;    CREATE TABLE dbo.DateTimeFormats  &lt;br /&gt;    (  &lt;br /&gt;        styleID TINYINT PRIMARY KEY,  &lt;br /&gt;        outputLength TINYINT, &lt;br /&gt;        outputSyntax VARCHAR(64), &lt;br /&gt;        outputSample VARCHAR(255) &lt;br /&gt;    ); &lt;br /&gt;     &lt;br /&gt;    INSERT dbo.DateTimeFormats(styleID, outputLength) &lt;br /&gt;        SELECT style = 0, outputLength = 19 &lt;br /&gt;        UNION SELECT 1, 8  &lt;br /&gt;        UNION SELECT 2, 8  &lt;br /&gt;        UNION SELECT 3, 8  &lt;br /&gt;        UNION SELECT 4, 8  &lt;br /&gt;        UNION SELECT 5, 8  &lt;br /&gt;        UNION SELECT 6, 9  &lt;br /&gt;        UNION SELECT 7, 10  &lt;br /&gt;        UNION SELECT 8, 8  &lt;br /&gt;        UNION SELECT 9, 26  &lt;br /&gt;        UNION SELECT 10, 8  &lt;br /&gt;        UNION SELECT 11, 8  &lt;br /&gt;        UNION SELECT 12, 6  &lt;br /&gt;        UNION SELECT 13, 24  &lt;br /&gt;        UNION SELECT 14, 12  &lt;br /&gt;        UNION SELECT 20, 19  &lt;br /&gt;        UNION SELECT 21, 23  &lt;br /&gt;        UNION SELECT 22, 20  &lt;br /&gt;        UNION SELECT 23, 10  &lt;br /&gt;        UNION SELECT 24, 8  &lt;br /&gt;        UNION SELECT 25, 23  &lt;br /&gt;        UNION SELECT 100, 19  &lt;br /&gt;        UNION SELECT 101, 10  &lt;br /&gt;        UNION SELECT 102, 10  &lt;br /&gt;        UNION SELECT 103, 10  &lt;br /&gt;        UNION SELECT 104, 10  &lt;br /&gt;        UNION SELECT 105, 10  &lt;br /&gt;        UNION SELECT 106, 11  &lt;br /&gt;        UNION SELECT 107, 12  &lt;br /&gt;        UNION SELECT 108, 8  &lt;br /&gt;        UNION SELECT 109, 26  &lt;br /&gt;        UNION SELECT 110, 10  &lt;br /&gt;        UNION SELECT 111, 10  &lt;br /&gt;        UNION SELECT 112, 8  &lt;br /&gt;        UNION SELECT 113, 24  &lt;br /&gt;        UNION SELECT 114, 12  &lt;br /&gt;        UNION SELECT 120, 19  &lt;br /&gt;        UNION SELECT 121, 23 &lt;br /&gt;        UNION SELECT 126, 23 &lt;br /&gt;        UNION SELECT 130, 32 &lt;br /&gt;        UNION SELECT 131, 25; &lt;br /&gt; &lt;br /&gt;    IF CHARINDEX('SQL Server 2005', @@VERSION) &gt; 0  &lt;br /&gt;        INSERT dbo.DateTimeFormats(styleID, outputLength) &lt;br /&gt;            SELECT 127, 23; -- 127 is new in 2005 &lt;br /&gt; &lt;br /&gt;    UPDATE dbo.DateTimeFormats  &lt;br /&gt;        SET outputSyntax = 'CONVERT(CHAR(' &lt;br /&gt;            + RTRIM(outputLength) + '), CURRENT_TIMESTAMP, ' &lt;br /&gt;            + RTRIM(styleID) + ')'; &lt;br /&gt; &lt;br /&gt;    DECLARE &lt;br /&gt;        @sql VARCHAR(1024), &lt;br /&gt;        @style TINYINT, &lt;br /&gt;        @syntax VARCHAR(64); &lt;br /&gt; &lt;br /&gt;    DECLARE c CURSOR &lt;br /&gt;        LOCAL FORWARD_ONLY STATIC READ_ONLY FOR  &lt;br /&gt;        SELECT styleID, outputSyntax  &lt;br /&gt;            FROM dbo.DateTimeFormats; &lt;br /&gt;             &lt;br /&gt;    OPEN c; FETCH NEXT FROM c INTO @style, @syntax; &lt;br /&gt; &lt;br /&gt;    WHILE (@@FETCH_STATUS = 0) &lt;br /&gt;    BEGIN &lt;br /&gt;        SET @sql = 'UPDATE dbo.DateTimeFormats &lt;br /&gt;            SET outputSample = ' + @syntax + ' &lt;br /&gt;            WHERE styleID = ' + RTRIM(@style) + ';'; &lt;br /&gt;             &lt;br /&gt;        EXEC(@sql); &lt;br /&gt;         &lt;br /&gt;        FETCH NEXT FROM c INTO @style, @syntax; &lt;br /&gt;    END &lt;br /&gt; &lt;br /&gt;    CLOSE c; DEALLOCATE c; &lt;br /&gt; &lt;br /&gt;    SELECT &lt;br /&gt;        styleID, &lt;br /&gt;        outputSample, &lt;br /&gt;        outputSyntax &lt;br /&gt;    FROM &lt;br /&gt;        dbo.DateTimeFormats &lt;br /&gt;    WHERE &lt;br /&gt;        styleID = COALESCE(@styleID, styleID);  &lt;br /&gt; &lt;br /&gt;    DROP TABLE dbo.DateTimeFormats;  &lt;br /&gt;END &lt;br /&gt;GO &lt;br /&gt; &lt;br /&gt;EXEC dbo.help_DateTimeFormats; &lt;br /&gt;EXEC dbo.help_DateTimeFormats @styleID = 112; &lt;br /&gt; &lt;br /&gt;-- DROP PROCEDURE dbo.help_DateTimeFormats;&lt;br /&gt; &lt;br /&gt;The output should look like this: &lt;br /&gt; &lt;br /&gt;0 : Feb 22 2006 4:26PM ----- CONVERT(CHAR(19), CURRENT_TIMESTAMP, 0)&lt;br /&gt;1 : 02/22/06 ----- CONVERT(CHAR(8), CURRENT_TIMESTAMP, 1)&lt;br /&gt;2 : 06.02.22 ----- CONVERT(CHAR(8), CURRENT_TIMESTAMP, 2)&lt;br /&gt;3 : 22/02/06 ----- CONVERT(CHAR(8), CURRENT_TIMESTAMP, 3)&lt;br /&gt;4 : 22.02.06 ----- CONVERT(CHAR(8), CURRENT_TIMESTAMP, 4)&lt;br /&gt;5 : 22-02-06 ----- CONVERT(CHAR(8), CURRENT_TIMESTAMP, 5)&lt;br /&gt;6 : 22 Feb 06 ----- CONVERT(CHAR(9), CURRENT_TIMESTAMP, 6)&lt;br /&gt;7 : Feb 22, 06 ----- CONVERT(CHAR(10), CURRENT_TIMESTAMP, 7)&lt;br /&gt;8 : 16:26:08 ----- CONVERT(CHAR(8), CURRENT_TIMESTAMP, 8)&lt;br /&gt;9 : Feb 22 2006 4:26:08:020PM ----- CONVERT(CHAR(26), CURRENT_TIMESTAMP, 9)&lt;br /&gt;10 : 02-22-06 ----- CONVERT(CHAR(8), CURRENT_TIMESTAMP, 10)&lt;br /&gt;11 : 06/02/22 ----- CONVERT(CHAR(8), CURRENT_TIMESTAMP, 11)&lt;br /&gt;12 : 060222 ----- CONVERT(CHAR(6), CURRENT_TIMESTAMP, 12)&lt;br /&gt;13 : 22 Feb 2006 16:26:08:020 ----- CONVERT(CHAR(24), CURRENT_TIMESTAMP, 13)&lt;br /&gt;14 : 16:26:08:037 ----- CONVERT(CHAR(12), CURRENT_TIMESTAMP, 14)&lt;br /&gt;20 : 2006-02-22 16:26:08 ----- CONVERT(CHAR(19), CURRENT_TIMESTAMP, 20)&lt;br /&gt;21 : 2006-02-22 16:26:08.037 ----- CONVERT(CHAR(23), CURRENT_TIMESTAMP, 21)&lt;br /&gt;22 : 02/22/06 4:26:08 PM ----- CONVERT(CHAR(20), CURRENT_TIMESTAMP, 22)&lt;br /&gt;23 : 2006-02-22 ----- CONVERT(CHAR(10), CURRENT_TIMESTAMP, 23)&lt;br /&gt;24 : 16:26:08 ----- CONVERT(CHAR(8), CURRENT_TIMESTAMP, 24)&lt;br /&gt;25 : 2006-02-22 16:26:08.037 ----- CONVERT(CHAR(23), CURRENT_TIMESTAMP, 25)&lt;br /&gt;100 : Feb 22 2006 4:26PM ----- CONVERT(CHAR(19), CURRENT_TIMESTAMP, 100)&lt;br /&gt;101 : 02/22/2006 ----- CONVERT(CHAR(10), CURRENT_TIMESTAMP, 101)&lt;br /&gt;102 : 2006.02.22 ----- CONVERT(CHAR(10), CURRENT_TIMESTAMP, 102)&lt;br /&gt;103 : 22/02/2006 ----- CONVERT(CHAR(10), CURRENT_TIMESTAMP, 103)&lt;br /&gt;104 : 22.02.2006 ----- CONVERT(CHAR(10), CURRENT_TIMESTAMP, 104)&lt;br /&gt;105 : 22-02-2006 ----- CONVERT(CHAR(10), CURRENT_TIMESTAMP, 105)&lt;br /&gt;106 : 22 Feb 2006 ----- CONVERT(CHAR(11), CURRENT_TIMESTAMP, 106)&lt;br /&gt;107 : Feb 22, 2006 ----- CONVERT(CHAR(12), CURRENT_TIMESTAMP, 107)&lt;br /&gt;108 : 16:26:08 ----- CONVERT(CHAR(8), CURRENT_TIMESTAMP, 108)&lt;br /&gt;109 : Feb 22 2006 4:26:08:067PM ----- CONVERT(CHAR(26), CURRENT_TIMESTAMP, 109)&lt;br /&gt;110 : 02-22-2006 ----- CONVERT(CHAR(10), CURRENT_TIMESTAMP, 110)&lt;br /&gt;111 : 2006/02/22 ----- CONVERT(CHAR(10), CURRENT_TIMESTAMP, 111)&lt;br /&gt;112 : 20060222 ----- CONVERT(CHAR(8), CURRENT_TIMESTAMP, 112)&lt;br /&gt;113 : 22 Feb 2006 16:26:08:067 ----- CONVERT(CHAR(24), CURRENT_TIMESTAMP, 113)&lt;br /&gt;114 : 16:26:08:067 ----- CONVERT(CHAR(12), CURRENT_TIMESTAMP, 114)&lt;br /&gt;120 : 2006-02-22 16:26:08 ----- CONVERT(CHAR(19), CURRENT_TIMESTAMP, 120)&lt;br /&gt;121 : 2006-02-22 16:26:08.080 ----- CONVERT(CHAR(23), CURRENT_TIMESTAMP, 121)&lt;br /&gt;126 : 2006-02-22T16:26:08.080 ----- CONVERT(CHAR(23), CURRENT_TIMESTAMP, 126)&lt;br /&gt;127 : 2006-02-22T16:26:08.080 ----- CONVERT(CHAR(23), CURRENT_TIMESTAMP, 127)&lt;br /&gt;130 : 24 ???? 1427 4:26:08:080PM ----- CONVERT(CHAR(32), CURRENT_TIMESTAMP, 130)&lt;br /&gt;131 : 24/01/1427 4:26:08:080PM ----- CONVERT(CHAR(25), CURRENT_TIMESTAMP, 131)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-8859435885347096174?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/8859435885347096174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=8859435885347096174&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8859435885347096174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/8859435885347096174'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/05/converting-to-datetime-formats-in-sql.html' title='Converting Datetime column type to any Datetime formats in Sql Server from Query'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-4119475850486902060</id><published>2009-05-10T21:25:00.000-07:00</published><updated>2009-05-10T21:29:12.709-07:00</updated><title type='text'>Debug while Running a Test in an ASP.NET Solution</title><content type='html'>&lt;strong&gt;How to: Debug while Running a Test in an ASP.NET Solution&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You can debug both unit tests and Web tests that you are using to test ASP.NET Web projects. You can also debug your ASP.NET production code while a test is running. &lt;br /&gt;&lt;br /&gt;However, when you are testing ASP.NET code, the test code does not run in the typical way, under the VSTestHost process. Instead, it runs in either the IIS process, or if your Web site is file-based, in an ASP.NET Development Server process. Because the test runs in other than the typical test process, choosing the Debug Selection option in the Test View window or the Debug Checked tests option in the Test List Editor does not debug while the test is running. &lt;br /&gt;&lt;br /&gt;Similarly, ASP.NET production code cannot be stepped into unless debugging is enabled and the debugger is attached to the ASP.NET Development Server or the IIS process. &lt;br /&gt;&lt;br /&gt;In each of the following procedures, you create an ASP.NET Web site project by using the New Web Site dialog box. In this dialog box, you use the Location list box to choose a location for the Web site. This choice determines the process to which you will later attach the debugger, and the steps that you follow to debug while running a test in an ASP.NET solution. The two options are IIS and ASP.NET Development Server. &lt;br /&gt;&lt;br /&gt;--&gt; Debugging While Running on IIS &lt;br /&gt;--&gt; Debugging While Running on ASP.NET Development Server &lt;br /&gt;&lt;br /&gt; &lt;strong&gt;&lt;em&gt;Debugging While Running on IIS &lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;In the following procedure, you will attach the debugger to a process. The name of the process depends on the operating system you are using, because the operating system determines the version of IIS that is installed. The following table shows what process is used on each operating system. For an operating system in the first column, use the name of the process specified in the third column in the Available Processes section of the Attach to Process dialog box. &lt;br /&gt;&lt;br /&gt;Operating System &lt;br /&gt; Host process &lt;br /&gt; ASP.NET Process name &lt;br /&gt; &lt;br /&gt;Windows Server 2003 &lt;br /&gt; IIS 6.0 &lt;br /&gt; w3wp.exe &lt;br /&gt; &lt;br /&gt;Windows XP &lt;br /&gt; IIS 5.1 &lt;br /&gt; aspnet_wp.exe &lt;br /&gt; &lt;br /&gt;Windows 2000 &lt;br /&gt; IIS 5.0 &lt;br /&gt; aspnet_wp.exe &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;To debug while running an ASP.NET test on IIS&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;Create an ASP.NET Web site project that you want to test, and an ASP.NET unit test to test it. &lt;br /&gt;&lt;br /&gt;When you create this Web site project, in the New Web Site dialog box, select HTTP or FTP as the Location. This guarantees that the host process will be IIS. &lt;br /&gt;&lt;br /&gt;For more information, see How to: Create an ASP.NET Unit Test. &lt;br /&gt;&lt;br /&gt;Enable debugging in the ASP.NET Web project. To do this, edit the project's Web configuration file. If your project already has a Web.config file, go to step 4. If not, add one now: Right-click the Web site project in your solution, and then click Add New Item. &lt;br /&gt;&lt;br /&gt;The Add New Item dialog box is displayed. &lt;br /&gt;&lt;br /&gt;In the Add New Item dialog box, click Web Configuration File and then click Add. &lt;br /&gt;&lt;br /&gt;A Web.config file is added to your Web site project. For more information about how to use Web.config files, see How to: Enable Debugging for ASP.NET Applications. &lt;br /&gt;&lt;br /&gt;In the Web.config file, change the line that reads &lt;compilation debug="false"/&gt; to &lt;compilation debug="true"/&gt;. &lt;br /&gt;&lt;br /&gt;(Optional) Set breakpoints in the ASP.NET unit test and in the production code for your Web site. &lt;br /&gt;&lt;br /&gt;Attach the debugger to the IIS process. To do this, click Debug and then click Attach to Process. &lt;br /&gt;&lt;br /&gt;The Attach to Process dialog box is displayed. &lt;br /&gt;&lt;br /&gt;Under Available Processes, locate the name of the process to which you want to attach the debugger. &lt;br /&gt;&lt;br /&gt;If the process you need is not displayed, you can display more processes that are running. To do this, check Show processes from all users and Show processes in all sessions. &lt;br /&gt;&lt;br /&gt;Under Available Processes, click the name of the process and then click Attach. &lt;br /&gt;&lt;br /&gt;If the process to which you have to attach is not running, click Cancel and then start the process. To do this, in Solution Explorer, right-click the Web site project and then click View in Browser. Next, click Debug and then click Attach to Process one more time; the process has started running and is displayed under Available Processes. Click the process name and then click Attach. &lt;br /&gt;&lt;br /&gt;Start your test. &lt;br /&gt;&lt;br /&gt;To do this, in the Test View window, right-click the test your want to debug and select Debug Selection. &lt;br /&gt;&lt;br /&gt;Note: &lt;br /&gt;When running tests, you can choose Run Selection instead of Debug Selection. The difference is that if you choose Debug Selection, the debugger automatically detaches after the test finishes, but if you choose Run Selection, the debugger stays attached. You may find Run Selection more useful, especially if you plan to rerun the test several times while debugging, and you do not want to have to reattach the process every time. If you have chosen Run Selection, to detach the process when you have finished debugging, choose Stop Debugging from the Debug menu or press Shift+F5. &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt; Debugging While Running on ASP.NET Development Server &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;To debug while running a test on ASP.NET Development Server&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;Create an ASP.NET Web site project that you want to test, and an ASP.NET unit test to test it. &lt;br /&gt;&lt;br /&gt;When you create this Web site project, in the New Web Site dialog box, select File System as the Location. This guarantees that the host process will be ASP.NET Development Server. &lt;br /&gt;&lt;br /&gt;For more information, see How to: Create an ASP.NET Unit Test. &lt;br /&gt;&lt;br /&gt;Enable debugging in the ASP.NET Web project. To do this, edit the project's Web configuration file. If your project already has a Web.config file, go to step 4. If not, add one now: Right-click the Web site project in your solution, and then click Add New Item. &lt;br /&gt;&lt;br /&gt;The Add New Item dialog box is displayed. &lt;br /&gt;&lt;br /&gt;In the Add New Item dialog box, click Web Configuration File and then click Add. &lt;br /&gt;&lt;br /&gt;A Web.config file is added to your Web site project. For more information about how to use Web.config files, see How to: Enable Debugging for ASP.NET Applications. &lt;br /&gt;&lt;br /&gt;In the Web.config file, change the line that reads &lt;compilation debug="false"/&gt; to &lt;compilation debug="true"/&gt;. &lt;br /&gt;&lt;br /&gt;Add the statement System.Diagnostics.Debugger.Break() to the beginning of your ASP.NET unit test. &lt;br /&gt;&lt;br /&gt;Note: &lt;br /&gt;Breakpoints in your code will be hit only if they follow this System.Diagnostics.Debugger.Break() statement. &lt;br /&gt; &lt;br /&gt;Note: &lt;br /&gt;In C++, this statement is System::Diagnostics::Debugger::Break(). For information about how to use unit tests in Visual C++, see Unit Tests and C++. &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Set breakpoints in the ASP.NET unit test and in the production code for your Web site. &lt;br /&gt;&lt;br /&gt;Start your test. &lt;br /&gt;&lt;br /&gt;To do this, in the Test View window, right-click the test you want to run and select Run Selection. &lt;br /&gt;&lt;br /&gt;As soon as the test starts to run, a dialog box appears. This dialog box indicates that the program has encountered a breakpoint. &lt;br /&gt;&lt;br /&gt;Click Debug, choose the instance of Visual Studio that has your solution loaded, and then click Yes. &lt;br /&gt;&lt;br /&gt;Visual Studio will attach to the process, with execution paused at the System.Diagnostics.Debugger.Break() statement. You can choose Continue from the Debug menu or press F5 to allow execution to continue to your next breakpoint.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-4119475850486902060?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/4119475850486902060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=4119475850486902060&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4119475850486902060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4119475850486902060'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/05/debug-while-running-test-in-aspnet.html' title='Debug while Running a Test in an ASP.NET Solution'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-1170105278392541405</id><published>2009-05-02T03:07:00.000-07:00</published><updated>2009-05-02T03:34:39.730-07:00</updated><title type='text'>Page life cycle of asp.net 2.0</title><content type='html'>&lt;table style="border-right: rgb(221,221,221) 1px solid; border-top: rgb(221,221,221) 1px solid;&lt;br /&gt;                                                font-size: 100%; z-index: 103; left: 0px; margin: 5px 10px 5px 5px; border-left: rgb(221,221,221) 1px solid;&lt;br /&gt;                                                width: 67%; border-bottom: rgb(221,221,221) 1px solid; &lt;br /&gt;                                                border-collapse: collapse"&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;th style="border-right: rgb(204,204,204) 0px solid; padding-right: 5px; border-top: rgb(204,204,204) 0px solid;&lt;br /&gt;                                                        padding-left: 5px; font-size: 3mm; padding-bottom: 5px; vertical-align: bottom;&lt;br /&gt;                                                        border-left: rgb(204,204,204) 0px solid; color: rgb(0,0,102); padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(200,205,222) 1px solid; font-family: Verdana; background-color: rgb(204,204,204);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 0px; padding-left: 0px; font-weight: bold; padding-bottom: 0px;&lt;br /&gt;                                                            margin: 0px; padding-top: 0px"&gt;&lt;br /&gt;                                                            &lt;span class="label" style="font-weight: bold"&gt;Page Event&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;                                                    &lt;/th&gt;&lt;br /&gt;                                                    &lt;th style="border-right: rgb(204,204,204) 0px solid; padding-right: 5px; border-top: rgb(204,204,204) 0px solid;&lt;br /&gt;                                                        padding-left: 5px; font-size: 3mm; padding-bottom: 5px; vertical-align: bottom;&lt;br /&gt;                                                        border-left: rgb(204,204,204) 0px solid; color: rgb(0,0,102); padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(200,205,222) 1px solid; font-family: Verdana; background-color: rgb(204,204,204);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 0px; padding-left: 0px; font-weight: bold; padding-bottom: 0px;&lt;br /&gt;                                                            margin: 0px; padding-top: 0px"&gt;&lt;br /&gt;                                                            &lt;span class="label" style="font-weight: bold"&gt;Typical Use&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;                                                    &lt;/th&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            &lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl81" href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.preinit.aspx"&lt;br /&gt;                                                                PreInit&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Use this event for the following:&lt;/p&gt;&lt;br /&gt;                                                        &lt;ul style="list-style-position: outside; margin: 5px 10px 5px 20px; line-height: 140%;&lt;br /&gt;                                                            list-style-type: disc"&gt;&lt;br /&gt;                                                            &lt;li style="list-style-image: url(http://i3.msdn.microsoft.com/Platform/MasterPages/Library/b.gif);&lt;br /&gt;                                                                margin-bottom: 3px; margin-left: 0px"&gt;&lt;br /&gt;                                                                &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                                    padding-top: 5px"&gt;&lt;br /&gt;                                                                    Check the&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl82"&lt;br /&gt;                                                                        href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback.aspx"&lt;br /&gt;                                                                        onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl82',this);"&lt;br /&gt;                                                                        style="color: rgb(0,51,204); text-decoration: none"&gt;IsPostBack&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                        &lt;/span&gt;property to determine whether this is the first time the page is being&lt;br /&gt;                                                                    processed.&lt;/p&gt;&lt;br /&gt;                                                            &lt;/li&gt;&lt;br /&gt;                                                            &lt;li style="list-style-image: url(http://i3.msdn.microsoft.com/Platform/MasterPages/Library/b.gif);&lt;br /&gt;                                                                margin-bottom: 3px; margin-left: 0px"&gt;&lt;br /&gt;                                                                &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                                    padding-top: 5px"&gt;&lt;br /&gt;                                                                    Create or re-create dynamic controls.&lt;/p&gt;&lt;br /&gt;                                                            &lt;/li&gt;&lt;br /&gt;                                                            &lt;li style="list-style-image: url(http://i3.msdn.microsoft.com/Platform/MasterPages/Library/b.gif);&lt;br /&gt;                                                                margin-bottom: 3px; margin-left: 0px"&gt;&lt;br /&gt;                                                                &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                                    padding-top: 5px"&gt;&lt;br /&gt;                                                                    Set a master page dynamically.&lt;/p&gt;&lt;br /&gt;                                                            &lt;/li&gt;&lt;br /&gt;                                                            &lt;li style="list-style-image: url(http://i3.msdn.microsoft.com/Platform/MasterPages/Library/b.gif);&lt;br /&gt;                                                                margin-bottom: 3px; margin-left: 0px"&gt;&lt;br /&gt;                                                                &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                                    padding-top: 5px"&gt;&lt;br /&gt;                                                                    Set the&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl83"&lt;br /&gt;                                                                        href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.theme.aspx"&lt;br /&gt;                                                                        onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl83',this);"&lt;br /&gt;                                                                        style="color: rgb(0,51,204); text-decoration: none"&gt;Theme&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                        &lt;/span&gt;property dynamically.&lt;/p&gt;&lt;br /&gt;                                                            &lt;/li&gt;&lt;br /&gt;                                                            &lt;li style="list-style-image: url(http://i3.msdn.microsoft.com/Platform/MasterPages/Library/b.gif);&lt;br /&gt;                                                                margin-bottom: 3px; margin-left: 0px"&gt;&lt;br /&gt;                                                                &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                                    padding-top: 5px"&gt;&lt;br /&gt;                                                                    Read or set profile property values.&lt;/p&gt;&lt;br /&gt;                                                                &lt;div class="alert" style="padding-bottom: 0.82em; width: 98.9%"&gt;&lt;br /&gt;                                                                    &lt;div class="mtps-table"&gt;&lt;br /&gt;                                                                        &lt;div class="mtps-row" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                            padding-top: 4pt"&gt;&lt;br /&gt;                                                                            &lt;span class="mtps-th" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                                padding-top: 4pt"&gt;&lt;br /&gt;                                                                                &lt;img alt="Note" src="http://i.msdn.microsoft.com/ms178472.alert_note(en-us,VS.90).gif" /&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;                                                                        &lt;div class="mtps-row" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                            padding-top: 4pt"&gt;&lt;br /&gt;                                                                            &lt;span class="mtps-cell" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                                padding-top: 4pt"&gt;&lt;span&gt;If the request is a postback, the values of the controls have&lt;br /&gt;                                                                                    not yet been restored from view state. If you set a control property at this stage,&lt;br /&gt;                                                                                    its value might be overwritten in the next event.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;                                                                    &lt;/div&gt;&lt;br /&gt;                                                                &lt;/div&gt;&lt;br /&gt;                                                            &lt;/li&gt;&lt;br /&gt;                                                        &lt;/ul&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            &lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl86" href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.init.aspx"&lt;br /&gt;                                                                Init&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Raised after all controls have been initialized and any skin settings have been&lt;br /&gt;                                                            applied. Use this event to read or initialize control properties.&lt;/p&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            &lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl87" href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.initcomplete.aspx"&lt;br /&gt;                                                                InitComplete                                                    &lt;/td&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Raised by the&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl88"&lt;br /&gt;                                                                href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.aspx" onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl88',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;Page&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;object. Use this event for processing tasks that require all initialization&lt;br /&gt;                                                            be complete.&lt;/p&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            &lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl89" href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.preload.aspx"&lt;br /&gt;                                                                PreLoad&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Use this event if you need to perform processing on your page or control before&lt;br /&gt;                                                            the&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl90" href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.load.aspx"&lt;br /&gt;                                                                Load &lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;event.&lt;/p&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Before the&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl91"&lt;br /&gt;                                                                href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.aspx" onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl91',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;Page&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;instance raises this event, it loads view state for itself and all controls,&lt;br /&gt;                                                            and then processes any postback data included with the&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                            &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl92" href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.request.aspx"&lt;br /&gt;                                                                onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl92',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;Request&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;instance.&lt;/p&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            &lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl93" href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.load.aspx"&lt;br /&gt;                                                                Load&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            The&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl94"&lt;br /&gt;                                                                href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.aspx" onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl94',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;Page&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;calls the&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl95"&lt;br /&gt;                                                                    href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.onload.aspx"&lt;br /&gt;                                                                    onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl95',this);"&lt;br /&gt;                                                                    style="color: rgb(0,51,204); text-decoration: none"&gt;OnLoad&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                    &lt;/span&gt;event method on the&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl96"&lt;br /&gt;                                                                        href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.aspx" onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl96',this);"&lt;br /&gt;                                                                        style="color: rgb(0,51,204); text-decoration: none"&gt;Page&lt;/a&gt;&lt;/span&gt;,&lt;br /&gt;                                                            then recursively does the same for each child control, which does the same for each&lt;br /&gt;                                                            of its child controls until the page and all controls are loaded.&lt;/p&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Use the&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl97"&lt;br /&gt;                                                                href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.onload.aspx"&lt;br /&gt;                                                                onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl97',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;OnLoad&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;event method to set properties in controls and establish database connections.&lt;/p&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Control events&lt;/p&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Use these events to handle specific control events, such as a&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                            &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl98" href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.aspx"&lt;br /&gt;                                                                onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl98',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;Button&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;control's&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl99"&lt;br /&gt;                                                                    href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.click.aspx"&lt;br /&gt;                                                                    onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl99',this);"&lt;br /&gt;                                                                    style="color: rgb(0,51,204); text-decoration: none"&gt;Click&lt;/a&gt;&lt;/span&gt;event&lt;br /&gt;                                                            or a&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl100"&lt;br /&gt;                                                                href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.textbox.aspx"&lt;br /&gt;                                                                onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl100',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;TextBox&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;control's&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl101"&lt;br /&gt;                                                                    href="http://msdn.microsoft.com/en-us/library/system.web.ui.mobilecontrols.textbox.textchanged.aspx"&lt;br /&gt;                                                                    onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl101',this);"&lt;br /&gt;                                                                    style="color: rgb(0,51,204); text-decoration: none"&gt;TextChanged&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                    &lt;/span&gt;event.&lt;/p&gt;&lt;br /&gt;                                                        &lt;div class="alert" style="padding-bottom: 0.82em; width: 98.9%"&gt;&lt;br /&gt;                                                            &lt;div class="mtps-table"&gt;&lt;br /&gt;                                                                &lt;div class="mtps-row" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                    padding-top: 4pt"&gt;&lt;br /&gt;                                                                    &lt;span class="mtps-th" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                        padding-top: 4pt"&gt;&lt;br /&gt;                                                                        &lt;img alt="Note" src="http://i.msdn.microsoft.com/ms178472.alert_note(en-us,VS.90).gif" /&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;                                                                &lt;div class="mtps-row" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                    padding-top: 4pt"&gt;&lt;br /&gt;                                                                    &lt;span class="mtps-cell" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                        padding-top: 4pt"&gt;&lt;span&gt;In a postback request, if the page contains validator controls,&lt;br /&gt;                                                                            check the&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl104"&lt;br /&gt;                                                                                href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.isvalid.aspx"&lt;br /&gt;                                                                                onclick="javascript:Track('ctl00_mainContentContainer_ctl102|ctl00_mainContentContainer_ctl104',this);"&lt;br /&gt;                                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;IsValid&lt;/a&gt;&lt;/span&gt;property&lt;br /&gt;                                                                            of the&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl105"&lt;br /&gt;                                                                                href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.aspx" onclick="javascript:Track('ctl00_mainContentContainer_ctl102|ctl00_mainContentContainer_ctl105',this);"&lt;br /&gt;                                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;Page&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                                &lt;/span&gt;and of individual validation controls before performing any processing.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;                                                            &lt;/div&gt;&lt;br /&gt;                                                        &lt;/div&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            &lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl106" href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.loadcomplete.aspx"&lt;br /&gt;                                                                LoadComplete&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Use this event for tasks that require that all other controls on the page be loaded.&lt;/p&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            &lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl107" href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.prerender.aspx"&lt;br /&gt;                                                                PreRender&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Before this event occurs:&lt;/p&gt;&lt;br /&gt;                                                        &lt;ul style="list-style-position: outside; margin: 5px 10px 5px 20px; line-height: 140%;&lt;br /&gt;                                                            list-style-type: disc"&gt;&lt;br /&gt;                                                            &lt;li style="list-style-image: url(http://i3.msdn.microsoft.com/Platform/MasterPages/Library/b.gif);&lt;br /&gt;                                                                margin-bottom: 3px; margin-left: 0px"&gt;&lt;br /&gt;                                                                &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                                    padding-top: 5px"&gt;&lt;br /&gt;                                                                    The&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl108"&lt;br /&gt;                                                                        href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.aspx" onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl108',this);"&lt;br /&gt;                                                                        style="color: rgb(0,51,204); text-decoration: none"&gt;Page&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                        &lt;/span&gt;object calls&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl109"&lt;br /&gt;                                                                            href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.ensurechildcontrols.aspx"&lt;br /&gt;                                                                            onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl109',this);"&lt;br /&gt;                                                                            style="color: rgb(0,51,204); text-decoration: none"&gt;EnsureChildControls&lt;/a&gt;&lt;/span&gt;&lt;span&lt;br /&gt;                                                                                class="Apple-converted-space"&gt; &lt;/span&gt;for each control and for the page.&lt;/p&gt;&lt;br /&gt;                                                            &lt;/li&gt;&lt;br /&gt;                                                            &lt;li style="list-style-image: url(http://i3.msdn.microsoft.com/Platform/MasterPages/Library/b.gif);&lt;br /&gt;                                                                margin-bottom: 3px; margin-left: 0px"&gt;&lt;br /&gt;                                                                &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                                    padding-top: 5px"&gt;&lt;br /&gt;                                                                    Each data bound control whose&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a&lt;br /&gt;                                                                        id="ctl00_mainContentContainer_ctl110" href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.databoundcontrol.datasourceid.aspx"&lt;br /&gt;                                                                        onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl110',this);"&lt;br /&gt;                                                                        style="color: rgb(0,51,204); text-decoration: none"&gt;DataSourceID&lt;/a&gt;&lt;/span&gt;&lt;span&lt;br /&gt;                                                                            class="Apple-converted-space"&gt; &lt;/span&gt;property is set calls its&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl111"&lt;br /&gt;                                                                                href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.databind.aspx"&lt;br /&gt;                                                                                onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl111',this);"&lt;br /&gt;                                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;DataBind&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                                &lt;/span&gt;method. For more information, see&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;                                                                    &lt;a href="#databindingevents" style="color: rgb(0,51,204); text-decoration: none"&gt;Data&lt;br /&gt;                                                                        Binding Events for Data-Bound Controls&lt;/a&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;                                                                    later in this topic.&lt;/p&gt;&lt;br /&gt;                                                            &lt;/li&gt;&lt;br /&gt;                                                        &lt;/ul&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            The&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl112"&lt;br /&gt;                                                                href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.prerender.aspx"&lt;br /&gt;                                                                onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl112',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;PreRender&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;event occurs for each control on the page. Use the event to make final&lt;br /&gt;                                                            changes to the contents of the page or its controls.&lt;/p&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            &lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl113" href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.savestatecomplete.aspx"&lt;br /&gt;                                                                SaveStateComplete&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Before this event occurs,&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl114"&lt;br /&gt;                                                                href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.viewstate.aspx"&lt;br /&gt;                                                                onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl114',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;ViewState&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;has been saved for the page and for all controls. Any changes to the&lt;br /&gt;                                                            page or controls at this point will be ignored.&lt;/p&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            Use this event perform tasks that require view state to be saved, but that do not&lt;br /&gt;                                                            make any changes to controls.&lt;/p&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            &lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl115" href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.render.aspx"&lt;br /&gt;                                                                Render                                                    &lt;/td&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            This is not an event; instead, at this stage of processing, the&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                            &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl116" href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.aspx"&lt;br /&gt;                                                                onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl116',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;Page&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;object calls this method on each control. All ASP.NET Web server controls&lt;br /&gt;                                                            have a&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl117"&lt;br /&gt;                                                                href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.render.aspx"&lt;br /&gt;                                                                onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl117',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;Render&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                &lt;/span&gt;method that writes out the control's markup that is sent to the browser.&lt;/p&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            If you create a custom control, you typically override this method to output the&lt;br /&gt;                                                            control's markup. However, if your custom control incorporates only standard ASP.NET&lt;br /&gt;                                                            Web server controls and no custom markup, you do not need to override the&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                            &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl118" href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.render.aspx"&lt;br /&gt;                                                                onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl118',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;Render&lt;/a&gt;&lt;/span&gt;method.&lt;br /&gt;                                                            For more information, see&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl119"&lt;br /&gt;                                                                href="http://msdn.microsoft.com/en-us/library/zt27tfhy.aspx" onclick="javascript:Track('ctl00_mainContentContainer_cpe74103_c|ctl00_mainContentContainer_ctl119',this);"&lt;br /&gt;                                                                style="color: rgb(0,51,204); text-decoration: none"&gt;Developing Custom ASP.NET Server&lt;br /&gt;                                                                Controls&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            A user control (an .ascx file) automatically incorporates rendering, so you do not&lt;br /&gt;                                                            need to explicitly render the control in code.&lt;/p&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                                &lt;tr style="vertical-align: top"&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            &lt;span&gt;&lt;a id="ctl00_mainContentContainer_ctl120" href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.unload.aspx"&lt;br /&gt;                                                                Unload                                                    &lt;/td&gt;&lt;br /&gt;                                                    &lt;td style="border-right: rgb(213,213,211) 1px solid; padding-right: 5px; border-top: rgb(204,204,204) 1px solid;&lt;br /&gt;                                                        overflow-y: auto; padding-left: 5px; font-size: 3mm; overflow-x: auto; padding-bottom: 5px;&lt;br /&gt;                                                        margin: 1px; vertical-align: top; border-left: rgb(204,204,204) 1px solid; padding-top: 5px;&lt;br /&gt;                                                        border-bottom: rgb(204,204,204) 1px solid; font-family: Verdana; background-color: rgb(255,255,255);&lt;br /&gt;                                                        text-align: left; webkit-background-clip: initial; webkit-background-origin: initial"&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            This event occurs for each control and then for the page. In controls, use this&lt;br /&gt;                                                            event to do final cleanup for specific controls, such as closing control-specific&lt;br /&gt;                                                            database connections.&lt;/p&gt;&lt;br /&gt;                                                        &lt;p style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin: 0px;&lt;br /&gt;                                                            padding-top: 5px"&gt;&lt;br /&gt;                                                            For the page itself, use this event to do final cleanup work, such as closing open&lt;br /&gt;                                                            files and database connections, or finishing up logging or other request-specific&lt;br /&gt;                                                            tasks.&lt;/p&gt;&lt;br /&gt;                                                        &lt;div class="alert" style="padding-bottom: 0.82em; width: 98.9%"&gt;&lt;br /&gt;                                                            &lt;div class="mtps-table"&gt;&lt;br /&gt;                                                                &lt;div class="mtps-row" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                    padding-top: 4pt"&gt;&lt;br /&gt;                                                                    &lt;span class="mtps-th" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                        padding-top: 4pt"&gt;&lt;br /&gt;                                                                        &lt;img alt="Note" src="http://i.msdn.microsoft.com/ms178472.alert_note(en-us,VS.90).gif" /&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;                                                                &lt;div class="mtps-row" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                    padding-top: 4pt"&gt;&lt;br /&gt;                                                                    &lt;span class="mtps-cell" style="padding-right: 4pt; padding-left: 4pt; padding-bottom: 4pt;&lt;br /&gt;                                                                        padding-top: 4pt"&gt;&lt;span&gt;During the unload stage, the page and its controls have been&lt;br /&gt;                                                                            rendered, so you cannot make further changes to the response stream. If you attempt&lt;br /&gt;                                                                            to call a method such as the&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;span&gt;&lt;span&lt;br /&gt;                                                                                class="input" style="font-weight: 700"&gt;Response.Write&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;                                                                                &lt;/span&gt;method, the page will throw an exception.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;                                                            &lt;/div&gt;&lt;br /&gt;                                                        &lt;/div&gt;&lt;br /&gt;                                                    &lt;/td&gt;&lt;br /&gt;                                                &lt;/tr&gt;&lt;br /&gt;                                            &lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-1170105278392541405?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/1170105278392541405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=1170105278392541405&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/1170105278392541405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/1170105278392541405'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/05/page-life-cycle-of-aspnet-20.html' title='Page life cycle of asp.net 2.0'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-3429741949917485035</id><published>2009-05-01T18:34:00.000-07:00</published><updated>2009-05-01T18:42:24.669-07:00</updated><title type='text'>Configure SQL Server to Store ASP.NET Session State</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Modify the Web.config File of Your Application&lt;/span&gt;&lt;br /&gt;To implement ASP.NET SQL Server mode session state management, you must modify the &amp;lt;sessionState&amp;gt; element of your application's Web.config file as follows:&lt;br /&gt;&lt;br /&gt;1.  Set the &lt;span style="font-weight:bold;"&gt;mode&lt;/span&gt; attribute of the &amp;lt;sessionState&amp;gt; element to SQLServer to indicate that session state is stored in SQL Server.&lt;br /&gt;2. Set the sqlConnectionString attribute to specify the connection string for SQL Server. For example:&lt;br /&gt;&lt;span style="font-style:italic;"&gt;sqlConnectionString="data source=MySQLServer;user id=&amp;lt;username&amp;gt;;password=&amp;lt;strongpassword&amp;gt;"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note The user, &amp;lt;user name&amp;gt;, must have permissions to perform this operation on the database.&lt;br /&gt;&lt;br /&gt;The modified &amp;lt;&lt;span style="font-weight:bold;"&gt;sessionState&lt;/span&gt;&amp;gt; element should appear as follows:&lt;br /&gt;&amp;lt;sessionState &lt;br /&gt;            mode="SQLServer"&lt;br /&gt;            sqlConnectionString="data source=127.0.0.1;user id=&amp;lt;username&amp;gt;;password=&amp;lt;strongpassword&amp;gt;"&lt;br /&gt;            cookieless="false" &lt;br /&gt;            timeout="20" &lt;br /&gt;    /&amp;gt;&lt;br /&gt;      &lt;br /&gt;Note Ensure that you use the correct case when you specify the &amp;lt;&lt;span style="font-weight:bold;"&gt;sessionState&lt;/span&gt;&amp;gt; element and the associated attribute values. This code is case sensitive.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Troubleshooting&lt;/span&gt;&lt;br /&gt;If you do not stop the w3svc process before you run the UninstallSqlState.sql script file, you receive the following error message:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Cannot drop the database 'ASPState' because it is currently in use&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;--&gt; If entries in the &lt;span style="font-weight:bold;"&gt;ASPStateTempSessions&lt;/span&gt; table are not removed after the related sessions expire, make sure that the SQL Server agent is running. You can implement this functionality through stored procedures that are scheduled through jobs in SQL Server. The SQL Server agent manages these jobs.&lt;br /&gt;--&gt; When you use the default InstallSqlState.sql and UninstallSqlState.sql script files to configure ASP.NET SQL Server mode session state management, note that these files add the &lt;span style="font-weight:bold;"&gt;ASPStateTempSessions&lt;/span&gt; and the &lt;span style="font-weight:bold;"&gt;ASPStateTempApplications&lt;/span&gt; tables to the &lt;span style="font-weight:bold;"&gt;tempdb&lt;/span&gt; database in SQL Server by default. Furthermore, if you restart SQL Server, you lose the session state data that was stored in the ASPStateTempSessions and the &lt;span style="font-weight:bold;"&gt;ASPStateTempApplications &lt;/span&gt;tables.For additional information about how to run alternative scripts to configure persistent SQL Server session state management so that the session data is not lost when you restart the server, click the article number below to view the article in the Microsoft Knowledge Base:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;311209  HOW TO: Configure ASP.NET for Persistent SQL Server Session State Management&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-3429741949917485035?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/3429741949917485035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=3429741949917485035&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3429741949917485035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3429741949917485035'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/05/configure-sql-server-to-store-aspnet.html' title='Configure SQL Server to Store ASP.NET Session State'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-5183709458342484707</id><published>2009-04-27T22:53:00.000-07:00</published><updated>2009-04-27T22:59:20.245-07:00</updated><title type='text'>Encrypting and DeCrypting a string with a key password</title><content type='html'>using System.Security.Cryptography;&lt;br /&gt;&lt;br /&gt;private static string EncryptString(string Message, string Passphrase)&lt;br /&gt;    {&lt;br /&gt;        byte[] Results;&lt;br /&gt;        System.Text.UTF8Encoding UTF8 = new System.Text.UTF8Encoding();&lt;br /&gt;&lt;br /&gt;        // Step 1. We hash the passphrase using MD5&lt;br /&gt;        // We use the MD5 hash generator as the result is a 128 bit byte array&lt;br /&gt;        // which is a valid length for the TripleDES encoder we use below&lt;br /&gt;&lt;br /&gt;        MD5CryptoServiceProvider HashProvider = new MD5CryptoServiceProvider();&lt;br /&gt;        byte[] TDESKey = HashProvider.ComputeHash(UTF8.GetBytes(Passphrase));&lt;br /&gt;&lt;br /&gt;        // Step 2. Create a new TripleDESCryptoServiceProvider object&lt;br /&gt;        TripleDESCryptoServiceProvider TDESAlgorithm = new TripleDESCryptoServiceProvider();&lt;br /&gt;&lt;br /&gt;        // Step 3. Setup the encoder&lt;br /&gt;        TDESAlgorithm.Key = TDESKey;&lt;br /&gt;        TDESAlgorithm.Mode = CipherMode.ECB;&lt;br /&gt;        TDESAlgorithm.Padding = PaddingMode.PKCS7;&lt;br /&gt;&lt;br /&gt;        // Step 4. Convert the input string to a byte[]&lt;br /&gt;        byte[] DataToEncrypt = UTF8.GetBytes(Message);&lt;br /&gt;&lt;br /&gt;        // Step 5. Attempt to encrypt the string&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            ICryptoTransform Encryptor = TDESAlgorithm.CreateEncryptor();&lt;br /&gt;            Results = Encryptor.TransformFinalBlock(DataToEncrypt, 0, DataToEncrypt.Length);&lt;br /&gt;        }&lt;br /&gt;        finally&lt;br /&gt;        {&lt;br /&gt;            // Clear the TripleDes and Hashprovider services of any sensitive information&lt;br /&gt;            TDESAlgorithm.Clear();&lt;br /&gt;            HashProvider.Clear();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        // Step 6. Return the encrypted string as a base64 encoded string&lt;br /&gt;        return Convert.ToBase64String(Results);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private static string DecryptString(string Message, string Passphrase)&lt;br /&gt;    {&lt;br /&gt;        byte[] Results;&lt;br /&gt;        System.Text.UTF8Encoding UTF8 = new System.Text.UTF8Encoding();&lt;br /&gt;&lt;br /&gt;        // Step 1. We hash the passphrase using MD5&lt;br /&gt;        // We use the MD5 hash generator as the result is a 128 bit byte array&lt;br /&gt;        // which is a valid length for the TripleDES encoder we use below&lt;br /&gt;&lt;br /&gt;        MD5CryptoServiceProvider HashProvider = new MD5CryptoServiceProvider();&lt;br /&gt;        byte[] TDESKey = HashProvider.ComputeHash(UTF8.GetBytes(Passphrase));&lt;br /&gt;&lt;br /&gt;        // Step 2. Create a new TripleDESCryptoServiceProvider object&lt;br /&gt;        TripleDESCryptoServiceProvider TDESAlgorithm = new TripleDESCryptoServiceProvider();&lt;br /&gt;&lt;br /&gt;        // Step 3. Setup the decoder&lt;br /&gt;        TDESAlgorithm.Key = TDESKey;&lt;br /&gt;        TDESAlgorithm.Mode = CipherMode.ECB;&lt;br /&gt;        TDESAlgorithm.Padding = PaddingMode.PKCS7;&lt;br /&gt;&lt;br /&gt;        // Step 4. Convert the input string to a byte[]&lt;br /&gt;        byte[] DataToDecrypt = Convert.FromBase64String(Message);&lt;br /&gt;&lt;br /&gt;        // Step 5. Attempt to decrypt the string&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            ICryptoTransform Decryptor = TDESAlgorithm.CreateDecryptor();&lt;br /&gt;            Results = Decryptor.TransformFinalBlock(DataToDecrypt, 0, DataToDecrypt.Length);&lt;br /&gt;        }&lt;br /&gt;        finally&lt;br /&gt;        {&lt;br /&gt;            // Clear the TripleDes and Hashprovider services of any sensitive information&lt;br /&gt;            TDESAlgorithm.Clear();&lt;br /&gt;            HashProvider.Clear();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        // Step 6. Return the decrypted string in UTF8 format&lt;br /&gt;        return UTF8.GetString(Results);&lt;br /&gt;    }&lt;br /&gt;    public static void Main(string[] args)&lt;br /&gt;    {&lt;br /&gt;        // The message to encrypt.&lt;br /&gt;        string Msg = "This world is round, not flat, don't believe them!";&lt;br /&gt;        string Password = "secret";&lt;br /&gt;&lt;br /&gt;        string EncryptedString = EncryptString(Msg, Password);&lt;br /&gt;        string DecryptedString = DecryptString(EncryptedString, Password);&lt;br /&gt;    }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-5183709458342484707?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/5183709458342484707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=5183709458342484707&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/5183709458342484707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/5183709458342484707'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/04/encrypting-and-decrypting-string-with.html' title='Encrypting and DeCrypting a string with a key password'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-1145990287405669338</id><published>2009-04-14T02:30:00.000-07:00</published><updated>2009-04-14T02:35:56.116-07:00</updated><title type='text'>validating textbox to enter only numeric values using javascript</title><content type='html'>function isNumberKey(evt)&lt;br /&gt;      {&lt;br /&gt;         var charCode = (evt.which) ? evt.which : event.keyCode&lt;br /&gt;         if (charCode &amp;gt; 31 &amp;&amp; (charCode &amp;lt; 48 || charCode &amp;gt; 57))&lt;br /&gt;            return false;&lt;br /&gt;&lt;br /&gt;         return true;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:TextBox  ID="txtOnlyNumbers" onkeypress="return isNumberKey(event)" runat="server" TabIndex="00001"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-1145990287405669338?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/1145990287405669338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=1145990287405669338&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/1145990287405669338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/1145990287405669338'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/04/validating-textbox-to-enter-only.html' title='validating textbox to enter only numeric values using javascript'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-3013283181365422403</id><published>2009-04-09T23:47:00.000-07:00</published><updated>2009-04-13T19:59:47.466-07:00</updated><title type='text'>Select and UnSelect Checkbox in Gridview using Javascript</title><content type='html'>&lt;a href="http://www.wutravel.com/cities/Singapore/Singapore_hotels.htm"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;        function SelectAll()&lt;br /&gt;        {&lt;br /&gt;            //get reference of GridView control&lt;br /&gt;            var grid = document.getElementById("&amp;lt;%= gvMenuListItems.ClientID %&amp;gt;");&lt;br /&gt;            //variable to contain the cell of the grid&lt;br /&gt;            var cell;&lt;br /&gt;            &lt;br /&gt;            if (grid.rows.length &amp;gt; 0)&lt;br /&gt;            {&lt;br /&gt;                //loop starts from 1. rows[0] points to the header.&lt;br /&gt;                for (i=1; i&amp;lt;grid.rows.length; i++)&lt;br /&gt;                {&lt;br /&gt;                    //get the reference of first column&lt;br /&gt;                    cell = grid.rows[i].cells[0];&lt;br /&gt;                    &lt;br /&gt;                    //loop according to the number of childNodes in the cell&lt;br /&gt;                    for (j=0; j&amp;lt;cell.childNodes.length; j++)&lt;br /&gt;                    {           &lt;br /&gt;                        //if childNode type is CheckBox                 &lt;br /&gt;                        if (cell.childNodes[j].type =="checkbox")&lt;br /&gt;                        {&lt;br /&gt;                        //assign the status of the Select All checkbox to the cell checkbox within the grid&lt;br /&gt;                            cell.childNodes[j].checked = true;&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;          function UnSelectAll()&lt;br /&gt;        {&lt;br /&gt;            var grid = document.getElementById("&amp;lt;%= gvMenuListItems.ClientID %&amp;gt;");&lt;br /&gt;            var cell;&lt;br /&gt;            if (grid.rows.length &amp;gt; 0)&lt;br /&gt;            {&lt;br /&gt;                for (i=1; i&amp;lt;grid.rows.length; i++)&lt;br /&gt;                {&lt;br /&gt;                    cell = grid.rows[i].cells[0];&lt;br /&gt;                        if (cell.childNodes[0].type =="checkbox")&lt;br /&gt;                        {&lt;br /&gt;                            cell.childNodes[0].checked = false;&lt;br /&gt;                        }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;        function Check()&lt;br /&gt;        {&lt;br /&gt;            var grid = document.getElementById("&amp;lt;%= gvMenuListItems.ClientID %&amp;gt;");&lt;br /&gt;            var cell;&lt;br /&gt;            var check=false;&lt;br /&gt;            if (grid.rows.length &amp;gt; 0)&lt;br /&gt;            {&lt;br /&gt;                for (i=1; i&amp;lt;grid.rows.length; i++)&lt;br /&gt;                {&lt;br /&gt;                    cell = grid.rows[i].cells[0];&lt;br /&gt;                        if (cell.childNodes[0].type =="checkbox")&lt;br /&gt;                        {&lt;br /&gt;                            if(cell.childNodes[0].checked == true)&lt;br /&gt;                            check=true;&lt;br /&gt;                        }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            if(check==false)&lt;br /&gt;            {&lt;br /&gt;                alert('No Item(s) Selected.');&lt;br /&gt;                return false;&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;              return  confirm('Are You Sure. Selected Items Will Be Deleted.');&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    &amp;lt;/script&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-3013283181365422403?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/3013283181365422403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=3013283181365422403&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3013283181365422403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3013283181365422403'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/04/all-none.html' title='Select and UnSelect Checkbox in Gridview using Javascript'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-2577173813966807527</id><published>2009-04-09T23:29:00.000-07:00</published><updated>2009-04-09T23:37:01.067-07:00</updated><title type='text'>In Valid Postback in asp.net</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Invalid Post back or callback argument . Event validations enabled using&lt;pages enableEventValidation="true"&gt;in configeration&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In .aspx file&lt;br /&gt;&lt;br /&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true"   EnableEventValidation="false" CodeFile="Default5.aspx.cs" Inherits="Default5" %&amp;gt;&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;In web.config file&lt;br /&gt;&lt;br /&gt;&amp;lt;pages enableEventValidation="false"&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-2577173813966807527?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/2577173813966807527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=2577173813966807527&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/2577173813966807527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/2577173813966807527'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/04/in-valid-postback-in-aspnet.html' title='In Valid Postback in asp.net'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-6720306248286946260</id><published>2009-03-29T21:22:00.000-07:00</published><updated>2009-03-29T21:35:01.629-07:00</updated><title type='text'>opening child web page and tranfer data between pages in javascript</title><content type='html'>&lt;span class="Apple-style-span"   style="  ;font-family:Verdana;font-size:12px;"&gt;&lt;p style="font-size: 11px; "&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="font-size: 11px; "&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;&lt;!-- function closeWindow() {  window.opener.updateParent('Some value to send to parent');  window.close(); } // --&gt;&lt;br /&gt;&lt;/script&gt;&lt;/p&gt;&lt;/span&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;&lt;!-- function closeWindow() {  window.opener.updateParent('Some value to send to parent');  window.close(); } // --&gt;&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-6720306248286946260?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/6720306248286946260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=6720306248286946260&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6720306248286946260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6720306248286946260'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/03/opening-child-web-page-and-tranfer-data.html' title='opening child web page and tranfer data between pages in javascript'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-6492391513865921451</id><published>2009-03-26T03:52:00.001-07:00</published><updated>2009-03-26T03:52:26.061-07:00</updated><title type='text'></title><content type='html'>&lt;iframe src="http://rcm.amazon.com/e/cm?t=httpsvsvinfob-20&amp;o=1&amp;p=13&amp;l=ur1&amp;category=wireless&amp;banner=0SESQPYNEXXSWMYDWG02&amp;f=ifr" width="468" height="60" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-6492391513865921451?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/6492391513865921451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=6492391513865921451&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6492391513865921451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/6492391513865921451'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/03/blog-post.html' title=''/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-3284723599637609655</id><published>2009-03-26T03:35:00.000-07:00</published><updated>2009-03-26T03:39:46.423-07:00</updated><title type='text'>Javascript validations in asp.net</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: verdana; font-size: 13px; "&gt;&lt;p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;In this just make a form as follows:&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Name : &lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;asp&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;TextBox&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;ID&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;="txtName"&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Email : &lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;asp&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;TextBox&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;ID&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;="txtEmail"&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Web URL : &lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;asp&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;TextBox&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;ID&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;="txtWebUrl"&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Zip : &lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;asp&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;TextBox&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;ID&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;="txtZip"&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;asp&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;Button&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;ID&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;="btnSubmit"&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;OnClientClick&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;=" return validate()"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;runat&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;="server"&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;Text&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;="Submit"&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Now on the source code of this form in script tag write the following code:&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;color:#800000;"&gt;script&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;language&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;="javascript"&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:85%;color:#0000ff;"&gt;="text/javascript"&gt;&lt;br /&gt;function&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt; validate()&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;      if&lt;/span&gt;&lt;span style="font-size:85%;"&gt;(document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtName.ClientID%&gt;"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;).value==&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;""&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;)&lt;br /&gt;      {&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;                 alert(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Name Feild can not be blank"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;);&lt;br /&gt;                 document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtName.ClientID%&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;).focus();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;                 return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;;&lt;br /&gt;      }&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;      if&lt;/span&gt;&lt;span style="font-size:85%;"&gt;(document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtEmail.ClientID %&gt;"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;).value==&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;""&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;)&lt;br /&gt;      {&lt;br /&gt;                 alert(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Email id can not be blank"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;                document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtEmail.ClientID %&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;).focus();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;                return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;;&lt;br /&gt;      }&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;     var&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt; emailPat = /^(\".*\"|[A-Za-z]\w*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;     var&lt;/span&gt;&lt;span style="font-size:85%;"&gt; emailid=document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtEmail.ClientID %&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;).value;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;     var&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt; matchArray = emailid.match(emailPat);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;     if&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (matchArray == &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;null&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;)&lt;br /&gt;    {&lt;br /&gt;               alert(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Your email address seems incorrect. Please try again."&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;);&lt;br /&gt;               document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtEmail.ClientID %&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;).focus();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;               return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;    if&lt;/span&gt;&lt;span style="font-size:85%;"&gt;(document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtWebURL.ClientID %&gt;"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;).value==&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;""&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;)&lt;br /&gt;    {&lt;br /&gt;               alert(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Web URL can not be blank"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;);&lt;br /&gt;               document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtWebURL.ClientID %&gt;"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;).value=&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"http://"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;               document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtWebURL.ClientID %&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;).focus();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;               return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;    var&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Url=&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&amp;amp;\?\/.=]+$"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;    var&lt;/span&gt;&lt;span style="font-size:85%;"&gt; tempURL=document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtWebURL.ClientID%&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;).value;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;    var&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt; matchURL=tempURL.match(Url);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;     if&lt;/span&gt;&lt;span style="font-size:85%;"&gt;(matchURL==&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;null&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;)&lt;br /&gt;     {&lt;br /&gt;               alert(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Web URL does not look valid"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;);&lt;br /&gt;               document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtWebURL.ClientID %&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;).focus();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;               return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;;&lt;br /&gt;     }&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;     if&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtZIP.ClientID%&gt;"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;).value==&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;""&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;)&lt;br /&gt;     {&lt;br /&gt;               alert(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Zip Code is not valid"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;);&lt;br /&gt;               document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtZIP.ClientID%&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;).focus();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;               return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;;&lt;br /&gt;     }&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;     var&lt;/span&gt;&lt;span style="font-size:85%;"&gt; digits=&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"0123456789"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;     var&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt; temp;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;     for&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;var&lt;/span&gt;&lt;span style="font-size:85%;"&gt; i=0;i&lt;document.getelementbyid(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtZIP.ClientID %&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;).value.length;i++)&lt;br /&gt;     {&lt;br /&gt;               temp=document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtZIP.ClientID%&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;).value.substring(i,i+1);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;               if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt; (digits.indexOf(temp)==-1)&lt;br /&gt;               {&lt;br /&gt;                        alert(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"Please enter correct zip code"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;);&lt;br /&gt;                        document.getElementById(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"&lt;%=txtZIP.ClientID%&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;).focus();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;                        return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;;&lt;br /&gt;               }&lt;br /&gt;     }&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;     return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;/&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;script&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;And in code behind file just write the below code.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;Protected&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;Sub&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Page_Load(&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;ByVal&lt;/span&gt;&lt;span style="font-size:85%;"&gt; sender &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;As&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;Object&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;ByVal&lt;/span&gt;&lt;span style="font-size:85%;"&gt; e &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;As&lt;/span&gt;&lt;span style="font-size:85%;"&gt; System.EventArgs) &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;Handles&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;Me&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;.Load&lt;br /&gt;               btnSubmit.Attributes.Add(&lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"onclick"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;, &lt;/span&gt;&lt;span style="font-size:85%;color:#800000;"&gt;"return validate()"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;End&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Now you will get a form with proper validation.&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-3284723599637609655?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/3284723599637609655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=3284723599637609655&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3284723599637609655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/3284723599637609655'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/03/javascript-validations-in-aspnet.html' title='Javascript validations in asp.net'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-26703295514003502</id><published>2009-03-26T03:07:00.000-07:00</published><updated>2009-03-26T03:13:05.031-07:00</updated><title type='text'>encrypting and decrypting data or password in c#</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'times new roman'; "&gt;&lt;table border="0" cellpadding="0" cellspacing="0" width="920"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="760"&gt;&lt;br /&gt;&lt;h1&gt;&lt;span style="font-size:180%;"&gt;Encrypting and decrypting data&lt;/span&gt;&lt;/h1&gt;&lt;div class="entryBody"&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;a href="http://www.filesland.com/download/encrypt-33.html"&gt;Encryption software&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt; &lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;&lt;span style="color:#000000;"&gt;I am seeing a lot of questions people are asking on how to do encryption/decryption. To help those people I have written a simple class encorporating several encryption/decryption functions:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;div class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;byte[] Encrypt(byte[] clearData, byte[] Key, byte[] IV)&lt;/strong&gt; - encrypts a byte array with a key and an IV and returns a byte array;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;string Encrypt(string clearText, string Password) - &lt;/strong&gt;encrypts a string with a password and returns a string;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;byte[] Encrypt(byte[] clearData, string Password) &lt;/strong&gt;- encrypts a byte array with a password and returns a byte array;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;void Encrypt(string fileIn, string fileOut, string Password) - &lt;/strong&gt;encrypts a file with a password and writes the encrypted bytes into another file.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;&lt;span style="color:#000000;"&gt;For each of those there is also a corresponding &lt;strong&gt;Decrypt&lt;/strong&gt; function. The &lt;strong&gt;Main &lt;/strong&gt;method is a simple&lt;a href="http://www.dotnetthis.com/Articles/Crypto.htm#" class="kLink" target="undefined" id="KonaLink0" style="position: static; color: blue !important; text-decoration: underline; cursor: pointer; font-family: verdana; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-top-style: none !important; border-right-style: none !important; border-bottom-style: none !important; border-left-style: none !important; border-top-color: transparent !important; border-right-color: transparent !important; border-bottom-color: transparent !important; border-left-color: transparent !important; background-image: none !important; background-repeat: initial !important; background-attachment: initial !important; -webkit-background-clip: initial !important; -webkit-background-origin: initial !important; background-color: transparent !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; text-transform: none !important; display: inline !important; font-variant: normal; top: 0px; right: 0px; bottom: 0px; left: 0px; background-position: initial initial !important; "&gt;&lt;span style="color: blue !important; font-family: 'Courier New'; font-weight: normal; font-size: 13px; position: static; color:blue;"&gt;&lt;span class="kLink" style="font-family: 'Courier New'; font-weight: normal; font-size: 13px; position: static; border-top-width: 0px !important; border-top-style: none !important; border-top-color: initial !important; border-left-width: 0px !important; border-left-style: none !important; border-left-color: initial !important; border-right-width: 0px !important; border-right-style: none !important; border-right-color: initial !important; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: initial; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 1px !important; padding-left: 0px !important; color: blue; background-image: none; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: transparent; width: auto !important; float: none !important; display: inline !important; background-position: initial initial; "&gt;testing&lt;/span&gt;&lt;/span&gt;&lt;span id="preLoadWrap0" style="position: relative; "&gt;&lt;/span&gt;&lt;/a&gt; method that exercises some of those functions. The 2nd and the 3rd Encrypt functions call into the 1st function, so you will need to carry the 1st one around if you are using the 2nd or the 3rd. The last Encrypt function (the one that works with files) is standalone. I made it operate in a stream-like manner, without reading the whole file into memory, which makes it possible to encrypt/decrypt gigabytes of data without going out of memory space.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt; &lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;&lt;span style="color:#000000;"&gt;I am using Rijndael algorithm in this sample. The reason for this is that it is 100% implemented in managed code in our libraries, so it does not rely on CryptoAPI or any encryption packs and will work everywhere. If you need performance I would suggest replacing it with TripleDES (it is a one line change), and if you do, also do not forget to change the IV size to 8 bytes and the Key size to 16 bytes.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt; &lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;&lt;span style="color:#000000;"&gt;I have tried to &lt;a href="http://www.dotnetthis.com/Articles/Crypto.htm#" class="kLink" target="undefined" id="KonaLink1" style="position: static; color: blue !important; text-decoration: underline; cursor: pointer; font-family: verdana; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-top-style: none !important; border-right-style: none !important; border-bottom-style: none !important; border-left-style: none !important; border-top-color: transparent !important; border-right-color: transparent !important; border-bottom-color: transparent !important; border-left-color: transparent !important; background-image: none !important; background-repeat: initial !important; background-attachment: initial !important; -webkit-background-clip: initial !important; -webkit-background-origin: initial !important; background-color: transparent !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; text-transform: none !important; display: inline !important; font-variant: normal; top: 0px; right: 0px; bottom: 0px; left: 0px; background-position: initial initial !important; "&gt;&lt;span style="color: blue !important; font-family: 'Courier New'; font-weight: normal; font-size: 13px; position: static; color:blue;"&gt;&lt;span class="kLink" style="font-family: 'Courier New'; font-weight: normal; font-size: 13px; position: static; border-top-width: 0px !important; border-top-style: none !important; border-top-color: initial !important; border-left-width: 0px !important; border-left-style: none !important; border-left-color: initial !important; border-right-width: 0px !important; border-right-style: none !important; border-right-color: initial !important; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: initial; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 1px !important; padding-left: 0px !important; color: blue; background-image: none; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: transparent; width: auto !important; float: none !important; display: inline !important; background-position: initial initial; "&gt;document&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; the code well, and I would like to encourage you to read through it and understand how it works, it should be pretty easy. You can also grab the whole thing, stick it into a .cs file and it should compile. If you run it you will see it make some test encryption/decryption roundtrip; you can also provide a file name as a parameter, and it will encrypt the file into a &lt;name&gt;.encrypted file and then decrypt it back into a &lt;name&gt;.decrypted.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt; &lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;&lt;span style="color:#000000;"&gt;Enjoy!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt; &lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;P.S. A crypto-related FAQ can be found at &lt;a href="http://www.gotdotnet.com/team/clr/cryptofaq.htm"&gt;&lt;u&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;http://www.gotdotnet.com/team/clr/cryptofaq.htm &lt;/span&gt;&lt;/u&gt;&lt;/a&gt; and there is a good chapter on how to use crypto in "Writing Secure Code" by Michael Howard (2nd edition came out recently). For in depth information on crypto in general "Applied Cryptography" by Bruce Schneier is an excellent resource.&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt; &lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt; &lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt; &lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;//&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;//    This sample code is provided "AS IS" with no warranties, and confers no rights.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;//&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;//    ATTENTION: This sample is designed to be more of a tutorial rather than something&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;//                you can copy and paste in the production code!&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;//                See the topic on "making &lt;a href="http://www.dotnetthis.com/Articles/Crypto.htm#" class="kLink" target="undefined" id="KonaLink2" style="position: static; color: blue !important; text-decoration: underline; cursor: pointer; font-family: verdana; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-top-style: none !important; border-right-style: none !important; border-bottom-style: none !important; border-left-style: none !important; border-top-color: transparent !important; border-right-color: transparent !important; border-bottom-color: transparent !important; border-left-color: transparent !important; background-image: none !important; background-repeat: initial !important; background-attachment: initial !important; -webkit-background-clip: initial !important; -webkit-background-origin: initial !important; background-color: transparent !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; text-transform: none !important; display: inline !important; font-variant: normal; top: 0px; right: 0px; bottom: 0px; left: 0px; background-position: initial initial !important; "&gt;&lt;span style="color: blue !important; font-family: 'Courier New'; font-weight: normal; font-size: 13px; position: static; color:blue;"&gt;&lt;span class="kLink" style="font-family: 'Courier New'; font-weight: normal; font-size: 13px; position: static; border-top-width: 0px !important; border-top-style: none !important; border-top-color: initial !important; border-left-width: 0px !important; border-left-style: none !important; border-left-color: initial !important; border-right-width: 0px !important; border-right-style: none !important; border-right-color: initial !important; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: initial; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 1px !important; padding-left: 0px !important; color: blue; background-image: none; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: transparent; width: auto !important; float: none !important; display: inline !important; background-position: initial initial; "&gt;it &lt;/span&gt;&lt;span class="kLink" style="font-family: 'Courier New'; font-weight: normal; font-size: 13px; position: static; border-top-width: 0px !important; border-top-style: none !important; border-top-color: initial !important; border-left-width: 0px !important; border-left-style: none !important; border-left-color: initial !important; border-right-width: 0px !important; border-right-style: none !important; border-right-color: initial !important; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: initial; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 1px !important; padding-left: 0px !important; color: blue; background-image: none; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: transparent; width: auto !important; float: none !important; display: inline !important; background-position: initial initial; "&gt;industry&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; strength" in the blog.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;//&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; "&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt; System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; "&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt; System.IO;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; "&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt; System.&lt;b&gt;&lt;span style="color: navy; "&gt;&lt;a href="http://www.dotnetthis.com/Articles/Crypto.htm#" class="kLink" target="undefined" id="KonaLink3" style="position: static; color: blue !important; text-decoration: underline; cursor: pointer; font-family: verdana; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-top-style: none !important; border-right-style: none !important; border-bottom-style: none !important; border-left-style: none !important; border-top-color: transparent !important; border-right-color: transparent !important; border-bottom-color: transparent !important; border-left-color: transparent !important; background-image: none !important; background-repeat: initial !important; background-attachment: initial !important; -webkit-background-clip: initial !important; -webkit-background-origin: initial !important; background-color: transparent !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; text-transform: none !important; display: inline !important; font-variant: normal; top: 0px; right: 0px; bottom: 0px; left: 0px; background-position: initial initial !important; "&gt;&lt;span style="color: blue !important; font-family: 'Courier New'; font-weight: bold; font-size: 13px; position: static; color:blue;"&gt;&lt;span class="kLink" style="font-family: 'Courier New'; font-weight: bold; font-size: 13px; position: static; border-top-width: 0px !important; border-top-style: none !important; border-top-color: initial !important; border-left-width: 0px !important; border-left-style: none !important; border-left-color: initial !important; border-right-width: 0px !important; border-right-style: none !important; border-right-color: initial !important; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: initial; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 1px !important; padding-left: 0px !important; color: blue; background-image: none; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: transparent; width: auto !important; float: none !important; display: inline !important; background-position: initial initial; "&gt;Security&lt;/span&gt;&lt;/span&gt;&lt;span id="preLoadWrap3" style="position: relative; "&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;.Cryptography;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;//&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;// Sample encrypt/decrypt functions&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;//    Parameter checks and error handling are ommited for better readability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: green; font-family: 'Courier New'; "&gt;//&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; "&gt;public&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt; &lt;span style="color: blue; "&gt;class&lt;/span&gt; EncDec&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;// Encrypt a byte array into a byte array using a key and an IV&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: blue; "&gt;public&lt;/span&gt; &lt;span style="color: blue; "&gt;static&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] Encrypt(&lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] clearData, &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] Key, &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] IV)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Create a MemoryStream that is going to accept the encrypted bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;MemoryStream&lt;/span&gt;&lt;/b&gt; ms = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;MemoryStream&lt;/span&gt;&lt;/b&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Create a symmetric algorithm.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We are going to use Rijndael because it is strong and available on all platforms.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// You can use other algorithms, to do so substitute the next line with something like&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;//                      TripleDES alg = TripleDES.Create();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;Rijndael&lt;/span&gt;&lt;/b&gt; alg = &lt;b&gt;&lt;span style="color: navy; "&gt;Rijndael&lt;/span&gt;&lt;/b&gt;.Create();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now set the key and the IV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We need the IV (Initialization Vector) because the algorithm is operating in its default&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// mode called CBC (Cipher Block Chaining). The IV is XORed with the first block (8 byte)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// of the data before it is encrypted, and then each encrypted block is XORed with the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// following block of plaintext. This is done to make encryption more secure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// There is also a mode called ECB which does not need an IV, but it is much less secure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            alg.Key = Key;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            alg.IV = IV;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Create a CryptoStream through which we are going to be pumping our data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// CryptoStreamMode.Write means that we are going to be writing data to the stream&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// and the output will be written in the MemoryStream we have provided.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStream&lt;/span&gt;&lt;/b&gt; cs = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStream&lt;/span&gt;&lt;/b&gt;(ms, alg.CreateEncryptor(),&lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStreamMode&lt;/span&gt;&lt;/b&gt;.Write);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Write the data and make it do the encryption&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            cs.Write(clearData, 0, clearData.Length);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Close the crypto stream (or do FlushFinalBlock).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// This will tell it that we have done our encryption and there is no more data coming in,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// and it is now a good time to apply the padding and finalize the encryption process.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            cs.Close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now get the encrypted data from the MemoryStream.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Some people make a mistake of using GetBuffer() here, which is not the right way.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] encryptedData = ms.ToArray();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;return&lt;/span&gt; encryptedData;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;// Encrypt a string into a string using a password&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;//    Uses Encrypt(byte[], byte[], byte[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: blue; "&gt;public&lt;/span&gt; &lt;span style="color: blue; "&gt;static&lt;/span&gt; &lt;span style="color: blue; "&gt;string&lt;/span&gt; Encrypt(&lt;span style="color: blue; "&gt;string&lt;/span&gt; clearText, &lt;span style="color: blue; "&gt;string&lt;/span&gt; Password)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// First we need to turn the input string into a byte array.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] clearBytes = System.Text.&lt;b&gt;&lt;span style="color: navy; "&gt;Encoding&lt;/span&gt;&lt;/b&gt;.Unicode.GetBytes(clearText);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Then, we need to turn the password into Key and IV&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We are using salt to make it harder to guess our key using a dictionary attack -&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// trying to guess a password by enumerating all possible words.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt; pdb = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt;(Password,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                        &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] {0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d,  0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now get the key/IV and do the encryption using the function that accepts byte arrays.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Using PasswordDeriveBytes object we are first getting 32 bytes for the Key&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// (the default Rijndael key length is 256bit = 32bytes) and then 16 bytes for the IV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// IV should always be the block size, which is by default 16 bytes (128 bit) for Rijndael.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// If you are using DES/TripleDES/RC2 the block size is 8 bytes and so should be the IV size.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// You can also read KeySize/BlockSize properties off the algorithm to find out the sizes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] encryptedData = Encrypt(clearBytes, pdb.GetBytes(32), pdb.GetBytes(16));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now we need to turn the resulting byte array into a string.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// A common mistake would be to use an Encoding class for that. It does not work&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// because not all byte values can be represented by characters.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We are going to be using Base64 encoding that is designed exactly for what we are&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// trying to do.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;return&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;Convert&lt;/span&gt;&lt;/b&gt;.ToBase64String(encryptedData);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;           &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;// Encrypt bytes into bytes using a password&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;//    Uses Encrypt(byte[], byte[], byte[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: blue; "&gt;public&lt;/span&gt; &lt;span style="color: blue; "&gt;static&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] Encrypt(&lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] clearData, &lt;span style="color: blue; "&gt;string&lt;/span&gt; Password)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We need to turn the password into Key and IV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We are using salt to make it harder to guess our key using a dictionary attack -&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// trying to guess a password by enumerating all possible words.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt; pdb = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt;(Password,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                        &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] {0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d,  0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now get the key/IV and do the encryption using the function that accepts byte arrays.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Using PasswordDeriveBytes object we are first getting 32 bytes for the Key&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// (the default Rijndael key length is 256bit = 32bytes) and then 16 bytes for the IV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// IV should always be the block size, which is by default 16 bytes (128 bit) for Rijndael.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// If you are using DES/TripleDES/RC2 the block size is 8 bytes and so should be the IV size.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// You can also read KeySize/BlockSize properties off the algorithm to find out the sizes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;return&lt;/span&gt; Encrypt(clearData, pdb.GetBytes(32), pdb.GetBytes(16));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;// Encrypt a file into another file using a password&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: blue; "&gt;public&lt;/span&gt; &lt;span style="color: blue; "&gt;static&lt;/span&gt; &lt;span style="color: blue; "&gt;void&lt;/span&gt; Encrypt(&lt;span style="color: blue; "&gt;string&lt;/span&gt; fileIn, &lt;span style="color: blue; "&gt;string&lt;/span&gt; fileOut, &lt;span style="color: blue; "&gt;string&lt;/span&gt; Password)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// First we are going to open the file streams&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;FileStream&lt;/span&gt;&lt;/b&gt; fsIn = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;FileStream&lt;/span&gt;&lt;/b&gt;(fileIn, &lt;b&gt;&lt;span style="color: navy; "&gt;FileMode&lt;/span&gt;&lt;/b&gt;.Open, &lt;b&gt;&lt;span style="color: navy; "&gt;FileAccess&lt;/span&gt;&lt;/b&gt;.Read);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;FileStream&lt;/span&gt;&lt;/b&gt; fsOut = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;FileStream&lt;/span&gt;&lt;/b&gt;(fileOut, &lt;b&gt;&lt;span style="color: navy; "&gt;FileMode&lt;/span&gt;&lt;/b&gt;.OpenOrCreate,&lt;b&gt;&lt;span style="color: navy; "&gt;FileAccess&lt;/span&gt;&lt;/b&gt;.Write);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Then we are going to derive a Key and an IV from the Password and create an algorithm&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt; pdb = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt;(Password,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                        &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] {0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d,  0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;Rijndael&lt;/span&gt;&lt;/b&gt; alg = &lt;b&gt;&lt;span style="color: navy; "&gt;Rijndael&lt;/span&gt;&lt;/b&gt;.Create();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            alg.Key = pdb.GetBytes(32);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            alg.IV = pdb.GetBytes(16);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now create a crypto stream through which we are going to be pumping data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Our fileOut is going to be receiving the encrypted bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStream&lt;/span&gt;&lt;/b&gt; cs = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStream&lt;/span&gt;&lt;/b&gt;(fsOut, alg.CreateEncryptor(),&lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStreamMode&lt;/span&gt;&lt;/b&gt;.Write);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now will will initialize a buffer and will be processing the input file in chunks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// This is done to avoid reading the whole file (which can be huge) into memory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;int&lt;/span&gt; bufferLen = 4096;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] buffer = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[bufferLen];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;int&lt;/span&gt; bytesRead;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;           &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;do&lt;/span&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  &lt;span style="color: green; "&gt;// read a chunk of data from the input file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  bytesRead = fsIn.Read(buffer, 0, bufferLen);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  &lt;span style="color: green; "&gt;// encrypt it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  cs.Write(buffer, 0, bytesRead);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;           &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            } &lt;span style="color: blue; "&gt;while&lt;/span&gt;(bytesRead != 0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// close everything&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            cs.Close(); &lt;span style="color: green; "&gt;// this will also close the unrelying fsOut stream&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            fsIn.Close();    &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;// Decrypt a byte array into a byte array using a key and an IV&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: blue; "&gt;public&lt;/span&gt; &lt;span style="color: blue; "&gt;static&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] Decrypt(&lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] cipherData, &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] Key, &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] IV)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Create a MemoryStream that is going to accept the decrypted bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;MemoryStream&lt;/span&gt;&lt;/b&gt; ms = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;MemoryStream&lt;/span&gt;&lt;/b&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Create a symmetric algorithm.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We are going to use Rijndael because it is strong and available on all platforms.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// You can use other algorithms, to do so substitute the next line with something like&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;//                      TripleDES alg = TripleDES.Create();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;Rijndael&lt;/span&gt;&lt;/b&gt; alg = &lt;b&gt;&lt;span style="color: navy; "&gt;Rijndael&lt;/span&gt;&lt;/b&gt;.Create();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now set the key and the IV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We need the IV (Initialization Vector) because the algorithm is operating in its default&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// mode called CBC (Cipher Block Chaining). The IV is XORed with the first block (8 byte)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// of the data after it is decrypted, and then each decrypted block is XORed with the previous&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// cipher block. This is done to make encryption more secure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// There is also a mode called ECB which does not need an IV, but it is much less secure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            alg.Key = Key;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            alg.IV = IV;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Create a CryptoStream through which we are going to be pumping our data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// CryptoStreamMode.Write means that we are going to be writing data to the stream&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// and the output will be written in the MemoryStream we have provided.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStream&lt;/span&gt;&lt;/b&gt; cs = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStream&lt;/span&gt;&lt;/b&gt;(ms, alg.CreateDecryptor(),&lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStreamMode&lt;/span&gt;&lt;/b&gt;.Write);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Write the data and make it do the decryption&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            cs.Write(cipherData, 0, cipherData.Length);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Close the crypto stream (or do FlushFinalBlock).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// This will tell it that we have done our decryption and there is no more data coming in,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// and it is now a good time to remove the padding and finalize the decryption process.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            cs.Close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now get the decrypted data from the MemoryStream.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Some people make a mistake of using GetBuffer() here, which is not the right way.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] decryptedData = ms.ToArray();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;return&lt;/span&gt; decryptedData;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;// Decrypt a string into a string using a password&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;//    Uses Decrypt(byte[], byte[], byte[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: blue; "&gt;public&lt;/span&gt; &lt;span style="color: blue; "&gt;static&lt;/span&gt; &lt;span style="color: blue; "&gt;string&lt;/span&gt; Decrypt(&lt;span style="color: blue; "&gt;string&lt;/span&gt; cipherText, &lt;span style="color: blue; "&gt;string&lt;/span&gt; Password)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// First we need to turn the input string into a byte array.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We presume that Base64 encoding was used&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] cipherBytes = &lt;b&gt;&lt;span style="color: navy; "&gt;Convert&lt;/span&gt;&lt;/b&gt;.FromBase64String(cipherText);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Then, we need to turn the password into Key and IV&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We are using salt to make it harder to guess our key using a dictionary attack -&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// trying to guess a password by enumerating all possible words.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt; pdb = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt;(Password,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                        &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] {0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d,  0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now get the key/IV and do the decryption using the function that accepts byte arrays.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Using PasswordDeriveBytes object we are first getting 32 bytes for the Key&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// (the default Rijndael key length is 256bit = 32bytes) and then 16 bytes for the IV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// IV should always be the block size, which is by default 16 bytes (128 bit) for Rijndael.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// If you are using DES/TripleDES/RC2 the block size is 8 bytes and so should be the IV size.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// You can also read KeySize/BlockSize properties off the algorithm to find out the sizes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] decryptedData = Decrypt(cipherBytes, pdb.GetBytes(32), pdb.GetBytes(16));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now we need to turn the resulting byte array into a string.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// A common mistake would be to use an Encoding class for that. It does not work&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// because not all byte values can be represented by characters.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We are going to be using Base64 encoding that is designed exactly for what we are&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// trying to do.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;return&lt;/span&gt; System.Text.&lt;b&gt;&lt;span style="color: navy; "&gt;Encoding&lt;/span&gt;&lt;/b&gt;.Unicode.GetString(decryptedData);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;           &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;// Decrypt bytes into bytes using a password&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;//    Uses Decrypt(byte[], byte[], byte[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: blue; "&gt;public&lt;/span&gt; &lt;span style="color: blue; "&gt;static&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] Decrypt(&lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] cipherData, &lt;span style="color: blue; "&gt;string&lt;/span&gt; Password)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We need to turn the password into Key and IV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// We are using salt to make it harder to guess our key using a dictionary attack -&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// trying to guess a password by enumerating all possible words.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt; pdb = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt;(Password,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                        &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] {0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d,  0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now get the key/IV and do the Decryption using the function that accepts byte arrays.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Using PasswordDeriveBytes object we are first getting 32 bytes for the Key&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// (the default Rijndael key length is 256bit = 32bytes) and then 16 bytes for the IV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// IV should always be the block size, which is by default 16 bytes (128 bit) for Rijndael.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// If you are using DES/TripleDES/RC2 the block size is 8 bytes and so should be the IV size.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// You can also read KeySize/BlockSize properties off the algorithm to find out the sizes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;return&lt;/span&gt; Decrypt(cipherData, pdb.GetBytes(32), pdb.GetBytes(16));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;// Decrypt a file into another file using a password&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: blue; "&gt;public&lt;/span&gt; &lt;span style="color: blue; "&gt;static&lt;/span&gt; &lt;span style="color: blue; "&gt;void&lt;/span&gt; Decrypt(&lt;span style="color: blue; "&gt;string&lt;/span&gt; fileIn, &lt;span style="color: blue; "&gt;string&lt;/span&gt; fileOut, &lt;span style="color: blue; "&gt;string&lt;/span&gt; Password)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// First we are going to open the file streams&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;FileStream&lt;/span&gt;&lt;/b&gt; fsIn = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;FileStream&lt;/span&gt;&lt;/b&gt;(fileIn, &lt;b&gt;&lt;span style="color: navy; "&gt;FileMode&lt;/span&gt;&lt;/b&gt;.Open, &lt;b&gt;&lt;span style="color: navy; "&gt;FileAccess&lt;/span&gt;&lt;/b&gt;.Read);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;FileStream&lt;/span&gt;&lt;/b&gt; fsOut = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;FileStream&lt;/span&gt;&lt;/b&gt;(fileOut, &lt;b&gt;&lt;span style="color: navy; "&gt;FileMode&lt;/span&gt;&lt;/b&gt;.OpenOrCreate,&lt;b&gt;&lt;span style="color: navy; "&gt;FileAccess&lt;/span&gt;&lt;/b&gt;.Write);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Then we are going to derive a Key and an IV from the Password and create an algorithm&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt; pdb = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;PasswordDeriveBytes&lt;/span&gt;&lt;/b&gt;(Password,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                        &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] {0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d,  0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;Rijndael&lt;/span&gt;&lt;/b&gt; alg = &lt;b&gt;&lt;span style="color: navy; "&gt;Rijndael&lt;/span&gt;&lt;/b&gt;.Create();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            alg.Key = pdb.GetBytes(32);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            alg.IV = pdb.GetBytes(16);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now create a crypto stream through which we are going to be pumping data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Our fileOut is going to be receiving the Decrypted bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStream&lt;/span&gt;&lt;/b&gt; cs = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStream&lt;/span&gt;&lt;/b&gt;(fsOut, alg.CreateDecryptor(),&lt;b&gt;&lt;span style="color: navy; "&gt;CryptoStreamMode&lt;/span&gt;&lt;/b&gt;.Write);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// Now will will initialize a buffer and will be processing the input file in chunks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// This is done to avoid reading the whole file (which can be huge) into memory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;int&lt;/span&gt; bufferLen = 4096;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[] buffer = &lt;span style="color: blue; "&gt;new&lt;/span&gt; &lt;span style="color: blue; "&gt;byte&lt;/span&gt;[bufferLen];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;int&lt;/span&gt; bytesRead;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;           &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;do&lt;/span&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  &lt;span style="color: green; "&gt;// read a chunk of data from the input file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  bytesRead = fsIn.Read(buffer, 0, bufferLen);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  &lt;span style="color: green; "&gt;// Decrypt it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  cs.Write(buffer, 0, bytesRead);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;           &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            } &lt;span style="color: blue; "&gt;while&lt;/span&gt;(bytesRead != 0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: green; "&gt;// close everything&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            cs.Close(); &lt;span style="color: green; "&gt;// this will also close the unrelying fsOut stream&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            fsIn.Close();    &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;//&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;// Testing function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;//    I am sure you will be able to figure out what it does!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: green; "&gt;//&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      &lt;span style="color: blue; "&gt;public&lt;/span&gt; &lt;span style="color: blue; "&gt;static&lt;/span&gt; &lt;span style="color: blue; "&gt;void&lt;/span&gt; Main(&lt;span style="color: blue; "&gt;string&lt;/span&gt;[] args)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;span style="color: blue; "&gt;if&lt;/span&gt; (args.Length == 0) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  &lt;span style="color: blue; "&gt;string&lt;/span&gt; plainText = "This is some plain text";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  &lt;span style="color: blue; "&gt;string&lt;/span&gt; Password = "Password";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  &lt;b&gt;&lt;span style="color: navy; "&gt;Console&lt;/span&gt;&lt;/b&gt;.WriteLine("Plain text: \"" + plainText + "\", Password: \"" + Password + "\"");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  &lt;span style="color: blue; "&gt;string&lt;/span&gt; cipherText = Encrypt(plainText, Password );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  &lt;b&gt;&lt;span style="color: navy; "&gt;Console&lt;/span&gt;&lt;/b&gt;.WriteLine("Encrypted text: " + cipherText);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  &lt;span style="color: blue; "&gt;string&lt;/span&gt; decryptedText = Decrypt(cipherText, Password);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  &lt;b&gt;&lt;span style="color: navy; "&gt;Console&lt;/span&gt;&lt;/b&gt;.WriteLine("Decrypted: " + decryptedText);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            } &lt;span style="color: blue; "&gt;else&lt;/span&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  Encrypt(args[0], args[0]+".encrypted", "Password");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;                  Decrypt(args[0]+".encrypted", args[0]+".decrypted", "Password");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;            &lt;b&gt;&lt;span style="color: navy; "&gt;Console&lt;/span&gt;&lt;/b&gt;.WriteLine("Done.");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;      }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; "&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt; &lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0in; margin-right: 0in; margin-top: 0in; margin-bottom: 0pt; "&gt; &lt;/p&gt;&lt;h3 class="entryTitle"&gt;Making it "industry strength"&lt;/h3&gt;&lt;div class="entryBody"&gt;The encryption sample above had a very defined purpose - being extremely easy to read and understand. While it explains how to use symmetric encryption classes and gives some ideas on how to start implementing encryption in your &lt;a href="http://www.dotnetthis.com/Articles/Crypto.htm#" class="kLink" target="undefined" id="KonaLink4" style="position: static; color: blue !important; text-decoration: underline; cursor: pointer; font-family: verdana; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-top-style: none !important; border-right-style: none !important; border-bottom-style: none !important; border-left-style: none !important; border-top-color: transparent !important; border-right-color: transparent !important; border-bottom-color: transparent !important; border-left-color: transparent !important; background-image: none !important; background-repeat: initial !important; background-attachment: initial !important; -webkit-background-clip: initial !important; -webkit-background-origin: initial !important; background-color: transparent !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; text-transform: none !important; display: inline !important; font-variant: normal; top: 0px; right: 0px; bottom: 0px; left: 0px; background-position: initial initial !important; "&gt;&lt;span style="color: blue !important; font-family: 'times new roman'; font-weight: normal; font-size: 16px; position: static; color:blue;"&gt;&lt;span class="kLink" style="font-family: 'times new roman'; font-weight: normal; font-size: 16px; position: static; border-top-width: 0px !important; border-top-style: none !important; border-top-color: initial !important; border-left-width: 0px !important; border-left-style: none !important; border-left-color: initial !important; border-right-width: 0px !important; border-right-style: none !important; border-right-color: initial !important; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: initial; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 1px !important; padding-left: 0px !important; color: blue; background-image: none; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: transparent; width: auto !important; float: none !important; display: inline !important; background-position: initial initial; "&gt;applications&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;, there are things you will have to do before it becomes a shippable piece of code. One of them I have already mentioned in the posting below - parameter checking and error handling. Check the parameters for being valid, wrap calls that can potentially fail into try/catch blocks, use finally blocks to release resources (close files) if something goes wrong, etc.&lt;p&gt;Some cryptography specific considerations should also be there. For example, the salt values in PasswordDeriveBytes should better be random rather than hardcoded (sometimes it is ok to have them hardcoded, for example, when encryption happens rarely and the code is not accessible by attackers). If the salt is random and changed frequently, you don't even have to keep it secret. Also, when possible, use byte[] keys as opposed to passwords. Because of the human factor, password-based encryption is not the most secure way to protect information. In order to get 128bit of key information out of a password it has to be long. If you are using just small letters that gives you about 5 bits of information per character and your password will have to be over 25 characters long to get to 128bit. If you are using capital letters and some symbols you can get to about 7 bits per character and your password minimum length to around 18 characters (how long is your password? ;-)).&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-26703295514003502?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/26703295514003502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=26703295514003502&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/26703295514003502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/26703295514003502'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/03/encrypting-and-decrypting-data-or.html' title='encrypting and decrypting data or password in c#'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-4702325197020030186</id><published>2009-03-26T03:03:00.000-07:00</published><updated>2009-03-26T03:07:17.861-07:00</updated><title type='text'>Reading and Writing TextFiles in C#</title><content type='html'>Text files provide a common denominator format where both people and programs can read and understand. The .NET Framework includes convenience classes that make reading and writing text files very easy. The following sequence outlines the basic steps necessary to work with text files:&lt;br /&gt;&lt;br /&gt;Open the file&lt;br /&gt;Read/Write to the file&lt;br /&gt;Close the file&lt;br /&gt;It's that simple.  Listing 1 shows how to write text data to a file.&lt;br /&gt;&lt;br /&gt;Writing to a Text File&lt;br /&gt;&lt;br /&gt;Listing 1: Writing Text Data to a File: TextFileWriter.cs&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;using System;&lt;br /&gt;using System.IO;&lt;br /&gt;&lt;br /&gt;namespace csharp_station.howto&lt;br /&gt;{&lt;br /&gt;    class TextFileWriter&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            // create a writer and open the file&lt;br /&gt;            TextWriter tw = new StreamWriter("date.txt");&lt;br /&gt;&lt;br /&gt;            // write a line of text to the file&lt;br /&gt;            tw.WriteLine(DateTime.Now);&lt;br /&gt;&lt;br /&gt;            // close the stream&lt;br /&gt;            tw.Close();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This program creates a text file when it runs. In the directory where the executable program is located, you'll find a file named date.txt. If you view the contents of this file, you'll see the following textual representation of the date and time when the program last ran:&lt;br /&gt;&lt;br /&gt;2/15/2002 8:54:51 PM&lt;br /&gt;The first task in Listing 1 is to open the file. This happens by instantiating a StreamWriter class, which returns an object of type TextWriter. The result could have also been assigned to a StreamWriter instance. The StreamWriter was called with a single parameter, indicating the name of the file to open. If this file doesn't exist, the StreamWriter will create it. The StreamWriter also has 6 other constructor overloads that permit you to specify the file in different ways, buffer info, and text encoding. Here's the line that opens the date.txt file:&lt;br /&gt;&lt;br /&gt;            &lt;span style="font-weight:bold;"&gt;TextWriter tw = new StreamWriter("date.txt");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using the TextWriter instance, tw, you can write text info to the file. The example writes the text for the current date and time, using the static Now property of the DateTime class. Here's the line from the code:&lt;br /&gt;&lt;br /&gt;            &lt;span style="font-weight:bold;"&gt;tw.WriteLine(DateTime.Now);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you're done writing to the file, be sure to close it as follows:&lt;br /&gt;&lt;br /&gt;            &lt;span style="font-weight:bold;"&gt;tw.Close();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Reading From a Text File&lt;br /&gt;&lt;br /&gt;Listing 2 shows how to read from a text file:&lt;br /&gt;&lt;br /&gt;Listing 2: Reading Text Data from a File: TextFileReader.cs&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;using System;&lt;br /&gt;using System.IO;&lt;br /&gt;&lt;br /&gt;namespace csharp_station.howto&lt;br /&gt;{&lt;br /&gt;    class TextFileReader&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            // create reader &amp; open file&lt;br /&gt;            Textreader tr = new StreamReader("date.txt");&lt;br /&gt;&lt;br /&gt;            // read a line of text&lt;br /&gt;            Console.WriteLine(tr.ReadLine());&lt;br /&gt;&lt;br /&gt;            // close the stream&lt;br /&gt;            tr.Close();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In Listing 2, the text file is opened in a manner similar to the method used in Listing 1, except it uses a StreamReader class constructor to create an instance of a Textreader. The StreamReader class includes additional overloads that allow you to specify the file in different ways, text format encoding, and buffer info. This program opens the date.txt file, which should be in the same directory as the executable file:&lt;br /&gt;&lt;br /&gt;            &lt;span style="font-weight:bold;"&gt;Textreader tr = new StreamReader("date.txt");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Within a Console.WriteLine statement, the program reads a line of text from the file, using the ReadLine() method of the Textreader instance. The Textreader class also includes methods that allow you to invoke the Read() method to read one or more character or use the Peek() method to see what the next character is without pulling it from the stream. Here's the code that reads an entire line from the text file:&lt;br /&gt;&lt;br /&gt;            &lt;span style="font-weight:bold;"&gt;Console.WriteLine(tr.ReadLine());&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When done reading, you should close the file as follows:&lt;br /&gt;&lt;br /&gt;            &lt;span style="font-weight:bold;"&gt;tr.Close();&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6431932517498765568-4702325197020030186?l=svsvinfo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://svsvinfo.blogspot.com/feeds/4702325197020030186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6431932517498765568&amp;postID=4702325197020030186&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4702325197020030186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6431932517498765568/posts/default/4702325197020030186'/><link rel='alternate' type='text/html' href='http://svsvinfo.blogspot.com/2009/03/reading-and-writing-textfiles-in-c.html' title='Reading and Writing TextFiles in C#'/><author><name>svsv</name><uri>http://www.blogger.com/profile/18072677466051930587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6431932517498765568.post-5079028288447828647</id><published>2009-03-08T23:15:00.000-07:00</published><updated>2009-03-08T23:32:37.669-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# and Asp.net'/><title type='text'>web.config ( web configuration) in brief</title><content type='html'>Web.config file as it sounds like is a configuration file for the Asp.net web application. There is one web.config file for one asp.net application which configures the particular application. Web.config file is written in XML with specific tags having specific meanings. This article will cover the web.config and how it can affect your applications.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What is Web.Config File?&lt;/span&gt;&lt;br /&gt;Web.config file as it sounds like is a configuration file for the Asp.net web application. There is one web.config file for one asp.net application which configures the particular application. Web.config file is written in XML with specific tags having specific meanings.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What is Machine.config File?&lt;/span&gt;&lt;br /&gt;As web.config file is used to configure one asp.net web application, same way Machine.config file is used to configure the application according to a particular machine. Meaning that configuration done in machine.config file is affected on any application that runs on a particular machine. Usually, this file is not altered and only web.config is used which configuring applications.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What can be stored in Web.config file?&lt;/span&gt;&lt;br /&gt;There are number of important settings that can be stored in the configuration file. Here are some of the most important configurations.&lt;br /&gt;&lt;br /&gt;1) Database connections&lt;br /&gt;&lt;br /&gt;2) Session States&lt;br /&gt;&lt;br /&gt;3) Error Handling&lt;br /&gt;&lt;br /&gt;4) Security&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Database Connections:&lt;/span&gt;&lt;br /&gt;The most important thing to store in the web.config file is the database connection string. The reason of storing connection string in the web.config file makes sense since if later we ever want to change the location of our database we just have to change the connection string in the web.config file and thats it. This will certainly save us a lot of alteration in different files where we used the old connection.&lt;br /&gt;&lt;br /&gt;Lets see a small example of the connection string which is stored in the web.config file.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JEdS6F9w0_Q/SbS2FXbByyI/AAAAAAAAADA/BZHaM30sJCQ/s1600-h/config.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 95px;" src="http://1.bp.blogspot.com/_JEdS6F9w0_Q/SbS2FXbByyI/AAAAAAAAADA/BZHaM30sJCQ/s320/config.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5311070063879637794" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you can see its really simple to store the connection string in the web.config file. The connection string is referenced by a key which in this case is "ConnectionString". The value attribute of the configuration file denotes the information about the database. Here we can see that if has database name, userid and password. You can define more options if you want.&lt;br /&gt;&lt;br /&gt;There is a very good website that deals with all sorts of connection strings. Its called www.connectionstrings.com , in the website you will find the connection strings of all sorts of databases.&lt;br /&gt;&lt;br /&gt;lets see how we access the connection string from our Asp.net web application.&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;using System.Configuration;&lt;br /&gt;&lt;br /&gt;string connectionString = (string )ConfigurationSettings.AppSettings["ConnectionString"];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you see its very simple to get the connection String out from the web.config and than use it in your application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Session States:&lt;/span&gt;&lt;br /&gt;Session in Asp.net web application is very important. As we know that HTTP is a stateless protocol and we needs session to keep the state alive. Asp.net stores the sessions in different ways. By default the session is stored in the asp.net process. You can always configure the application so that the session will be stored in one of the following ways.&lt;br
