tag:blogger.com,1999:blog-3317043606049397042024-03-15T13:21:34.719+05:30ASP With Arka | ASP.NET | C# | MS SQL Server | MVC | JQuery | JavaScript | AJAX | Json| Arkadeep DeLearn ASP in a simpler wayArkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.comBlogger124125tag:blogger.com,1999:blog-331704360604939704.post-33320381986797831752019-03-31T22:56:00.000+05:302019-03-31T22:57:23.123+05:30Azure Storage Account Part 1 & 2 Codeproject<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: #444444; font-family: "open sans" , "helvetica" , "arial" , sans-serif;"><span style=" font-size: 14px;">Kindly follow the below Codeproject links for more details.</span></span><br />
<ol style="text-align: left;">
<li><a href="https://www.codeproject.com/Articles/1273552/Azure-Storage-Account-Part-1-What-is-Blob" target="_blank">Azure Storage Account Part 1: What is Blob?</a></li>
<li><a href="https://www.codeproject.com/Articles/1273613/Azure-Storage-Account-Part-2-Upload-Files-in-Blob" target="_blank">Azure Storage Account Part 2: Upload Files in Blob Storage using C#</a></li>
</ol>
<br />
<br />
<span style="color: #444444; font-family: "open sans" , "helvetica" , "arial" , sans-serif;"><span style="background-color: white; font-size: 14px;"><br /></span></span>
<br />
<div>
<br /></div>
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com19tag:blogger.com,1999:blog-331704360604939704.post-12861476245411372892019-03-28T01:13:00.000+05:302019-03-28T01:13:17.053+05:30Delete Duplicate Rows in SQL Server using Common Table Expression<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Introduction:</h2>
<div>
Sometimes, some duplicate data may be inserted in the SQL table. But it's harmful to you and your application too. So how do you remove the duplicate rows in your table?</div>
<h2 style="text-align: left;">
Description</h2>
<div>
Take a look at the following table content. It has duplicate rows.<br />
<br /></div>
<table class="ArticleTable" style="background-color: white; border-bottom-color: initial; border-bottom-style: initial; border-collapse: collapse; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-right-color: initial; border-right-style: initial; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-width: 1px 0px 0px 1px; color: #111111; font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px;"><thead style="background-color: #ebf6ff; border: 0px; font-weight: bold; margin: 0px; padding: 0px;">
<tr style="border: 0px; line-height: 1.4; margin: 0px; padding: 0px;"><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;" width="50">Id</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;" width="100">Name</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;" width="150">Department</td></tr>
</thead><tbody style="border: 0px; margin: 0px; padding: 0px;">
<tr style="border: 0px; line-height: 1.4; margin: 0px; padding: 0px;"><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">1</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">Arka</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">.NET</td></tr>
<tr style="border: 0px; line-height: 1.4; margin: 0px; padding: 0px;"><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">2</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">Ashok</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">.NET</td></tr>
<tr style="border: 0px; line-height: 1.4; margin: 0px; padding: 0px;"><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">3</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">Anubhav</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">PHP</td></tr>
<tr style="border: 0px; line-height: 1.4; margin: 0px; padding: 0px;"><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">4</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">Arka</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">.NET</td></tr>
<tr style="border: 0px; line-height: 1.4; margin: 0px; padding: 0px;"><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">5</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">Sudeshna</td><td style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: initial; border-top-style: initial; border-width: 0px 1px 1px 0px; line-height: 1.4; margin: 0px; padding: 5px;">Graphics</td></tr>
</tbody></table>
<div>
<div style="color: #111111; font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.4;">
<span style="background-color: transparent;"><br /></span></div>
<div style="line-height: 1.4;">
<span style="background-color: transparent; font-size: 14px;"><span style="color: #111111; font-family: "segoe ui" , "arial" , sans-serif;">Row 1 and 4 are duplicates. So we have to remove one row and keep one in the table. Now the question is how to do this?</span></span></div>
<h2>
Using the Code</h2>
<div style="line-height: 1.4;">
<span style="color: #111111; font-family: "segoe ui" , "arial" , sans-serif; font-size: 14px;">To solve this problem, take a look at the following code. This will solve this problem.</span><br />
<span style="color: #111111; font-family: "segoe ui" , "arial" , sans-serif; font-size: 14px;"><br /></span></div>
<div style="background: #FBEDBB; border-right: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 5.0pt 0in 5.0pt 5.0pt;">
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: normal; margin-bottom: 0.0001pt; padding: 0in;">
<span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">WITH</span><span style="font-family: "consolas"; font-size: 9pt;"> tblTemp </span><span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">as</span><span style="font-family: "consolas"; font-size: 9pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: normal; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "consolas"; font-size: 9pt;">(<o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: normal; margin-bottom: 0.0001pt; padding: 0in;">
<span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">SELECT</span><span style="font-family: "consolas"; font-size: 9pt;"> ROW_NUMBER() </span><span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">Over</span><span style="font-family: "consolas"; font-size: 9pt;">(</span><span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">PARTITION</span><span style="font-family: "consolas"; font-size: 9pt;"> </span><span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">BY</span><span style="font-family: "consolas"; font-size: 9pt;"> Name,Department </span><span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">ORDER</span><span style="font-family: "consolas"; font-size: 9pt;"> </span><span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">BY</span><span style="font-family: "consolas"; font-size: 9pt;"> Name)<o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: normal; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "consolas"; font-size: 9pt;"> </span><span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">As</span><span style="font-family: "consolas"; font-size: 9pt;"> RowNumber,* </span><span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">FROM</span><span style="font-family: "consolas"; font-size: 9pt;"> <table_name><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: normal; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "consolas"; font-size: 9pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: normal; margin-bottom: 0.0001pt; padding: 0in;">
<span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">DELETE</span><span style="font-family: "consolas"; font-size: 9pt;"> </span><span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">FROM</span><span style="font-family: "consolas"; font-size: 9pt;"> tblTemp </span><span style="border: none 1.0pt; color: blue; font-family: "consolas"; font-size: 9.0pt; padding: 0in;">where</span><span style="font-family: "consolas"; font-size: 9pt;"> RowNumber >1<o:p></o:p></span></div>
</div>
<div style="background-color: white; line-height: 1.4;">
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><span style="color: #111111; font-family: "segoe ui" , "arial" , sans-serif; font-size: 14px;">After running, this code shows the table data, it will ensure that all unique rows are present.</span></o:p></div>
</div>
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com21tag:blogger.com,1999:blog-331704360604939704.post-91788879758521297982018-07-20T14:02:00.001+05:302018-07-20T14:02:29.675+05:30Deploy your site to Azure App service from Visual Studio<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #5e5e5e; font-family: "roboto" , "helvetica" , sans-serif; font-size: 16px;">Building your website and publishing it i Azure app service is simpler than publishing the site into a remote machine. There are several methods through which you can publish your site into Azure.</span><br />
<h4 style="background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #5e5e5e; font-family: "Playfair Display", serif; font-size: 16px; font-weight: 400; margin: 0.8em 0px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="border: 0px; box-sizing: inherit; font-family: inherit; font-style: inherit; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Import publisher file:</span></h4>
<div>
<span style="border: 0px; box-sizing: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"></span><br />
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; font-style: inherit; font-weight: 400; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="border: 0px; box-sizing: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">This is one of the easiest way t publish your site in Azure app service. First off all create a new app service or if you have an existing one, open the Overview section of that.</span></div>
<span style="border: 0px; box-sizing: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; font-style: inherit; font-weight: 400; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
You will find several options on the top of the Overview sections like Browse, Stop, Swap etc. There will be another one named <span style="border: 0px; box-sizing: inherit; font-family: inherit; font-style: inherit; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Get Publish Profile.</span> By clicking on that link a new file will be downloaded with .PublishSettings extension.</div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; font-style: inherit; font-weight: 400; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqT9pyck5o81IdIbJknTUxMX8HN0tpnma13-Xzo5wiuibbTB2W7fi39LHknJk6AHT0dpKs6cIFQEEmlTgS4kt1_F9NLeOm5VM-z-OfEsqzRFxEieHew61nxDRlLhxBUrqg6MFaigIGU0E/s1600/get-publish-profile.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="222" data-original-width="809" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqT9pyck5o81IdIbJknTUxMX8HN0tpnma13-Xzo5wiuibbTB2W7fi39LHknJk6AHT0dpKs6cIFQEEmlTgS4kt1_F9NLeOm5VM-z-OfEsqzRFxEieHew61nxDRlLhxBUrqg6MFaigIGU0E/s640/get-publish-profile.png" width="640" /></a></div>
<br /></div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; font-style: inherit; font-weight: 400; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
If you open the file in any text editor, you will find that, it is nothing but a XML file having 2 tags. One for web deployment and another for FTP deployment with your app name. Within that your will also find all the credential for your deployment. Both for FTP and web deploy. But as usual all password will be decrypted so it is harmless.</div>
<blockquote class="tr_bq" style="background-color: white; border: 0px; box-sizing: inherit; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"><publishProfile profileName=" - Web Deploy" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> publishMethod="MSDeploy" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> publishUrl=".scm.azurewebsites.net:443" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> msdeploySite="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> userName="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> userPWD="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> destinationAppUrl="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> SQLServerDBConnectionString="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> mySQLDBConnectionString="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> hostingProviderForumLink="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> controlPanelLink="http://windows.azure.com" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> webSystem="WebSites"></span><br />
<br />
<br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> <publishProfile profileName=" - FTP" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> publishMethod="FTP" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> publishUrl="/site/wwwroot" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> ftpPassiveMode="True" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> userName="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> userPWD="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> destinationAppUrl="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> SQLServerDBConnectionString="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> mySQLDBConnectionString="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> hostingProviderForumLink="" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> controlPanelLink="http://windows.azure.com" </span><br />
<span style="color: #5e5e5e; font-family: roboto, helvetica, sans-serif;"> webSystem="WebSites"></span></blockquote>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
Now open your Visual Studio IDE and create a new application. In case you have already created it go to the solution. Right click on the solution -> Click the publish option to open the publish dialog.</div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
Now in the publish dialog you will find an option named “Import”. Click on that option and a File dialog will be opened. Choose your file and click OK. After clicking OK it will automatically redirect to Connection tab in Publish web window.</div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUUiIC_bbkH4oVSDdoY14oX6PLzJdipwhtwK321aZohKuxzo5vNxBt4vVW4dOoAPSDsXO-4O7fWL9psgv5zS8Da8DSaFM9gkEmHZfJOrz6rcJKDpjuUBLqTq8r-2WBT_2SMUUVpnS4G2k/s1600/import.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="558" data-original-width="706" height="504" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUUiIC_bbkH4oVSDdoY14oX6PLzJdipwhtwK321aZohKuxzo5vNxBt4vVW4dOoAPSDsXO-4O7fWL9psgv5zS8Da8DSaFM9gkEmHZfJOrz6rcJKDpjuUBLqTq8r-2WBT_2SMUUVpnS4G2k/s640/import.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG4dlvzGxqPpbX8mrna-ZtS0qqvgnOzSFog9rSA0-wyDU4xZNdsKi8M8GBVcRVF2ql74xCDPfNfT7ZFjJhsz4Xw1xvYVwK-qyxG6mUpMWqLBBs2894fnJ34YyrQ9y2QYnYyHuHQMtpxe8/s1600/file-dialog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="143" data-original-width="466" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG4dlvzGxqPpbX8mrna-ZtS0qqvgnOzSFog9rSA0-wyDU4xZNdsKi8M8GBVcRVF2ql74xCDPfNfT7ZFjJhsz4Xw1xvYVwK-qyxG6mUpMWqLBBs2894fnJ34YyrQ9y2QYnYyHuHQMtpxe8/s640/file-dialog.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br /></div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
Now you can choose either Web deploy or FTP from the drop down over there. For both all the fields will be pre populated with all the informations and credentials.</div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_VgkN6o5OBnDv2CPtnYA4U5lBuPbRejyNZ-a_ZVOvq_RQOLPKBACMS4OIDlER4EimDLIC6iUhoJCxLEtiORGygrvWQ8QWh8Vzz5hDkRQf4x5EGpk4PvM6CNcF7f36A9huOpRFH-_LD8w/s1600/publish-web.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="558" data-original-width="706" height="504" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_VgkN6o5OBnDv2CPtnYA4U5lBuPbRejyNZ-a_ZVOvq_RQOLPKBACMS4OIDlER4EimDLIC6iUhoJCxLEtiORGygrvWQ8QWh8Vzz5hDkRQf4x5EGpk4PvM6CNcF7f36A9huOpRFH-_LD8w/s640/publish-web.png" width="640" /></a></div>
<br /></div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
Click on the Validate connection and check our connections from Visual Studio.</div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
Click Next to choose configuration parts. Choose either Debug or Release, whatever is suitable for your applications. You can also manage File publish options from here.</div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
Again click on the Next to go to the Preview section. Click on the Start Preview button if you want to see the files are going to push into the server. Or click Publish (Keyboard: P) to publish the site into your app server.</div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
After successful deployment site will be open automatically in your default browser.</div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="border: 0px; box-sizing: inherit; font-family: inherit; font-style: inherit; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">FTP deployment:</span></div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
There is another quick method to deploy your site into Azure app service through FTP. Go to the Overview section of your app service. In the first section right side you will find the details of FTP connections. Usernames, FTP hostname, FTPS hostname. Password for this deployment will your own account password.</div>
<div style="background-color: white; border: 0px; box-sizing: inherit; color: #5e5e5e; font-family: Roboto, Helvetica, sans-serif; font-size: 16px; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
Go to the Visual studio and right click on the solution. Click the publish option and create a new publisher profile. Choose FTP in the Connection tab from Publish method drop down list.</div>
<blockquote class="tr_bq" style="background-color: white; border: 0px; box-sizing: inherit; margin-bottom: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="color: #5e5e5e; font-family: "roboto" , "helvetica" , sans-serif;">Server: FTP hostname/ FTPS hostname</span><span style="color: #5e5e5e; font-family: "roboto" , "helvetica" , sans-serif;">Site Path: site/wwwroot (Check the passive mode)</span><span style="color: #5e5e5e; font-family: "roboto" , "helvetica" , sans-serif;">User name: FTP/deployment username</span><span style="color: #5e5e5e; font-family: "roboto" , "helvetica" , sans-serif;">Password: Your account password</span><span style="color: #5e5e5e; font-family: "roboto" , "helvetica" , sans-serif;">Destination URL: Your site URL</span></blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlagQMEBntlO1tFyQhfKyy8IiIAg-26Xrzmv3ajw_l4tkgGXw3XSZN0lgCKNxHv53FR7uo6HrGHFzFR0v1GERgNWDAEHdcesFyYOPfzWyH-RDrp_7HdVo0C8Ko1wijNgqvfAiQvUTsfSU/s1600/ftp-deploy.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="558" data-original-width="706" height="505" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlagQMEBntlO1tFyQhfKyy8IiIAg-26Xrzmv3ajw_l4tkgGXw3XSZN0lgCKNxHv53FR7uo6HrGHFzFR0v1GERgNWDAEHdcesFyYOPfzWyH-RDrp_7HdVo0C8Ko1wijNgqvfAiQvUTsfSU/s640/ftp-deploy.png" width="640" /></a></div>
<div>
<span style="border: 0px; box-sizing: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></span></div>
<br />
<span style="background-color: white; color: #5e5e5e; font-family: "roboto" , "helvetica" , sans-serif; font-size: 16px;">Click on the Validate button to validate your enter details and connection. Click on the publish button to publish your site. After successful publish, site will be open in your default browser automatically.</span> </span></div>
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com15tag:blogger.com,1999:blog-331704360604939704.post-91830078536336092512017-07-20T22:31:00.001+05:302017-07-20T22:32:20.878+05:30Desktop notification in browser using JavaScript<div dir="ltr" style="text-align: left;" trbidi="on">
In most of the sites have today their own desktop notification system to connect user in a large scale. So how to create a desktop notification for your site. Its very simple to generate a new notification using JavaScript, you have to write hardly 2-3 lines of code. Lets create one to generate desktop notification.<br />
<br />
To create a new notification for user you have to follow three steps. <br />
<ol style="text-align: left;">
<li>Is the browser supports the notification feature. If not show an appropriate message.</li>
<li>Ask user to allow the notification feature to show.</li>
<li>Create a new notification and a click event to fire. </li>
</ol>
First lets start with whether the browser is supportable to show notification. For this we will use JavaScript Notification object to do all the operation. <br />
<br />
<div style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> (!Notification) {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>alert(</span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">'Desktop notifications not available in
your browser. Try Chromium.'</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; margin: 0cm 0cm 10pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
<br />
And when the user has opened the site prompt user with an box, saying user to allow the site to show notification. For this use follow code block.<br />
<br />
<div style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;">document.addEventListener(</span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">'DOMContentLoaded'</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">, </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">function</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> () {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> (Notification.permission !== </span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"granted"</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>Notification.requestPermission();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; margin: 0cm 0cm 10pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;">});</span><o:p></o:p></div>
</div>
<br />
Now create a button in the body & by clicking on that button a notification will be shown.<br />
<br />
<div style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">button</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: red; font-family: "consolas"; font-size: 9.5pt;">onclick</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">="</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">notifyMe()</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">"></span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>Notify me!<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; margin: 0cm 0cm 10pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;"></</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;">button</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;">></span><o:p></o:p></div>
</div>
<br />
Now in the script section add the Notify() method and write the following piece of code.<br />
<br />
<div style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">function</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> notifyMe() {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> (!Notification) {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>alert(</span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">'Desktop notifications not available
in your browser. Try Chromium.'</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> (Notification.permission !== </span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"granted"</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>Notification.requestPermission();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">else</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> notification = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> Notification(</span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">'Notification title'</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">, {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>icon: </span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">'https://pbs.twimg.com/profile_images/495133521262825472/wxlvCGWy.jpeg'</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>body: </span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"Here is your notification!"</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>});<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>notification.onclick = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">function</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> () {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>window.open(</span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"http://asp-arka.blogspot.in/"</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>};<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; margin: 0cm 0cm 10pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
<br />
Here are the full code.<br />
<br />
<div style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">html</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">button</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: red; font-family: "consolas"; font-size: 9.5pt;">onclick</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">="</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">notifyMe()</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">"></span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>Notify me!<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"></</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">button</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">script</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: green; font-family: "consolas"; font-size: 9.5pt;">// request permission on page load</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>document.addEventListener(</span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">'DOMContentLoaded'</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">, </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">function</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> () {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> (Notification.permission !== </span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"granted"</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>Notification.requestPermission();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>});<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">function</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> notifyMe() {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> (!Notification) {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>alert(</span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">'Desktop
notifications not available in your browser.'</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> (Notification.permission !== </span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"granted"</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>Notification.requestPermission();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">else</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> notification = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> Notification(</span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">'Notification title'</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">, {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>icon: </span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">'https://pbs.twimg.com/profile_images/495133521262825472/wxlvCGWy.jpeg'</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>body: </span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"Here is your notification!"</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>});<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>notification.onclick = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">function</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> () {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>window.open(</span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"http://asp-arka.blogspot.in/"</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>};<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"></</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">script</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: currentColor; margin: 0cm 0cm 10pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;"></</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;">html</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;">></span><o:p></o:p></div>
</div>
<br />
Host the file in any server like IIS or Apache to run it. Direct running the file in browser won't work out. Click on the Notify button to get the notification. Change the text and image according to your requirement. </div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com15tag:blogger.com,1999:blog-331704360604939704.post-70472822535374510882017-04-11T23:37:00.000+05:302017-04-11T23:40:32.722+05:30Installing TypeScript in Visual Studio<div dir="ltr" style="text-align: left;" trbidi="on">
In this first tutorial of TypeScript we will get to know how to install TypeScript in Visual Studio and use it in the same. Starting from the scratch Microsoft provides different extension for TypeScript for different versions of Visual Studio. So I have Visual Studio installed in my PC. So, I will go with VS 13 but for later versions it is almost same to install the TypeScript. <br />
<br />
<br />
<strong>1.</strong> To download TypeScritpt for Visual Studio follow the below links<br />
<ul style="text-align: left;">
<li>Visual Studio 2013: <a href="https://www.microsoft.com/en-in/download/details.aspx?id=48739" target="_blank">TypeScript for Visual Studio 2013</a></li>
<li>Visual Studio 2015: <a href="https://www.microsoft.com/en-us/download/details.aspx?id=48593" target="_blank">TypeScript for Visual Studio 2015</a></li>
</ul>
Download the application and install it. <br />
<br />
<br />
<strong>2.</strong> After installing the patch open Visual Studio and create a new web project. Right click on the solution and you can see there is a option in the menu to add TypeScript file.<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHZRzgpZERkUfIImf95Tyzy1nnbdZ0IW05QQ5S0LP8Wh8YpWdp4hu9XbDkuV25qHOzGkFmwmyNOcBRwyJh4YLOs2qaMzebkFHV-NLNxWo2jrq5CBwpn3cV3WatwgdUYUeXZlfmao_i-9Y/s1600/ts1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHZRzgpZERkUfIImf95Tyzy1nnbdZ0IW05QQ5S0LP8Wh8YpWdp4hu9XbDkuV25qHOzGkFmwmyNOcBRwyJh4YLOs2qaMzebkFHV-NLNxWo2jrq5CBwpn3cV3WatwgdUYUeXZlfmao_i-9Y/s320/ts1.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<br />
<br />
<strong>3.</strong> Add the TypeScript file with extension .ts. At the time of adding this file if your project doesn't contain the TypeScript compiler <span style="background-color: yellow;">DLL</span> then it will prompt you and will redirect you to Nuget Package Manager to install that. <br />
<br />
<br />
<br />
<br />
<strong>4.</strong> Install the <strong>Microsoft.TypeScript.Compiler </strong>using Nuget Package Manager or you can download it using Package Manager console. <br />
<br />
<br />
<br />
<br />
<strong><span style="font-size: large;">PM> install-Package Microsoft.TypeScript.Compiler</span></strong><br />
<strong><br /></strong><br />
<strong>5.</strong> Your TypeScript is ready for coding, Write a few lines of code and save it. after saving you will see a JavaScript file of the same name will be generated in the same domain. <br />
<strong><br /></strong><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS6V8sm2Jslc-rjGpmJvWlGWwukg4LNKicR883d9ALgJ9NcyEY_UKmW_ZM8RdMohRjpFeoH_zo2qO0144k-lpoe3_sI0qcc3OWeDy9rMYjo_QyIWJyWIg9SogtCWFJFfL0EzKH0cIps64/s1600/ts2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS6V8sm2Jslc-rjGpmJvWlGWwukg4LNKicR883d9ALgJ9NcyEY_UKmW_ZM8RdMohRjpFeoH_zo2qO0144k-lpoe3_sI0qcc3OWeDy9rMYjo_QyIWJyWIg9SogtCWFJFfL0EzKH0cIps64/s1600/ts2.PNG" /></a></div>
<strong><br /></strong><br />
Click on the Show All Files button to show the files that are not included in the project. Within that we will find the JavaScript file of the same name of TypeScript file.<br />
<strong><br /></strong><br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div align="left" class="separator" style="clear: both; text-align: center;">
</div>
<br /></div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com14tag:blogger.com,1999:blog-331704360604939704.post-24097936599052701442017-02-22T23:57:00.000+05:302017-02-22T23:57:05.407+05:30How to send encrypted mail in C#<div dir="ltr" style="text-align: left;" trbidi="on">
It was a request of one of my client to send the mail as encrypted so that this kept secure while sending to customers. So after a search I found <a href="https://blogs.msdn.microsoft.com/jasonn/" target="_blank">Jason Niver's</a> <a href="https://blogs.msdn.microsoft.com/jasonn/2008/08/18/sending-encrypted-e-mails-in-c/" target="_blank">code</a> to be very handy to use. So I am sharing this will all so next time it becomes little bit easy to get. <br />
<br />
<div style="border-color: windowtext windowtext currentColor; border-image: none; border-style: solid solid none; border-width: 1pt 1pt medium; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 1pt 0cm;">
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">using</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> System;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">using</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> System.Text;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">using</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> System.Net.Mail;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">using</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> System.IO;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">using</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">
System.Security.Cryptography.Pkcs;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">using</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">
System.Security.Cryptography.X509Certificates;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">namespace</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> CommonUtilities</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;">{</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">//requires reference to System.Security</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">EmailUtil</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">public</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">static</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> SendEncryptedEmail(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">[] to, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> from, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> subject, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> body, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">[] attachments)</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>MailMessage message = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> MailMessage();</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>message.From = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> MailAddress(from);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>message.Subject = subject;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">if</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> (attachments != </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">null</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> &&
attachments.Length > 0)</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">StringBuilder</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> buffer = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">StringBuilder</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">();</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"MIME-Version:
1.0\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Content-Type:
multipart/mixed; boundary=unique-boundary-1\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"This is a
multi-part message in MIME format.\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"--unique-boundary-1\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Content-Type:
text/plain\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);<span style="mso-spacerun: yes;"> </span></span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">//could use text/html
as well here if you want a html message</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Content-Transfer-Encoding:
7Bit\r\n\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(body);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">if</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> (!body.EndsWith(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">))</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"\r\n\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">foreach</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> (</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> filename </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">in</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> attachments)</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span></span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">FileInfo</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> fileInfo = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">FileInfo</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">(filename);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"--unique-boundary-1\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Content-Type:
application/octet-stream; file="</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> + fileInfo.Name + </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Content-Transfer-Encoding:
base64\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Content-Disposition:
attachment; filename="</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> + fileInfo.Name + </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">byte</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">[] binaryData = </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">File</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">.ReadAllBytes(filename);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> base64Value = </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Convert</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">.ToBase64String(binaryData,
0, binaryData.Length);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">int</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> position = 0;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">while</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> (position <
base64Value.Length)</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">int</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> chunkSize = 100;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">if</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> (base64Value.Length -
(position + chunkSize) < 0)</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>chunkSize =
base64Value.Length - position;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>buffer.Append(base64Value.Substring(position, chunkSize));</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 1.0pt 0cm 1.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
</div>
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>position += chunkSize;</span><br />
<div style="border-color: currentColor windowtext windowtext; border-image: none; border-style: none solid solid; border-width: medium 1pt 1pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 0cm 4pt 1pt;">
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>buffer.Append(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>body = buffer.ToString();</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">else</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>body = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Content-Type:
text/plain\r\nContent-Transfer-Encoding: 7Bit\r\n\r\n"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> + body;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">byte</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">[] messageData = </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Encoding</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">.ASCII.GetBytes(body);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>ContentInfo content = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">
ContentInfo(messageData);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>EnvelopedCms envelopedCms = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">
EnvelopedCms(content);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>CmsRecipientCollection toCollection
= </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">
CmsRecipientCollection();</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">foreach</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> (</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> address </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">in</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> to)</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>message.To.Add(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">
MailAddress(address));</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>X509Certificate2 certificate = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">null</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">; </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">//Need to load from
store or from file the client's cert</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>CmsRecipient recipient = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">
CmsRecipient(SubjectIdentifierType.SubjectKeyIdentifier, certificate);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>toCollection.Add(recipient);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>envelopedCms.Encrypt(toCollection);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">byte</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">[] encryptedBytes = envelopedCms.Encode();</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">//add digital signature:</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>SignedCms signedCms = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> SignedCms(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">
ContentInfo(encryptedBytes));</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>X509Certificate2 signerCertificate
= </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">null</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">; </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">//Need to load from
store or from file the signer's cert</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>CmsSigner signer = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">
CmsSigner(SubjectIdentifierType.SubjectKeyIdentifier, signerCertificate);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>signedCms.ComputeSignature(signer);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>encryptedBytes =
signedCms.Encode();</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">//end digital signature section</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">MemoryStream</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> stream = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">MemoryStream</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">(encryptedBytes);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>AlternateView view = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> AlternateView(stream,
</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"application/pkcs7-mime;
smime-type=signed-data;name=smime.p7m"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>message.AlternateViews.Add(view);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>SmtpClient client = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> SmtpClient(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"your.smtp.mailhost"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">//add authentication info if required by your
smtp server etc...</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">//client.Credentials =
CredentialCache.DefaultCredentials;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>client.Send(message);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div style="border-image: none; border: currentColor; margin: 0cm 0cm 10pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-padding-alt: 0cm 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span></div>
</div>
<br /><br />
Now its time to install the <a href="https://blogs.msdn.microsoft.com/jasonn/2008/07/16/using-certificates-from-the-windows-certificate-store/" target="_blank">certificate</a>, for this go with the bellow codes.<br />
<br /><br />
<div style="border-image: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">using</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">
System.Security.Cryptography.X509Certificates;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"> </span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">private</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> X509Certificate
GetCertificate()</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;">{</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>X509Store store = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">
X509Store(StoreName.My, StoreLocation.LocalMachine);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>store.Open(OpenFlags.ReadOnly);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>X509Certificate2Collection certs =
store.Certificates.Find(X509FindType.FindBySerialNumber, “123456”, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">true</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>store.Close();</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">return</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> certs[0];</span></div>
<div style="border-image: none; border: currentColor; margin: 0cm 0cm 10pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span></div>
</div>
<br /><br />
<span style="font-size: x-small;">Sources:</span><br />
<span style="font-size: x-small;">1. </span><a href="https://blogs.msdn.microsoft.com/jasonn/2008/08/18/sending-encrypted-e-mails-in-c/" target="_blank"><span style="font-size: x-small;">Sending encrypted mail</span></a><br />
<span style="font-size: x-small;">2. </span><a href="https://blogs.msdn.microsoft.com/jasonn/2008/07/16/using-certificates-from-the-windows-certificate-store/" target="_blank"><span style="font-size: x-small;">Using certificates from the Windows certificate store</span></a></div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com14tag:blogger.com,1999:blog-331704360604939704.post-30031073611133552632017-02-22T23:41:00.000+05:302017-02-22T23:41:16.692+05:30best practice to replace in C#<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Times, "Times New Roman", serif;">In most of the application we have to replace a string with some value and sometimes it has to be used multiple times for multiple characters. Like first replace the dot(.) and then hyphen(-) and then some other characters. by using <a href="https://msdn.microsoft.com/en-us/library/fk49wtc1(v=vs.110).aspx" target="_blank">String.Replace(String,String)</a> method we can easily replace one characters or we can use regular expression to replace the characters or stings.</span><br />
<span style="font-family: Times, "Times New Roman", serif;"><br /></span><br />
<span style="font-family: Times, "Times New Roman", serif;">So for one character replacement there we can use only one <a href="https://msdn.microsoft.com/en-us/library/fk49wtc1(v=vs.110).aspx" target="_blank">String.Replace(String, String)</a> by passing the new and old characters. But when we have to replace multiple characters then what is the best way to do? Lets see.</span><br />
<span style="font-family: Times, "Times New Roman", serif;"><br /></span><br />
<span style="font-family: Times, "Times New Roman", serif;">We can do this in two ways.</span><br />
<span style="font-family: Times, "Times New Roman", serif;"><br /></span><br />
<span style="font-family: Times, "Times New Roman", serif;"><strong>1. Using multiple Replace() method:</strong></span><br />
<br /><br />
<div style="border-image: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> demo = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"This, is.
my-text/ Remove, all= unwanted characters."</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">;</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"> </span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;">// not a good practice</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;">demo = demo.Replace(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">","</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">""</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;">demo = demo.Replace(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"/"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">""</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; margin: 0cm 0cm 10pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">demo = demo.Replace(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">"="</span><span style="color: black; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">""</span><span style="color: black; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">);</span></div>
</div>
<br /><br />
This way you can replace the characters but there is a better way to do this.<br />
<br /><br />
<div style="border-image: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;">// best practice</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;">demo = demo.Replace(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">","</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">""</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">).</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>Replace(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"/"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">""</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">).</span></div>
<div style="border-image: none; border: currentColor; margin: 0cm 0cm 10pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt; line-height: 115%;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>Replace(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">"="</span><span style="color: black; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">""</span><span style="color: black; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">);</span></div>
</div>
<br /><br />
Now this piece of code will save both time and space complexity to replace the desired characters. <br />
<br /><br />
<strong>2. Using <a href="https://msdn.microsoft.com/en-us/library/xwewhkd1(v=vs.110).aspx" target="_blank">Regular expression</a>:</strong><br />
<br /><br />
For multiple characters we can use regular expression to matching the string content and then replace the characters with the new values. <br />
<br /><br />
Let us took the previous example where we have to replace ",", "/" & "=" with blank value. So, our regular expression will be something like this. <br />
<br /><br />
<div style="margin: 0cm 0cm 10pt;">
<span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">[,/=]</span></div>
<span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;"><div style="margin: 0cm 0cm 10pt;">
<span style="color: black; font-family: Times New Roman; font-size: small;">
And the code will be like </span></div>
<div style="border-image: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<span style="color: black; font-family: Times New Roman; font-size: small;">
</span><div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt;">Regex rgx = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;"> Regex(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">@"[,/=]"</span><span style="color: black; font-family: Consolas; font-size: 9.5pt;">);</span></div>
<span style="color: black; font-family: Times New Roman; font-size: small;">
</span><div style="border-image: none; border: currentColor; margin: 0cm 0cm 10pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">demo =
rgx.Replace(demo, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">""</span><span style="color: black; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">);<span style="mso-spacerun: yes;"> </span></span></div>
<span style="color: black; font-family: Times New Roman; font-size: small;">
</span></div>
<div style="margin: 0cm 0cm 10pt;">
<span style="color: black; font-family: Times New Roman; font-size: small;">
</span></div>
<span style="color: black; font-family: Times New Roman; font-size: small;"><div style="margin: 0cm 0cm 10pt;">
<strong>Note:</strong></div>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-image: none; border: currentColor; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background-color: transparent; border-image: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 239.4pt;" valign="top" width="319">
<div style="line-height: 14.25pt; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: black; font-family: "Courier New"; font-size: 12pt; mso-fareast-font-family: "Times New Roman";">[a-z] </span></div>
</td>
<td style="background-color: transparent; border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-image: none; border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 239.4pt;" valign="top" width="319"><pre style="line-height: 14.25pt;"><span style="color: black; font-family: "Times New Roman","serif"; font-size: 12pt;"><span style="font-family: inherit;">Matches any lowercase ASCII letter.</span></span></pre>
<pre style="line-height: 14.25pt;"><span style="color: black; font-size: 12pt;"><span style="font-family: inherit;">We only need to match words with lowercase first letters.</span></span></pre>
<pre style="line-height: 14.25pt;"><span style="color: black; font-family: "Times New Roman","serif"; font-size: 12pt;"><span style="font-family: inherit;">This is a character range expression.</span></span></pre>
</td>
</tr>
<tr style="mso-yfti-irow: 1;">
<td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-image: none; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 239.4pt;" valign="top" width="319"><pre style="line-height: 14.25pt;"><span style="color: black; font-size: 12pt;">\b</span></pre>
<div style="line-height: normal; margin: 0cm 0cm 0pt;">
<span style="font-family: Calibri;"> </span></div>
</td>
<td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 239.4pt;" valign="top" width="319"><pre style="line-height: 14.25pt;"><span style="color: black; font-family: "Times New Roman","serif"; font-size: 12pt;">Word break:</span></pre>
<pre style="line-height: 14.25pt;"><span style="color: black; font-family: "Times New Roman","serif"; font-size: 12pt;">Matches where a word starts.</span></pre>
</td>
</tr>
<tr style="mso-yfti-irow: 2;">
<td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-image: none; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 239.4pt;" valign="top" width="319"><pre style="line-height: 14.25pt;"><span style="color: black; font-size: 12pt;">\w+</span></pre>
<pre style="line-height: 14.25pt;"><span style="color: black; font-size: 12pt;"> </span></pre>
</td>
<td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 239.4pt;" valign="top" width="319"><pre style="line-height: 14.25pt;"><span style="color: black; font-family: "Times New Roman","serif"; font-size: 12pt;">Word characters:</span></pre>
<pre style="line-height: 14.25pt;"><span style="color: black; font-family: "Times New Roman","serif"; font-size: 12pt;">Matches must have one or more characters.</span></pre>
</td>
</tr>
<tr style="mso-yfti-irow: 3; mso-yfti-lastrow: yes;">
<td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-image: none; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 239.4pt;" valign="top" width="319">
<div style="line-height: normal; margin: 0cm 0cm 0pt;">
<span style="font-family: Calibri;">\n</span></div>
</td>
<td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 239.4pt;" valign="top" width="319">
<div style="line-height: normal; margin: 0cm 0cm 0pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12pt; mso-bidi-font-size: 11.0pt;">Replace new line with new value.</span></div>
</td>
</tr>
</tbody></table>
<div style="margin: 0cm 0cm 10pt;">
<br /></div>
</span></span><div style="margin: 0cm 0cm 10pt;">
<br /></div>
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com2tag:blogger.com,1999:blog-331704360604939704.post-75213615501729060562017-02-14T23:08:00.000+05:302017-02-14T23:08:02.031+05:30NOSCRIPT tag in HTML <div dir="ltr" style="text-align: left;" trbidi="on">
This <strong><noscript></strong> tag defines the enable of javaScript in your browser. To state whether JavaScript is enabled or not in your browser we can use this tag. This works fully independently, means no other JavaScript or JQuery library are not needed to use this facility.<br />
<br />
<br />
First create a HTML page with JavaScript functionality and a noscript tag.<br />
<br />
<br />
<div style="border-image: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">!DOCTYPE</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: red; font-family: "consolas"; font-size: 9.5pt;">html</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">html</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: red; font-family: "consolas"; font-size: 9.5pt;">xmlns</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">="http://www.w3.org/1999/xhtml"></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">head</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">title</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">NoScript Example</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"></</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">title</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"></</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">head</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">body</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">noscript</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>Javascript is either disabled or not
supported in your browser. </span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>Please enable it or use a Javascript
enabled browser.</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"></</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">noscript</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">div</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>This is a HTML page.</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"></</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">div</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">script</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>alert(</span><span style="color: #a31515; font-family: "consolas"; font-size: 9.5pt;">'JavaScript is working!'</span><span style="color: black; font-family: "consolas"; font-size: 9.5pt;">);</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"></</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">script</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"></</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">body</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;"></</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">html</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
</div>
<br />
<br />
Now run the HTML page in browser and HTML content will display followed by a pop up showing "JavaScript is working".<br />
<br />
<br />
Notice the text within noscript is not showing in the browser. Now disable the JavaScript in browser.<br />
For Chrome go to Advance Settings->Privacy->Content Settings->JavaScript and select "Do not allow any site to run JavaScript". Hit OK and refresh the page.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhbH6xddXib-Q3AfNVlrDgdp9794IGorP2mgRXQ-WLJfH9XGCGqMdbNRjdE_SQjoKPNFg1SABfa-TMeGC75YE2uDCAav-qVbUey0_lyTYNT9HREnqyfONguKuYizWewDhhMJUzMoNRaX0/s1600/js.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="273" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhbH6xddXib-Q3AfNVlrDgdp9794IGorP2mgRXQ-WLJfH9XGCGqMdbNRjdE_SQjoKPNFg1SABfa-TMeGC75YE2uDCAav-qVbUey0_lyTYNT9HREnqyfONguKuYizWewDhhMJUzMoNRaX0/s320/js.PNG" width="320" /></a></div>
<br />
<br />
Now you can see the text within nosript tag and notice no popup will be there as you disabled the JavaScript. <br />
<br />
<br />
For Mozilla visit this <a href="https://www.google.co.in/search?q=how+to+disable+JavaScript+in+mozilla" target="_blank">link</a>, and for Internet Explorer visit this <a href="https://www.google.co.in/search?q=how+to+disable+JavaScript+in+IE" target="_blank">link</a><br />
<br />
<br />
<strong>Browser Dependency:</strong><br />
This HTML tag supports all the front line browsers like,<br />
<ul style="text-align: left;">
<li>Chrome</li>
<li>Android</li>
<li>Firefox</li>
<li>Firefox Mobile</li>
<li>Internet Explorer (IE)</li>
<li>IE Phone</li>
<li>Opera</li>
<li>Opera Mobile</li>
<li>Safari</li>
<li>Safari Mobile</li>
</ul>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com2tag:blogger.com,1999:blog-331704360604939704.post-20582775023424831802017-02-14T20:58:00.000+05:302017-02-14T20:58:08.532+05:30How to find next focusable item in HTML using JQuery<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: "Times New Roman","serif"; font-size: 12pt; mso-fareast-font-family: "Times New Roman";">In this post we will found how to
find the next focusable item and focus into that element in HTML using JQuery.
Among lots of element sometime its getting necessary to focus on the next
element on some ENTER or TAB click in HTML. So, how to do this. Let’s find out.</span><br />
<span style="font-family: "Times New Roman","serif"; font-size: 12pt; mso-fareast-font-family: "Times New Roman";"><br /></span><br />
<div style="line-height: normal; margin: 0cm 0cm 0pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12pt; mso-fareast-font-family: "Times New Roman";">First create a HTML page with few
dummy elements.</span></div>
<div style="line-height: normal; margin: 0cm 0cm 0pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12pt; mso-fareast-font-family: "Times New Roman";"><br /></span></div>
<div style="border-image: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";"><div
id="div1"></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";">
1.<input type="text" /></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";">
2.<input type="text" /></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";"></div></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";"><div
id="div2"></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";"> 3.<input
type="text" id="input3" /></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";"> 4.<a
href="#">Anchor</a></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";">
5.<input type="text" /></span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";"></div></span></div>
</div>
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";"><br /></span><br />
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";">We have designed a HTML
page with different focusable elements (textbox and anchor) and different
sections (div1 & div2). </span><br />
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";"><br /></span><br />
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";">Now as per HTML
structure the TAB will go from first text box to last text box. But how programmatically
we will find the next focusable item after a certain element.</span><br />
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";"><br /></span><br />
<div style="border-image: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";"> var nextTabbable =
$("#input3").next(":tabbable").length</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";">
?
$("#input3").next(":tabbable")</span></div>
<div style="border-image: none; border: currentColor; line-height: normal; margin: 0cm 0cm 0pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";">
:
$("#input3").parent().next().find(":tabbable").first();</span></div>
</div>
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";"><br /></span><br />
<span style="color: black; font-family: "Tahoma","sans-serif"; font-size: 10pt; mso-fareast-font-family: "Times New Roman";">Using "tabbable" we can find the next
focusable or tabbable item in the HTML
structure. So nextTabbable is the item which is next
after "input3" in this structure. Now write your desired code upon
that. For more information please visit <a href="https://api.jqueryui.com/tabbable-selector/" target="_blank">:tabbable Selector</a>.</span><br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: Tahoma; font-size: 13.33px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: Tahoma; font-size: 13.33px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com2tag:blogger.com,1999:blog-331704360604939704.post-56884925891676907142017-02-14T19:57:00.000+05:302017-02-14T19:57:37.866+05:30How to make a HTML element focusable<div dir="ltr" style="text-align: left;" trbidi="on">
Input elements like text box, textarea, button, anchor drop down list(select),
list are pre focusable element in HTML. But elements like span, div, label
these are not focusable element, as these are not interacting with user
directly. These are only use to show output. According to new <strong>American
Disability Act (ADA)</strong> any disabled person can access the website as an
able person does. So, in this case we have to make the site totally focusable
so that a disable person can operate the whole website using only TAB and ENTER
key. <br />
<br /><br />
Now in case of focusable items there is no problem, but for other items we
can use TabIndex. <br />
<br /><br />
Just put tabindex="0" to each and every element of the page which
should be focusable. TabIndex="0" implies that the element will be
under focusable elements and also the first element of the page. But don't
worry a page can have more than one element having tabindex="0". To
make manual tabbing you can use tabindex="1", tabindex="2",
tabindex="3" and so on. <br />
<br /><br />
Now if you are working on an existing project then it’s hard to set all the elements
as tabindex="0" so on that case you can do two things. <br />
<br /><br />
<strong>1. Using Class.</strong><br />
Name those elements, which are need to be focusable, with a class name.
Let’s say "focusable" is the class name. <br />
<br /><br />
Now on the ready method of you JQuery put the below line to comply.<br />
<br /><br />
<div style="border-image: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div style="border-image: none; border: currentColor; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<em><span style="font-style: normal; mso-bidi-font-style: italic;">$('.focusable').prop('tabindex','0');</span></em></div>
</div>
<br /><br />
This line of code will add tabindex property with value zero into those
element which has been marked with the class name "focusable". And
all the site will be ready to navigate using TAB.<br />
<br /><br />
<strong>2. Using JQuery selector</strong><br />
If there are lots of elements to be focused then you can use selectors like
"div", "label", "span".<br />
<br /><br />
<div style="border-image: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1pt 4pt;">
<div style="border-image: none; border: currentColor; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0cm;">
<em><span style="font-style: normal; mso-bidi-font-style: italic;">$("div, label,
span").prop("tabindex","0");</span></em></div>
</div>
<br /><br />
Like this aim can be achieved and in this case all the elements will be
under navigation. If you have your own tags used in the page then you can add
those too.</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com2tag:blogger.com,1999:blog-331704360604939704.post-29494961329289427512016-06-20T00:15:00.000+05:302016-06-20T00:15:56.861+05:30Run Stored Procedure from Batch file (MS SQL & Oracle)<div dir="ltr" style="text-align: left;" trbidi="on">
In this post we will lean how to run a stored procedure from a batch file (<u><b>.bat</b></u>) externally. This is used very often to run a schedule job set in the server. The whole job logic is written in the Stored procedure and we are executing that from an external batch file. So what we have to do to run this, lets see.<br />
<br />
We will use the <b>sqlcmd.exe</b> file to run the stored procedure from command. First of all create a Stored procedure in your MS. SQL server.<br />
<br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">CREATE</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">PROCEDURE</span> SP_TESTSP</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">AS</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">BEGIN</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-tab-count: 1;"> </span><span style="color: blue;">print</span> <span style="color: red;">'THIS IS A TEST MESSAGE. LOGGED AT '</span> <span style="color: grey;">+</span> <span style="color: magenta;">CONVERT</span><span style="color: grey;">(</span><span style="color: blue;">VARCHAR</span><span style="color: grey;">,</span> <span style="color: magenta;">getdate</span><span style="color: grey;">(),</span> 120<span style="color: grey;">)</span></span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">END</span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;">GO</span></div>
</div>
<br />
<br />
I named this as SP_TESTSP, go with your name and now open a Notepad or any other editor and write down the following script.<br />
<br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
sqlcmd -Q "exec
<STORED PROCEDURE NAME>" -S <SERVER NAME> -d <DATABSE
NAME> -o <OUTPUT FILE NAME WITH PATH></div>
</div>
<br />
<br />
As my server name "arka-PC\SQLEXPRESS" and using Database as "DEMO", so in this case the command will be,<br />
<br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
sqlcmd -Q "exec
SP_TESTSP" -S arka-PC\SQLEXPRESS -d Attendance -o D:\SPOutput.txt</div>
</div>
<br />
<br />
Before run this script create a file name with SPOutput.txt in the D:\ drive or where you want to save. The output of the stored procedure will be captured.<br />
<br />
Now save the file with an extension of "<b><u>.bat</u></b>". Set all the privileges and run the file by clicking twice. Check the log file, it will contain the result of the executed stored procedure. <br />
<br />
<b>Output:</b><br />
<br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
THIS IS TEST MESSAGE.
LOGGED AT 2016-06-19 23:52:48</div>
</div>
<br />
<br />
In the next tutorial we will see how to put a bat file in a Task Scheduler in windows server. </div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com5tag:blogger.com,1999:blog-331704360604939704.post-31936242041664487952016-04-17T12:40:00.000+05:302016-04-17T12:40:32.418+05:30How to prevent F12 in browser<div dir="ltr" style="text-align: left;" trbidi="on">
<b>Introduction:</b><br />
<br />
Opening the console log of browser and change element value of a web page is like a headache for the developer. To prevent this situation here is the remedy.<br />
<br />
<b>Description:</b><br />
<br />
So how to stop this kind of situation, you could get a message while user is opening the console log and take necessary step or you could prevent user from opening that. We will discuss both the situation in this article one by one.<br />
<br />
<b>Getting noticed while opening the console of the browser:</b><br />
<br />
Create a normal HTML page and and add a div to show the status of the development tool box. And write down the code.<br />
<br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">body</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>status: </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">div</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">id</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">="status"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">div</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">body</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">></span></div>
</div>
<br />
After that write down the code within the script tag under body section.<br />
<br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">script</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> checkStatus;</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> element = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">new</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> Image();</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">
</span>element.__defineGetter__(</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">'id'</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">, </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">function</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> () {</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>checkStatus
= </span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">'on'</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">;</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>});</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>setInterval(</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">function</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> () {</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>checkStatus
= </span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">'off'</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">;</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">
</span>console.log(element);</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">
</span>console.clear();</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">
</span>document.querySelector(</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">'#status'</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">).innerHTML = checkStatus;</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>}, 1000)</span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">script</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">></span></div>
</div>
<br />
<br />
Output:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQyVeud3gnNRAQszyfUqySIkpBVhIR3pWo_0sabiaNQqA9i8vTJmFoLbDR7vEvrs6fo9hlMMzWHpXpEepqxEtT9Z_EFE_ShO7Naz5qANE84wumzhxoQrw6gbF1EWmpTIncefVnb5wpFW4/s1600/status.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQyVeud3gnNRAQszyfUqySIkpBVhIR3pWo_0sabiaNQqA9i8vTJmFoLbDR7vEvrs6fo9hlMMzWHpXpEepqxEtT9Z_EFE_ShO7Naz5qANE84wumzhxoQrw6gbF1EWmpTIncefVnb5wpFW4/s640/status.PNG" width="640" /></a></div>
<br />
<br />
<b>Prevent Clicking F12 and Mouse Right Click:</b><br />
<br />
This trick is not like showing status. By showing status you can do all your customization in your code but here in this example of coding user will not be able to click F12 and mouse right click. Lets see how.<br />
<br />
Before starting add JQuery into your page. To add it add the bellow script to the top of all the JQuery code.<br />
<br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">script</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">src</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">script</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">></span></div>
</div>
<br />
After that within a script tag write down the bellow code.<br />
<br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">script</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">
</span>$(document).keydown(</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">function</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> (event) {</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">if</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> (event.keyCode == 123) {</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">return</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">false</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">;</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">else</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">if</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> (event.ctrlKey &&
event.shiftKey && event.keyCode == 73) {</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">return</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">false</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">;</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>});</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>$(document).on(</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"contextmenu"</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">, </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">function</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> (e) {</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">
</span>e.preventDefault();</span></div>
<div class="MsoNormal" style="border: none; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-border-alt: solid windowtext .5pt; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>});</span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">script</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;">></span></div>
</div>
<br />
<br />
As you can see we have used the Key code to detect the clicking of buttons and mouse. Here 123 stands for F12 and 73 for I key. To know more visit <a href="https://msdn.microsoft.com/en-us/library/aa243025(v=vs.60).aspx">https://msdn.microsoft.com/en-us/library/aa243025(v=vs.60).aspx</a>.<br />
<br />
Run both the examples and enjoy.<br />
<br />
<br />
<br />
<br />
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com1tag:blogger.com,1999:blog-331704360604939704.post-88681544956518393982015-10-23T11:23:00.000+05:302015-10-23T11:23:11.688+05:30Difference between Response.Write and Response.WriteLine<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u><span style="font-size: large;">Introduction:</span></u></b><br />
<br />
In this post we will discuss about the difference between <b>Response.Write</b> and <b>Response.WriteLine</b> in C#. These are the methods we used to show the output in console application. Both these methods come from class Console under namespace System. Behavior of both these are as same as except only one thing. <br />
<br />
<span style="font-size: large;"><b><u>So what is the difference then?</u></b></span><br />
<br />
The only difference is the position of the cursor. In the <b>Write()</b> method the after the output has been printed the <b><u>cursor remains in the same line</u></b>, But in case of <b>WriteLine()</b> the<b><u> cursor shifted to the next line</u></b>, that means you don't need to worry about the next line printing in WriteLine(). You have to use a new line after using Write() method if you want to continue with the next line. To do so you can use <span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">System.</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">Environment</span><span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">.NewLine.</span><br />
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;"><br /></span>
<span style="line-height: 14.5667px;"><b><u>Using Console.Write():</u></b></span><br />
<span style="line-height: 14.5667px;"><br /></span>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> Method2()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Keep the cursor in that line only.</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Console</span><span style="font-family: Consolas; font-size: 9.5pt;">.Write(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Hi this is Console.Write. "</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Keep the cursor on the next line.</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Console</span><span style="font-family: Consolas; font-size: 9.5pt;">.Write(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Hi this is Console.Write. "</span><span style="font-family: Consolas; font-size: 9.5pt;">+ System.</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Environment</span><span style="font-family: Consolas; font-size: 9.5pt;">.NewLine);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
<div class="MsoNormal">
<o:p></o:p></div>
<br />
Output:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIl48u7kg6yxlP9hxp35gk9MddIwtB4_PiMWU6-Z1Sqr4YClAXELi-GjlItjQmqJqkrvmcsIo5LCBMgTJ3hc3e2ySfh964rBjziPEPl-rHNZrm6a81kIqd3xqqAb6MuflEg950XMDLkVg/s1600/write.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIl48u7kg6yxlP9hxp35gk9MddIwtB4_PiMWU6-Z1Sqr4YClAXELi-GjlItjQmqJqkrvmcsIo5LCBMgTJ3hc3e2ySfh964rBjziPEPl-rHNZrm6a81kIqd3xqqAb6MuflEg950XMDLkVg/s400/write.png" width="400" /></a></div>
<br />
<br />
<b><u>Using Console.WriteLine():</u></b><br />
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> Method3()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Keep the cursor on the next line.</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Console</span><span style="font-family: Consolas; font-size: 9.5pt;">.WriteLine(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Hi this is Console.WriteLine.
"</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
<br />
Output:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8SPhWs0GkVIMk4FmnZOKbvbCE5TuP_RYaXyRzUAiq9lUuyLZRdOvme9sGlClZ8bBEDaY_WD3nZqFKQafMt6dOCfqGWmceIM5z9VhmcDtty3ezS8KLm6OB8ZHBDNg6FZkv8KKuglt5VGU/s1600/writeline.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8SPhWs0GkVIMk4FmnZOKbvbCE5TuP_RYaXyRzUAiq9lUuyLZRdOvme9sGlClZ8bBEDaY_WD3nZqFKQafMt6dOCfqGWmceIM5z9VhmcDtty3ezS8KLm6OB8ZHBDNg6FZkv8KKuglt5VGU/s400/writeline.png" width="400" /></a></div>
<br />
<br />
Check the cursor position in both of the output. In the first image the cursor is in the same line and in the second output the cursor is in the next line.<br />
<br />
<br /></div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com0tag:blogger.com,1999:blog-331704360604939704.post-67336187873963338412015-10-20T10:12:00.000+05:302015-10-20T10:12:32.834+05:30Inheritance in OOPs C#<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u><span style="font-size: large;">Introduction:</span></u></b><br />
<b><u><br /></u></b>
Previously we have discussed about the Abstraction and Encapsulation and their difference in this blog. Today we will go for the other two properties of OOPs in C#, these are Inheritance and Polymorphism.<br />
<br />
<u><b><span style="font-size: large;">Description:</span></b></u><br />
<br />
As we all know OOPs has 4 properties like<br />
<ol style="text-align: left;">
<li>Abstraction</li>
<li>Encapsulation</li>
<li>Inheritance</li>
<li>Polymorphism</li>
</ol>
<div>
Already we have discussed about the first two, abstraction & encapsulation. Lets discuss about the other two, Inheritance and Polymorphism.</div>
<div>
<br /></div>
<div>
<b><u>Inheritance:</u></b></div>
<div>
Inheritance means getting some thing (properties) as heredity. To get that we need an hierarchical structure. And that is provided by OOPs using Inheritance. Here in inheritance we have an concept of Base class and sub class. The base class is also known as parent class, super class etc. and the sub class is also known as child class. The properties (variables) and methods are accessible to the sub class, but keep that in mind that only the public ones. Not the private methods or variables are accessible from child class. And the methods and accessible, can be call without creating the object of that super class. </div>
<div>
<br /></div>
<div>
To inherit a class from another class you have to extend the sub class to super class. Follow the bellow example.</div>
<div>
<br /></div>
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> MethdoTestPublic()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Console</span><span style="font-family: Consolas; font-size: 9.5pt;">.WriteLine(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"ClassTest.MethdoTestPublic"</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"><br /></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> private</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> MethdoTestPrivate()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Console</span><span style="font-family: Consolas; font-size: 9.5pt;">.WriteLine(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"ClassTest.MethdoTestPublic"</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }</span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSub</span><span style="font-family: Consolas; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Inheriting from
ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> MethodTest()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> MethdoTestPublic(); </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// calling the super
class method</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 12.6667px;"> MethdoTestPrivate(); </span><span style="color: green; font-family: Consolas; font-size: 12.6667px;">// calling the super class private method [Error]</span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Console</span><span style="font-family: Consolas; font-size: 9.5pt;">.WriteLine(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"ClassTest2.MethodTest"</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
<div>
</div>
<br />
<div>
<br /></div>
<div>
Here ClassSub is extending the ClassSuper to get access to the methods and properties of the super class.<br />
<br />
Type of Inheritance:<br />
<br />
<ol style="text-align: left;">
<li>Single Inheritance</li>
<li>Multiple Inheritance</li>
<li>Multi Level Inheritance</li>
<li>Hierarchical Inheritance</li>
</ol>
<div>
<b>Single Inheritance:</b></div>
<div>
The above example is one of the example of Single Inheritance. </div>
<div>
<br /></div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibii6Gk-yPM00XRlDIbbNiCdvw05VDUCwZJErvutvmVkoDXrh2k7T07pA5RgWadxK2iVNpmkYXEXE0XAyPr7xS5l0Rtye40Y3Fi4VgvOCnPcGKhLpNyNOlQSQq3s_xfdwvCX3lPeHmEzI/s1600/single+inheritance.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibii6Gk-yPM00XRlDIbbNiCdvw05VDUCwZJErvutvmVkoDXrh2k7T07pA5RgWadxK2iVNpmkYXEXE0XAyPr7xS5l0Rtye40Y3Fi4VgvOCnPcGKhLpNyNOlQSQq3s_xfdwvCX3lPeHmEzI/s320/single+inheritance.png" width="320" /></a></div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSub</span><span style="font-family: Consolas; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Inheriting from
ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
<br /></div>
<div>
<b>Multi level Inheritance:</b><br />
Multi level inheritance is the joining of two or more single inheritance. Like Sub Class 2 is inheriting Sub Class 1 and Sub Class 1 is inheriting Super Class. If you watch closely there are two single inheritances are present. One is Sub Class 1 -> Sub Class 2 and second one is Sub Class 1 -> Super Class.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjexhY5-vKsOxLrV5fF2sOUmXjgTB0Lbe6KI0B3BND7tEG-MNiGmPRhy4wO8Yt5dNFBqt9VvP1fu19nnQgI71K0g3yjh6ACuAHDR2RR0PmyYNk3uuLA8BtKwZoSrHdeL5YJ70-a8cfNCJ4/s1600/multi+level+inheritance.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjexhY5-vKsOxLrV5fF2sOUmXjgTB0Lbe6KI0B3BND7tEG-MNiGmPRhy4wO8Yt5dNFBqt9VvP1fu19nnQgI71K0g3yjh6ACuAHDR2RR0PmyYNk3uuLA8BtKwZoSrHdeL5YJ70-a8cfNCJ4/s320/multi+level+inheritance.png" width="273" /></a></div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSub1</span><span style="font-family: Consolas; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Inheriting from
ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSub2</span><span style="font-family: Consolas; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSub1</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Inheriting from ClassSub2</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
<br />
<b>Hierarchical Inheritance:</b><br />
In case of Hierarchical interface we have multiple sub classes which are inheriting one super class. Like here Sub Class 1 and Sub Class 2 both are inheriting Super Class, This is Hierarchical Inheritance.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8UIR04-VZn_I2n-mKqYoOWlyeZ-qaxZc8bS8XTq8p1byJUybXKOwfq1Shb22gzniv29NO3AsGIolbkFe_VbaIvnF7kN-iMeyeyBa9pB442xYPrkN2-tI0Vg-6YAimbgXrZwFzPRFWjsg/s1600/hiararchical.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8UIR04-VZn_I2n-mKqYoOWlyeZ-qaxZc8bS8XTq8p1byJUybXKOwfq1Shb22gzniv29NO3AsGIolbkFe_VbaIvnF7kN-iMeyeyBa9pB442xYPrkN2-tI0Vg-6YAimbgXrZwFzPRFWjsg/s320/hiararchical.png" width="320" /></a></div>
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSub1</span><span style="font-family: Consolas; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Inheriting from
ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSub2</span><span style="font-family: Consolas; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Inheriting from
ClassSuper</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
<br />
<b>Multiple Inheritance:</b><br />
Multiple Inheritance is just the opposite of Hierarchical Inheritance. Here one sub class is inheriting multiple Super Classes. Like any other object Oriented Programming languages C# also don't support Multiple Inheritance. To achieve that we have to go for Interface, which we will discuss later.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_rRKQA2FyGIv19SeTbDeKu3RAobilR3w9snge3CWSNS8xS5u11GM75MHQjizrsKRqQvpgtKlcJIaLMhmhDB4COiDLGWyTcKukuMCFkIZulvikJYaTZ5Em8ug1qfT1WaKUCHaX8DnVGiY/s1600/multiple.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_rRKQA2FyGIv19SeTbDeKu3RAobilR3w9snge3CWSNS8xS5u11GM75MHQjizrsKRqQvpgtKlcJIaLMhmhDB4COiDLGWyTcKukuMCFkIZulvikJYaTZ5Em8ug1qfT1WaKUCHaX8DnVGiY/s320/multiple.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Like here the only Sub Class is inheriting the two Super Classes (Super Class 1 and Super Class 2). This architecture is not possible with C# classes. So we are taking help of Interface to do so.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">interface</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ISuper1</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">interface</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ISuper2</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassSub</span><span style="font-family: Consolas; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ISuper1, ISuper2 </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Inheriting from ISuper1
and ISuper2</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
<br />
<b>Advantages of Inheritance:</b><br />
<ol style="text-align: left;">
<li><b>Reusability: </b> Use the base class public methods and properties from the base class, without defining or creating any instance.</li>
<li><b>Extensibility :</b> Extend the base class methods logic in the sub class without rewriting the same.</li>
<li><b>Data hiding:</b> Base class can kept some data private so that it cannot be altered by the derived class.</li>
<li><boverriding: b=""><b>Override: </b>Base class methods can be overridden by sub class methods to reuse in a meaningful way.</boverriding:></li>
</ol>
<b>Disadvantages of Inheritance:</b><br />
<ol style="text-align: left;">
<li><b>Tightly Coupled: </b>In inheritance both the classes (sub and super class) are tightly coupled. So if any change occurs in super class it will affect in the base class. </li>
<li>Some time many data remains unused in the hierarchy. So memory wastage can be happen in case of inheritance, </li>
</ol>
<br /></div><a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=9261026" rel="tag" style="display: none;">CodeProject</a>
</div>Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com0tag:blogger.com,1999:blog-331704360604939704.post-19628685229390293602015-10-06T00:56:00.000+05:302015-10-06T00:56:02.564+05:30Restore database from .BAK frile in Ms. SQL Server<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-size: large;"><b><u>Introduction:</u></b></span><br />
<span style="font-size: large;"><b><u><br /></u></b></span>
In this post I will show you how to restore a database from a backup file (extension of backup file is .bak). It is the most common way to restore a database though there are other several ways to do so, like through excel, access or csv. But in this section we will discuss with the .BAK files.<br />
<span style="font-size: large;"><b><u><br /></u></b></span>
<span style="font-size: large;"><b><u>Description:</u></b></span><br />
Its a very simple and quick process to restore a database from .BAK file. Lets see what are they..<br />
<br />
<b>Step 1:</b><br />
Open your SQL Management Studio and right click on the Database in Object Explorer. To open Object Explorer go to View and click on the Object Explorer. Now right click on the Database and click on the option Restore Database.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqNMKIcKCzh7jpf7KZ5CxjQagmzhCZP_C9ziC7D_WWmaFRkEKFbYoR1jHux-gmMpunN3vGVkLMYVnNbetavHssR_S9cg4pgwGc-N3Xxx0ePIOMaSFG79WyOHazJck3hvO7bjBwAydGD_s/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqNMKIcKCzh7jpf7KZ5CxjQagmzhCZP_C9ziC7D_WWmaFRkEKFbYoR1jHux-gmMpunN3vGVkLMYVnNbetavHssR_S9cg4pgwGc-N3Xxx0ePIOMaSFG79WyOHazJck3hvO7bjBwAydGD_s/s640/1.png" width="640" /></a></div>
<b><br /></b>
<b>Step 2:</b><br />
Now select Device radio button and click on the immediate right select button. A new window will open named Select backup Device. Click on the Add button to add the .BAK file. Add the file and click on the OK button.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPnoUCxx9AWGkDTRLxaMfzi5ETLHHtWcnInPyabvG0gb2dhu0CEvzLROC2eylnFJ9TVo7ycgnpoz6FBDeQwWh3dJOhALq0TX8BG1NZmtQ6YbsoeZ9e9g4-1YZK9PWmFXEaZGcPULlhsIg/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPnoUCxx9AWGkDTRLxaMfzi5ETLHHtWcnInPyabvG0gb2dhu0CEvzLROC2eylnFJ9TVo7ycgnpoz6FBDeQwWh3dJOhALq0TX8BG1NZmtQ6YbsoeZ9e9g4-1YZK9PWmFXEaZGcPULlhsIg/s640/2.png" width="640" /></a></div>
<b><br /></b>
<b>Step 3:</b><br />
Now when you came back to the previous window after clicking on the OK button you can see that the database name is already taken by the tool automatically. If you want to change the destination Database name then you can change it otherwise keep it as it is and click on the OK button to proceed.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqiashaURr5-gFsEPAFCygcc7osF0tpwWWQxxoi_ebaTULNEFASWr3qSm_PZBQxz16Y7D8Pm0kWMMf75Rhy5MBuoUNuibjxdFab-knn7pqLfwX2dGKwlDtKwXnOx5aN2kfn_MxXw7fFXU/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqiashaURr5-gFsEPAFCygcc7osF0tpwWWQxxoi_ebaTULNEFASWr3qSm_PZBQxz16Y7D8Pm0kWMMf75Rhy5MBuoUNuibjxdFab-knn7pqLfwX2dGKwlDtKwXnOx5aN2kfn_MxXw7fFXU/s640/3.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Step 4:</b></div>
<div class="separator" style="clear: both; text-align: left;">
Now on the right upper corner a green color bar will move with showing percentage. It may take some time to restore the database, as it depends on the size of the database. After finishing a message will be showing with the confirmation.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeujTR155kVziy-E4RZGkoO5MKs0txWqPvR5buGKPZ_k1aZcsWvQrIVcu2mzxvB8MBZ6HSyuXS5E9mfqnpsnYIj_wT0R8xhrR_Q-qIFBEvg8_tyxCZS9TERphmeKp4S38lvJJZ6bVjLWA/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeujTR155kVziy-E4RZGkoO5MKs0txWqPvR5buGKPZ_k1aZcsWvQrIVcu2mzxvB8MBZ6HSyuXS5E9mfqnpsnYIj_wT0R8xhrR_Q-qIFBEvg8_tyxCZS9TERphmeKp4S38lvJJZ6bVjLWA/s640/4.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Now go to your database, it will show your restored database in your Database section in Object Explorer. If it is not showing refresh your Database and it will be seen. Now try with yours one. </div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com0tag:blogger.com,1999:blog-331704360604939704.post-31708896337487089052015-10-04T10:28:00.000+05:302015-10-08T10:44:59.850+05:30DataTable.Copy() Vs. DataTable.Clone() in C#<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u><span style="font-size: large;">Introduction:</span></u></b><br />
<b><u><span style="font-size: large;"><br /></span></u></b>
In this post we will discuss about the two major methods of DataTable in C#. One is <b>Copy()</b> and another one is<b> Clone()</b>. Though these two are sounds identical but there are huge difference between these two. Lets see what are those..<br />
<br />
<b><u><span style="font-size: large;">Description:</span></u></b><br />
<b><u><span style="font-size: large;"><br /></span></u></b>
There are two things to copy or clone of a DataTable. These are <b>structure </b>and <b>data</b>. Copy and Clone are playing with these two.<br />
<br />
Lets us create a DataTable first.<br />
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DataTable</span><span style="font-family: Consolas; font-size: 9.5pt;"> dt = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DataTable</span><span style="font-family: Consolas; font-size: 9.5pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">dt.Columns.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Id"</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">dt.Columns.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Name"</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">dt.Columns.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Email"</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">dt.TableName = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"MasterTable"</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;">//insert into
DataTable</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">dt.Rows.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"1"</span><span style="font-family: Consolas; font-size: 9.5pt;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Arka"</span><span style="font-family: Consolas; font-size: 9.5pt;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"arka@gmail.com"</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">dt.Rows.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"2"</span><span style="font-family: Consolas; font-size: 9.5pt;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Anusua"</span><span style="font-family: Consolas; font-size: 9.5pt;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"anu@gmail.com"</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">dt.Rows.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">"3"</span><span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">"Sayantani"</span><span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">"sayantani@gmail.com"</span><span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">);</span><o:p></o:p></div>
</div>
<br />
<b>DataTable.Copy():</b><br />
DataTable.Copy() returns a DataTable with the structure and data of the DataTable.<br />
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;">//Creating another
DataTable to copy</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DataTable</span><span style="font-family: Consolas; font-size: 9.5pt;"> dt_copy = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DataTable</span><span style="font-family: Consolas; font-size: 9.5pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">dt.TableName = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"CopyTable"</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">dt_copy = dt.Copy();</span><o:p></o:p></div>
</div>
<br />
Result:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzJZ5WkengbCLCQ3jl6hjEMPZ309JHLAglHJ9IBuXa1VC25Tmgk7NR-qUTXyuM01H1BgsvqJRiFWBd13cX39xDi79T7WCkslTsnjOihcrAz-s2jlbCzPlo1Cqy_om8gW3R2AHzPNUQs48/s1600/copy.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzJZ5WkengbCLCQ3jl6hjEMPZ309JHLAglHJ9IBuXa1VC25Tmgk7NR-qUTXyuM01H1BgsvqJRiFWBd13cX39xDi79T7WCkslTsnjOihcrAz-s2jlbCzPlo1Cqy_om8gW3R2AHzPNUQs48/s400/copy.PNG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
As here you can see the DataTable dt is being copied with the data and structure to CopyTable.<br />
<br />
<b>DataTable.Clone():</b><br />
Unlike Copy(), DataTable.Clone() only returns the structure of the DataTable, not the rows or data of the DataTable.<br />
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;">//Creating another
DataTable to clone</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DataTable</span><span style="font-family: Consolas; font-size: 9.5pt;"> dt_clone = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DataTable</span><span style="font-family: Consolas; font-size: 9.5pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">dt.TableName = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"CloneTable"</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">dt_clone = dt.Clone();</span><o:p></o:p></div>
</div>
<br />
Result:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGA_ESsrFma8gIAagWP7dD-KifUI43CO-9IZMKiZLrzWogdMp3NCZcSwm7OdsA2EWtkqrtq1UfFcp4WSiYKyns8zh-CeRk81eN28NfVgoy42NRhZ84Q2ShWWXbXsqHujKUO633y0Imgdg/s1600/clone.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGA_ESsrFma8gIAagWP7dD-KifUI43CO-9IZMKiZLrzWogdMp3NCZcSwm7OdsA2EWtkqrtq1UfFcp4WSiYKyns8zh-CeRk81eN28NfVgoy42NRhZ84Q2ShWWXbXsqHujKUO633y0Imgdg/s400/clone.PNG" width="400" /></a></div>
<br />
As here you can see DataTable dt is being clone with only the structure of the MasterTable to CloneTable.<br />
<br />
In short:<br />
<b>Copy()</b> - For both structure and data.<br />
<b>Clone()</b> - For only structure.
<a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=9261026" rel="tag" style="display: none;">CodeProject</a>
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com1tag:blogger.com,1999:blog-331704360604939704.post-30320253679547782932015-10-03T00:23:00.001+05:302015-10-16T22:48:40.133+05:30Access modifiers in C#.NET with exampls<div dir="ltr" style="text-align: left;" trbidi="on">
<b><span style="font-size: large;"><u>Introduction:</u></span></b><br />
<b><span style="font-size: large;"><u><br /></u></span></b>
Access modifier are the defined level of permission to access properties and methods. By declaring this access modifiers we defining a variable or a event can be access from assembly to within that class. Lets see how.<br />
<br />
<b><u><span style="font-size: large;">Description:</span></u></b><br />
<b><u><span style="font-size: large;"><br /></span></u></b>
There are 4 major access modifiers in C#. These are...<br />
<br />
<ol style="text-align: left;">
<li>Public</li>
<li>Private</li>
<li>Protected</li>
<li>Internal</li>
<li>Protected Internal</li>
</ol>
<div>
<b>Public:</b></div>
<div>
Using Public a event or a variable can be accessed from outside of the class, where it belongs. And also from the outside of the assembly. </div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;"> //Public method</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> MethodPublic()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// defination of MethodPublic</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;">// to access the
method<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Program</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">static</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> Main(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;">[] args)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"> objClassTest = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> objClassTest.MethodPublic(); </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// valid code to
access. </span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
<b>Private:</b></div>
<div>
It restricts the use of methods and variables only within the the class itself. It cant be used from the outside of the class. As you declare a private constructor of a class that class can't be access from the outside that class, you can't create an object of that class,</div>
<div>
<br /></div>
<div>
Example 1: Private keyword</div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">//Private method</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">private</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> MethodPrivate()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// defination of MethodPrivate</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;">// to access the
method</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Program</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">static</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> Main(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;">[] args)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"> objClassTest = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> objClassTest.MethodPrivate(); </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// invalid code to
access. </span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHvACw_I8r7o0ToVga5PEpbfYlSUGlyGwBKMTXwdT25uBxtpI0DJzKZxVNLC8xoWw_IuLGekPnSnIELzLJ65hG5w-ALY4px99WE4Edqif14fso8s2hees8_tHRxx4XjJVh8LJc4OdEI44/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHvACw_I8r7o0ToVga5PEpbfYlSUGlyGwBKMTXwdT25uBxtpI0DJzKZxVNLC8xoWw_IuLGekPnSnIELzLJ65hG5w-ALY4px99WE4Edqif14fso8s2hees8_tHRxx4XjJVh8LJc4OdEI44/s1600/1.png" /></a></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600"
o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f"
stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="Picture_x0020_1" o:spid="_x0000_i1025" type="#_x0000_t75"
style='width:457.5pt;height:79.5pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:\Users\arka\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
Example 2: Private Constructor </div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">private</span><span style="font-family: Consolas; font-size: 9.5pt;"> ClassTest() { } </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// private constructor</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;">// to access the
method</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Program</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">static</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> Main(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;">[] args)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// invalid code. can't create an object of
this class</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"> objClassTest = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;">(); <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
<b>Protected:</b></div>
<div>
This allows variables and methods to access from that class and the sub class of the class. That means that methods can be access within that class and from the classes, which actually inheriting that class. </div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">//Protected variable</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">protected</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">int</span><span style="font-family: Consolas; font-size: 9.5pt;"> _a;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest2</span><span style="font-family: Consolas; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> ClassTest2()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">this</span><span style="font-family: Consolas; font-size: 9.5pt;">._a = 10; </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// can access from this class</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest3</span><span style="font-family: Consolas; font-size: 9.5pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> ClassTest3()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">this</span><span style="font-family: Consolas; font-size: 9.5pt;">._a = 10; </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// can't access from this class</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
<b>Internal:</b></div>
<div>
Internal is introduces in C#. In JAVA we don't have this access modifier. This allows the access after Protected. As Protected it is also allow to access the methods and variables from that class and the sub classes of that class. It added the assembly into it. That means the variables and methods can be access within the assembly where the class belongs. Now make that sure that here we are talking about Namespace, because Namespace and assembly are slightly different. An assembly can hold more than one Namespace. Assemblies are actually the dll of the project.</div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">internal</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> MethodInternal()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// do your code</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;">// to access the
method</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Program</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">static</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> Main(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;">[] args)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"> objClassTest = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> objClassTest.MethodInternal(); </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// valid code to
access. </span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}<o:p></o:p></span></div>
</div>
</div>
<div>
<br /></div>
<div>
<b>Protected Internal:</b></div>
<div>
Protected Internal allows you to access the variables and methods to access from that class and sub classes of that class. Also allows to access within the same assembly. Means in protected if the class is inheriting the super class and the method or variable is protected then the assembly doesn't matter to access. But in the Internal the assembly matters if the class is inheriting the super class. That is why we use Protected Internal access modifier. </div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">protected</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">internal</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> name; </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// protected internal</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> print()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Console</span><span style="font-family: Consolas; font-size: 9.5pt;">.WriteLine(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"\nMy name is "</span><span style="font-family: Consolas; font-size: 9.5pt;"> + name);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;">// to access the
method</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Program</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">static</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> Main(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;">[] args)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;"> objClassTest = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ClassTest</span><span style="font-family: Consolas; font-size: 9.5pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Accepting value in protected internal
variable</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> objClassTest.name = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Arka"</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> objClassTest.print(); <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
In sort:</div>
<div>
<br /></div>
<div>
<b>Public</b>: Any where from the class</div>
<div>
<b>Private</b>: Only within the class</div>
<div>
<b>Protected</b>: Only within that class and the sub classes of that class</div>
<div>
<b>Internal</b>: Within the assembly of the class</div>
<div>
<b>Protected Internal</b>: Within that class, sub classes of that class and and assembly.</div>
<div>
<br /></div>
<div>
Hope it will clear your concept about the access modifiers. Don't forget to post your valuable comments. </div>
<a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=9261026" rel="tag" style="display: none;">CodeProject</a>
</div>Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com0tag:blogger.com,1999:blog-331704360604939704.post-72794890905942017972015-10-02T10:50:00.001+05:302015-10-08T10:44:37.662+05:30Difference between Encapsulation and Abstraction in OOPs (C#.NET)<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u><span style="font-size: large;">Introduction:</span></u></b><br />
There are 4 major properties of Object Oriented Programming (OOPs) as you know. These are<br />
<br />
<ol style="text-align: left;">
<li>Abstraction</li>
<li>Encapsulation</li>
<li>Inheritance</li>
<li>Polymorphism</li>
</ol>
<div>
Among of these four properties or features we will discuss about the first two (Abstraction and Encapsulation) in this post. </div>
<div>
<br /></div>
<div>
<span style="font-size: large;"><b><u>Description:</u></b></span></div>
<div>
<br /></div>
<div>
So what actually Abstraction and Encapsulation are? Lets us know with an example</div>
<div>
<br /></div>
<div>
<b>Abstraction:</b></div>
<div>
Abstraction is a process to abstract or hide the functionality and provide users or other programmers to use it only. Like for the method Console.WriteLine(), no one knows what actually happening behind the function calling. We are just using it by calling and passing the arguments. This is the thing called Abstraction. </div>
<div>
<br /></div>
<div>
<b>Encapsulation:</b></div>
<div>
Encapsulation means to encapsulate or put every thing into one thing and provide others to use it. Like in a shaving kit there are all the necessary kits are available. And also these kits are available as loose in market. But the shaving kit is encapsulate every other kits into a small bag and provide user to use it. </div>
<div>
<br /></div>
<div>
Hope so now you have a basic idea about both of these properties, Lets see a real world example of encapsulation and abstraction.</div>
<div>
<br /></div>
<div>
Lets assume you have to create a method to insert an users data and pass it to other developers to use. So first create a class and add a method to insert the data into database with validation. </div>
<div>
<br /></div>
<div>
There will be three fields </div>
<div>
<ol style="text-align: left;">
<li>Name </li>
<li>Email</li>
<li>Phone number</li>
</ol>
<div>
So these inputs have to validate first and then insert into db.</div>
</div>
<div>
<br /></div>
<div>
First create a class with all methods</div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">User</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">bool</span><span style="font-family: Consolas; font-size: 9.5pt;"> AddUser(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> name, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> email, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> phone)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">if</span><span style="font-family: Consolas; font-size: 9.5pt;"> (ValidateUser(name, email, phone))<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">if</span><span style="font-family: Consolas; font-size: 9.5pt;"> (AddtoDb(name, email, phone) > 0)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">return</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">true</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">return</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">false</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">private</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">bool</span><span style="font-family: Consolas; font-size: 9.5pt;"> ValidateUser(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> name, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> email, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> phone)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// do your validation</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">return</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">true</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">private</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">int</span><span style="font-family: Consolas; font-size: 9.5pt;"> AddtoDb(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> name, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> email, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> phone)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// Write the Db code to insert the data</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">return</span><span style="font-family: Consolas; font-size: 9.5pt;"> 1;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">}<o:p></o:p></span></div>
</div>
</div>
<div>
<br /></div>
<div>
As you can see there are three methods are written in this User class. </div>
<div>
<ul style="text-align: left;">
<li>AddUser: To call from outside the class. That is why the access modifier is public.</li>
<li>validateUser: To validate the user's details. Can't access from out side the class. Its private.</li>
<li>AddtoDb: To insert data into database table and again it is private, can't access from out side the class.</li>
</ul>
<div>
Now another user will just call AddUser method with parameters. And that user has no idea what is actually happening inside the method. I didn't write the code to validate and insert into db, as you can get it from others examples. We will discuss about it later. </div>
</div>
<div>
<br /></div>
<div>
To call the AddUser method do like following. </div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Program</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">static</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="font-family: Consolas; font-size: 9.5pt;"> Main(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;">[] args)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">User</span><span style="font-family: Consolas; font-size: 9.5pt;"> objUser = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">User</span><span style="font-family: Consolas; font-size: 9.5pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">bool</span><span style="font-family: Consolas; font-size: 9.5pt;"> f = objUser.AddUser(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Arka"</span><span style="font-family: Consolas; font-size: 9.5pt;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"ark@g.com"</span><span style="font-family: Consolas; font-size: 9.5pt;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"1234567890"</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
Now come back to the main discussion.</div>
<div>
<br /></div>
<div>
Here we are hiding the procedure of adding data into database from other users, this is <b>Abstraction</b>. And putting all the three methods into one User class and provide other user to use it that is called <b>Encapsulation</b>. </div>
<div>
<br /></div>
<div>
So procedure hiding is <b>Abstraction </b>and putting every necessary things into one is <b>Encapsulation</b>. </div>
<div>
Hope so you have cleared your doubt about the concept of Encapsulation and Abstraction. </div>
<a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=9261026" rel="tag" style="display: none;">CodeProject</a>
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com1tag:blogger.com,1999:blog-331704360604939704.post-81387215220409783162015-07-19T23:14:00.000+05:302015-07-19T23:19:15.233+05:30E-ICEBLUE, Your Office Development Master<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.e-iceblue.com/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img alt="E-ICEBLUE, Your Office Development Master" border="0" height="61" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5YF7Plycq_7VYhjMgEZYx5XeAHlTLF8PEnzZwAz3yR6pTQ3dDYHnbv0FVDwYofMV3XkR9-42ihTTaw9LqFJN5LLfaZ0jjmA9KzzhAwzH54Z-UW6-AWWjFYU5EtiyxZCjaA6qqvXnIy3k/s320/Untitled.png" title="E-ICEBLUE, Your Office Development Master" width="320" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;">iText sharp is one of the 3rd party component to use for PDF, Word, Excel, Power Point creation and others in .NET, Now here are E-ICEBLUE to make your office experience even better with .NET. It comes with both C# and VB.NET component. Just download and add the dll into your solution, use their code to create your PDF, Word, Excel or Power Point.</span><br />
<h3 style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;">
What E-ICEBLUE offers ?</span></h3>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Here are the full list of offers that E-ICEBLUE have for you.</span></div>
<div>
<ol style="text-align: left;">
<li><span style="font-family: Arial, Helvetica, sans-serif;">Spire.Doc</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Spire.DocViewer</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Spire.XLS</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Spire.Presentation</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Spire.PDF</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Spire.PDFViewer</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Spire.PDFConverter</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Spire.DataExport</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Spire.BarCode</span></li>
</ol>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">All these are offered by E-ICEBLUE to make your Office experience better. Demos are available in their site. Lets see how it works..</span></div>
<h3 style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;">
How it works? </span></h3>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">For each and every product you have to download the installation file and install this. Now add the add the dll files into your project, as example..</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">For Spire.Doc download the file and install it in its default path(<span style="background-color: white; color: #333333; font-size: 14px; line-height: 21px;">C:\Program Files\e-iceblue\Spire.Doc</span>). Now add the dll file into your project by browsing the file into default folder or where you have installed. Similarly same thing goes for others also.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">As you add the dll files into your project you have to add the namespaces into your VB or CS file. </span><br />
<br />
<b><u>C#.NET</u></b><br />
<pre>using Spire.Doc;
using Spire.Doc.Documents;</pre>
<pre></pre>
<div style="text-align: left;">
<span style="font-family: inherit;"><b><u>VB.NET</u></b></span></div>
<pre>Imports Spire.Doc
Imports Spire.Doc.Documents</pre>
<pre></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;">As you add those namespaces you are now able to access the class to create your doc,</span></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;">excel,power point and pdf files just by calling the method.
Let us see how to create a simple doc file in just few lines.</span></pre>
<pre></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;"><u><b>C#.NET</b></u></span></pre>
<pre>//Create word document
Document document = new Document();
//Create a new paragraph
Paragraph paragraph = document.AddSection().AddParagraph();
//Append Text
paragraph.AppendText("Word file by using Spire.Doc");
//Save doc file.
document.SaveToFile("Sample.doc", FileFormat.Doc);
//Launching the MS Word file.
try
{
System.Diagnostics.Process.Start("Sample.doc");
}
catch { }</pre>
<pre></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;"><b><u>VB.NET</u></b></span></pre>
<pre>'Create word document
Dim document_Renamed As New Document()
'Create a new paragraph
Dim paragraph_Renamed As Paragraph = document_Renamed.AddSection().AddParagraph()
'Append Text
paragraph_Renamed.AppendText("Word file by using Spire.Doc")
'Save doc file.
document_Renamed.SaveToFile("Sample.doc", FileFormat.Doc)
'Launching the MS Word file.
Try
System.Diagnostics.Process.Start("Sample.doc")
Catch
End Try</pre>
<pre></pre>
<pre></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;"><b><u>Output:</u></b></span></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.e-iceblue.com/images/stories/demos/spire.doc/helloworld.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.e-iceblue.com/images/stories/demos/spire.doc/helloworld.gif" height="230" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;">How simple to create a doc file. Same thing happens also for Excel, PDF, Power Point. Here I have seen only for Windows application, they have provided also in Silverlight and WPF. </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;">To check all tutorials you can go for following links.</span></div>
<ol>
<li><a href="http://www.e-iceblue.com/Tutorials/Spire.Doc/Getting-started/Spire.Doc-Quick-Start.html" target="_blank"><span style="font-family: Arial, Helvetica, sans-serif;">Spire.Doc</span></a></li>
<li><a href="http://www.e-iceblue.com/Tutorials/Spire.DocViewer/Spire.DocViewer-Program-Guide/How-to-Open-and-Close-Word-Files-using-Spire.DocViewer.html"><span style="font-family: Arial, Helvetica, sans-serif;">Spire.DocViewer</span></a></li>
<li><a href="http://www.e-iceblue.com/Tutorials/Spire.XLS/Getting-started/Spire.XLS-Quick-Start.html"><span style="font-family: Arial, Helvetica, sans-serif;">Spire.XLS</span></a></li>
<li><a href="http://www.e-iceblue.com/Tutorials/Spire.Presentation/Getting-started/Spire.Presentation-Quick-Start.html"><span style="font-family: Arial, Helvetica, sans-serif;">Spire.Presentation</span></a></li>
<li><a href="http://www.e-iceblue.com/Tutorials/Spire.PDF/Demos/Quick-guide/PDF-HelloWorld-C-VB.NET.html"><span style="font-family: Arial, Helvetica, sans-serif;">Spire.PDF</span></a></li>
<li><a href="http://www.e-iceblue.com/Tutorials/Spire.PDFViewer/Program-Guide/How-to-Save-PDF-File-via-Spire.PDFViewer-with-C-VB.NET.html"><span style="font-family: Arial, Helvetica, sans-serif;">Spire.PDFViewer</span></a></li>
<li><a href="http://www.e-iceblue.com/Tutorials/PDFConverter/How-to-Convert-HTML-to-PDF.html"><span style="font-family: Arial, Helvetica, sans-serif;">Spire.PDFConverter</span></a></li>
<li><a href="http://www.e-iceblue.com/Tutorials/Spire.DataExport/Getting-started/Spire.DataExport-Quick-Start.html"><span style="font-family: Arial, Helvetica, sans-serif;">Spire.DataExport</span></a></li>
<li><a href="http://www.e-iceblue.com/Tutorials/Spire.BarCode/Spire.BarCode-Program-Guide/NET-How-to-add-Controls-to-Toolbox.html"><span style="font-family: Arial, Helvetica, sans-serif;">Spire.BarCode</span></a></li>
</ol>
<pre><span style="font-family: Arial, Helvetica, sans-serif;">Also you can use the API of Spire.Doc, Spire.DocViewer, Spire.XLS, Spire.Presentation, </span></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;">Spire.PDF, Spire.PDFViewer. For that click <a href="http://www.e-iceblue.com/Tutorials/API.html" target="_blank">here</a>.</span></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;">
</span></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;"><u><b>Important links:</b></u></span></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;"><u><b>
</b></u></span></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;">For products visit <a href="http://www.e-iceblue.com/" target="_blank">E-ICEBLUE</a>.</span></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;">For tutorial visit <a href="http://www.e-iceblue.com/Tutorials/Spire.Doc/Demos.html" target="_blank">E-ICEBLUE Tutorials</a>.</span></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;">For video tutorials <a href="https://www.youtube.com/user/eiceblue" target="_blank">E-ICEBLUE Video Tutorials</a></span></pre>
<pre><span style="font-family: Arial, Helvetica, sans-serif;">For purchasing </span><span style="font-family: Arial, Helvetica, sans-serif;">visit </span><a href="http://www.e-iceblue.com/" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">E-ICEBLUE</a><span style="font-family: Arial, Helvetica, sans-serif;">.</span></pre>
</div>
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com0tag:blogger.com,1999:blog-331704360604939704.post-82080386940557607962015-07-03T22:46:00.002+05:302015-07-03T22:46:45.265+05:30Image slider from a folder in MVC 4.0<div dir="ltr" style="text-align: left;" trbidi="on">
In this post we will learn about to create a HTML JQuery CSS slider where images are binding from a specific folder. Means you just have to add a folder name and rest of the work will be take care of the code.<br />
<div>
<br /></div>
<div>
All we need a pack of JQuery slider. As I found one from my hard disk, I will do with this. </div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsKmw2T_brQF5m5IkhcoRIRQSubxPDu1G-50xK69WwLHd2dHNwut9ldl4XhWEZNNFgzZcOr9CvvyurbHnYR6AV2CJuQkHVELYCvyu0UrNPAv-ceAfd24sesZZA-MrYZTATVM-S1xvSGeA/s1600/0.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="295" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsKmw2T_brQF5m5IkhcoRIRQSubxPDu1G-50xK69WwLHd2dHNwut9ldl4XhWEZNNFgzZcOr9CvvyurbHnYR6AV2CJuQkHVELYCvyu0UrNPAv-ceAfd24sesZZA-MrYZTATVM-S1xvSGeA/s400/0.PNG" width="400" /></a></div>
<div>
<u><span style="font-size: large;">Step 1:</span></u></div>
<div>
<br /></div>
<div>
After creating a new project you have to put all the resources like images, JavaScript and css files into new solutions. We have taken a empty MVC project as Razor view engine. </div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpo6Lomdt2UcxpqttdRwqeDYz1bhAmEcSXLE_Pr3ioSMeojEM2eiPnlKHzOccci008em5gKx1M2XcutnyE4JAKsFYbWIGll9NmO0vYPb1MbndvmqfMGwFJHNj7F7a4NS-uBaCAjHbYv5o/s1600/3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpo6Lomdt2UcxpqttdRwqeDYz1bhAmEcSXLE_Pr3ioSMeojEM2eiPnlKHzOccci008em5gKx1M2XcutnyE4JAKsFYbWIGll9NmO0vYPb1MbndvmqfMGwFJHNj7F7a4NS-uBaCAjHbYv5o/s320/3.PNG" width="224" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As we all can see the assets folder is the resources that we have imported from our HTML Jquery. img folder in assets is the main folder from which we are fetching the images to create a slider.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><u>Step 2:</u></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As we take an empty project we have to build a new controller, so we created a new controller named <b>HomeController</b> and in model folder created a new model named Slider.cs.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><u>Step 3:</u></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now lets create the Slider.cs file first. It will took two things. One is <b>src </b>(this is the source of the image)<b> </b>& second one is<b> title </b>(Title and alt of the image)<b>. </b></div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">namespace</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">
MVCImageSliderFromFolder.Models<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">class</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Slider</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">string</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> src { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">get</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">set</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">; }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">string</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> title { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">get</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">set</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">; }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 107%;">}</span><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span style="font-size: large;"><u>Step 4:</u></span></div>
<div>
<br /></div>
<div>
Now its time for the controller. This is the main thing to get manage all the images and send that to View part to show.</div>
<div>
<br /></div>
<div>
Before proceeding we must have to discuss about the algorithm, which is actually happening. </div>
<div>
<br /></div>
<div>
Get the Folder Name -> Search all the images(.jpg, .png and others...) -> Make a list of that with source and title -> Send to view for showing the slider.</div>
<div>
<br /></div>
<div>
So lets proceed with searching all the files/images from the desired folder. </div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">string</span><span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 107%;">[]
filePaths = </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">Directory</span><span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 107%;">.GetFiles(Server.MapPath(</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">"~/assets/img/"</span><span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 107%;">));</span><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
In this way we will get all the files in the folder ~/assets/img. Now we have to create a List of type Slider to pass this to View. To do this...</div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">List</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Slider</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">> files = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">List</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Slider</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">>();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">foreach</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> (</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">string</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> filePath </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">in</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> filePaths)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">string</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> fileName = </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Path</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">.GetFileName(filePath);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> files.Add(</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Slider</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> title=
fileName.Split(</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">'.'</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">)[0].ToString(), <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> src = </span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"../assets/img/"</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> +
fileName<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> });<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 107%;">}</span><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
Now in the List files we have the source and the title of all the files/images present in img folder. Now send this to View by <span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%;">return</span><span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 107%;"> View(files);</span></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div>
<br /></div>
<div>
<span style="font-size: large;"><u>Step 5:</u></span></div>
<div>
<br /></div>
<div>
Now the last part is left to do. Bind the model to View part and your slider is ready. </div>
<div>
<br /></div>
<a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=9261026" rel="tag" style="display: none;">CodeProject</a>
<br />
<div>
First of all add the resources at the top of the HTML file (Header section).</div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">link</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">rel</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">="stylesheet"</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">href</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">="../assets/bjqs.css"></span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">link</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">href</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">='http://fonts.googleapis.com/css?family=Source+Code+Pro|Open+Sans:300'</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">rel</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">='stylesheet'</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">type</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">='text/css'></span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">link</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">rel</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">="stylesheet"</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">href</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">="../assets/demo.css"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">script</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">src</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">="http://code.jquery.com/jquery-1.7.1.min.js"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">script</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">></span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">script</span><span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 107%;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">src</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">="../assets/js/bjqs-1.3.min.js"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">script</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">></span><o:p></o:p></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="background: white; font-size: 12.6666669845581px; line-height: 13.5533332824707px;"><span style="color: blue; font-family: Consolas;"><</span><span style="color: maroon; font-family: Consolas; font-size: 12.6666669845581px; line-height: 13.5533332824707px;">script</span><span style="color: blue; font-family: Consolas;"> </span><span style="color: red; font-family: Consolas; font-size: 12.6666669845581px; line-height: 13.5533332824707px;">src</span><span style="color: blue; font-family: Consolas;">="../assets/js/libs/jquery.secret-source.min.js"></</span><span style="color: maroon; font-family: Consolas; font-size: 12.6666669845581px; line-height: 13.5533332824707px;">script</span><span style="color: blue; font-family: Consolas;">></span></span></div>
</div>
</div>
<div>
<br /></div>
<div>
Now add the slider, as we are dealing with only the slider we don't need to worry about all other stuffs. If it is a full web page then you can add a Partial View and pass the Model on that and create the slider portion in that Partial View.</div>
<div>
<br /></div>
<div>
To create the slider....</div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">div</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">id</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">="banner-fade"></span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">ul</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">class</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">="bjqs"></span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: yellow; font-family: Consolas; font-size: 9.5pt;">@</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">foreach</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> (</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> item </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">in</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> Model)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">li</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">></span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">img</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">src</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">='</span><span style="background: yellow; font-family: Consolas; font-size: 9.5pt;">@</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">Html.DisplayFor(modelItem => item.src)</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">'</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">
</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">title</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">='</span><span style="background: yellow; font-family: Consolas; font-size: 9.5pt;">@</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">Html.DisplayFor(modelItem
=> item.title)</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">'</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">alt</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">=""></span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">li</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">></span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">ul</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">></span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">div</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">></span><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
Write a loop to create the li within ul. All you is done. Only left is to call the javaScript function to run the slider. To call this</div>
<div>
<br /></div>
<div>
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">script</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">></span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">jQuery(</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">function</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> ($) {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> $(</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">'.secret-source'</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">).secretSource({<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> includeTag:
</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">false</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> });<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> $(</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">'#banner-fade'</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">).bjqs({<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> height:
320,<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> width: 620,<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> responsive: </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">true</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> });<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">});<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">script</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">></span><o:p></o:p></div>
</div>
</div>
<div>
<br /></div>
<div>
This one will differ from slider to slider, as I took this one they have called it in this way, in other slider calling of the JavaScript functions are different. </div>
<div>
<br /></div>
<div>
Now build your project and run this. Enjoy the slider.</div>
<div>
<br /></div>
<div>
Download the full source code <a href="https://app.box.com/s/0767xk6c69pb3sl8rb17gqxctcfvub5t" target="_blank">here</a>.</div>
<div>
<br /></div>
<div style="text-align: center;">
<span style="font-size: x-large;"><a href="https://app.box.com/s/0767xk6c69pb3sl8rb17gqxctcfvub5t" target="_blank">Download Now</a></span></div>
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com3tag:blogger.com,1999:blog-331704360604939704.post-86336716830455104042015-06-13T17:32:00.003+05:302015-06-13T17:36:17.682+05:30Team management Part - II (Add Users)<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div>
Team Management</div>
<ol style="text-align: left;">
<li><a href="http://asp-arka.blogspot.in/2015/05/team-management-part-1.html" target="_blank">Team Management part 1 (View users)</a></li>
<li><a href="http://asp-arka.blogspot.in/2015/06/team-management-part-ii-add-users.html">Team Management Part II (Add Users)</a> [Current]</li>
</ol>
<br />
In my <a href="http://asp-arka.blogspot.in/2015/05/team-management-part-1.html" target="_blank">previous post</a> I have posted how to view users using SQL server query with database table structure and as a view method I have shown the ways of genealogy view using normal HTML, CSS and Google organizational chart.<br />
<br />
In this post I will show you how to add a new user under one user. The post covers<br />
<ol style="text-align: left;">
<li>Full database table structure of users.</li>
<li>Add new user under another user.</li>
<li>Send confirmation mail.</li>
<li>Confirm users via mail id (Using <a href="http://en.wikipedia.org/wiki/Globally_unique_identifier" target="_blank">GUID</a>). </li>
</ol>
<div>
Full database structure:</div>
<div>
<br /></div>
<div>
Previously we have shown only the normal descriptions like email, name, phone no. and member's parent Id. But here we will include another 2 fields. One is IsConfirm(bit) and another is IsDelete(bit).</div>
<div>
<br />
<b><u>Database Design:</u></b><br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable">
<tbody>
<tr>
<td style="padding: 0in 0in 0in 0in; width: 234.4pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">UserId (Primary Key)<o:p></o:p></span></div>
</td>
<td style="padding: 0in 0in 0in 0in; width: 235.1pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Int (Identity(1,1)) Primaty Key<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 0in 0in 0in 0in; width: 234.4pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Email<o:p></o:p></span></div>
</td>
<td style="padding: 0in 0in 0in 0in; width: 235.1pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">NVarChar(255)<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 0in 0in 0in 0in; width: 234.4pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Name<o:p></o:p></span></div>
</td>
<td style="padding: 0in 0in 0in 0in; width: 235.1pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">NVarChar(255)<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 0in 0in 0in 0in; width: 234.4pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">ParentId<o:p></o:p></span></div>
</td>
<td style="padding: 0in 0in 0in 0in; width: 235.1pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Int<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 0in 0in 0in 0in; width: 234.4pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">IsDelete<o:p></o:p></span></div>
</td>
<td style="padding: 0in 0in 0in 0in; width: 235.1pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Bit<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 0in 0in 0in 0in; width: 234.4pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">IsConfirm<o:p></o:p></span></div>
</td>
<td style="padding: 0in 0in 0in 0in; width: 235.1pt;" valign="top" width="313"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Bit<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
</div>
<div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- techcseblog_sidebar-right-1_AdSense1_728x90_as -->
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-6159992269699002" data-ad-slot="9858000153" style="display: inline-block; height: 90px; width: 728px;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script><br />
<br /></div>
<div>
<b>IsDelete:</b> Its a bit value to save whether the user is deleted or not. In real process not a single value is being deleted during the delete or update. Each and every information about any thing is keep in store. So we use this type of flag to ensure the arising confusions. If this user is being deleted then the IsDelete field will be False (0), else True (1).<br />
<br />
Now you will be little bit confused about the Password section. Where I am storing the password for the user. Here is the answer.<br />
<br />
We are using a another table to store the passwords for each user using the UserId.<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Id<o:p></o:p></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Int(Identity(1,1)) Primary Key<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
UserId<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Int<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Password<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
NvarChar(255)<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Date<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Date<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNormal">
<br /></div>
Using this table we can trace the user's password and their previous password and we can also use this as recovery process.<br />
<br />
<b>IsConfirm: </b>This flag is being used to check whether the user is a valid one or not. Here we are sending an email after user's registration. As user go back to his/her mail box and hit the link, he/ she will be an authenticate user by updating the flag from False to True.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-OPmcK5KIf0jJMBpmsaMVzw_nyxDflELlGyNsCjBJMPNkhEuiHWcpOjuz2P9Li8dkCs95cmBomlPOmzE0KgFtx-lpYPjZntOh9ksdncjrXpn02Cbh6c9-0S2U6MXIi0JqTSMUhhkyvYw/s1600/full-proccess.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-OPmcK5KIf0jJMBpmsaMVzw_nyxDflELlGyNsCjBJMPNkhEuiHWcpOjuz2P9Li8dkCs95cmBomlPOmzE0KgFtx-lpYPjZntOh9ksdncjrXpn02Cbh6c9-0S2U6MXIi0JqTSMUhhkyvYw/s640/full-proccess.png" width="640" /></a></div>
<br />
<br />
Check the diagram closely and understand the process flow of a full add user process.<br />
<br />
Step 1:<br />
Take the all inputs from user by creating a form. Here we will take users name, password email and other details. At the time of choosing the parent you can do two things.<br />
<br />
<ol style="text-align: left;">
<li> Take the Id of current user (who is logged in). - Use the Session value to get the parent id</li>
<li> Use a Drop Down List to select the user. - Use a Drop down by binding all the users and their id. Take the selected one as Parent. </li>
</ol>
<br />
Take the parent id and insert those data into database table. Get the ID from there using<br />
@@identity or SCOPE_IDENTITY()<br />
<br />
and with the help of that id insert the password into password table. Here you have to maintain another table for the process of email verification.<br />
<br />
I am sure you know how to send the mail with HTML body. If not then go through this link. Here I have described how to send mail via Gmail and GoDaddy.<br />
<br />
To get the email verification I am using GUID. To know what is GUID and how to generate that go through ...<br />
<br />
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- techcseblog_sidebar-right-1_AdSense1_728x90_as -->
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-6159992269699002" data-ad-slot="9858000153" style="display: inline-block; height: 90px; width: 728px;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script><br />
<br />
We have to link this generated GUID with our user id, and IsConfrim. So what to do? Lets create the table structure.<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
GUID<o:p></o:p></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
NVarChar(255)<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
TableName<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
NVarChar(255)<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Field<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
NVarChar(255)<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Value<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
NvarChar(255)<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
UserId<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
INT<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
IsActive<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Bit<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>GUID:</b> The actual code to be generated (unique id)</div>
<div class="MsoNormal">
<b>TableName:</b> On which table it will be updated</div>
<div class="MsoNormal">
<b>Field: </b>On which field the action will be done.</div>
<div class="MsoNormal">
<b>Value:</b> What will be the value after updation of the field.</div>
<div class="MsoNormal">
<b>UserId:</b> On which user it change will be applicable.<br />
<b>IsActive:</b> Is this still usable or not. At first when the GUID is creating it is True and after use it will turn into False.<br />
<br />
<u>How to create a GUID? </u><br />
<br />
To create GUID write down the following code snippet<br />
<br />
<b>Guid obj = Guid.NewGuid(); </b><br />
<b>Console.WriteLine("New Guid is " + obj.ToString());</b><br />
<br />
this will return a new GUID and with this you can perform all the operations you want.<br />
<br />
All you have to do now is have to send a mail along with this GUID. To mail this you can use any of the SMTP server. To send via Google check this or if you want to send via GoDaddy server check this one. As the mail content will be a link, may be a page link with the generated GUID. Like this<br />
<br />
<b>http://yourdomain.com/confirmuser?id=your_guid</b><br />
<br />
or<br />
<br />
<b>http://yourdomain.com/confirmuser/your_guid</b><br />
<br />
or any thing you want. You can easily get the guid from the URL via Query string.<br />
<br />
<b>string guid = Request.QueryString("id");</b><br />
<br />
when ever you got the GUID you can easily check whether it is previously used or not?<br />
<br />
<b>Select IsActive from <table_name> where GUID="<your GUID>"</b></div>
<div class="MsoNormal">
<o:p><br /></o:p>
<o:p>It will return either True or False and from that we can get that we have to proceed or not with this user. </o:p><br />
<o:p><br /></o:p>
<o:p>If True then get the table name, user id, field and the value using this guid.</o:p><br />
<o:p><br /></o:p>
<b>Select TableName, Value, UserId, Field from <Table_Name> where GUID = "<your GUID>"</b><br />
<br />
Took this data into a DataTable (say DataTable dt) for future use. Now you have to do the trick with this DataTable. The update statement will something like this.<br />
<br />
<b>Update dt.Rows[0]["TableName"].ToString() set dt.Rows[0]["Field"].ToString() ="+ dt.Rows[0]["Value"].ToString() +" where UserId = "dt.Rows[0]["UserId"].ToString()"</b><br />
<br />
Its is like<br />
<br />
<b>Update tblUser set IsActive="True" where UserId="<userid>"</b><br />
<br />
Now update the table and send User a confirmation mail. Before exiting update the Guid table's isActive with false against the GUID.<br />
<br />
Now your user is ready to use the application. Enojoy. </div>
</div>
</div>Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com0tag:blogger.com,1999:blog-331704360604939704.post-57452016531416676412015-05-30T01:22:00.003+05:302015-05-31T17:32:39.479+05:30Logout user after browser close in ASP.NET C# using web services<div dir="ltr" style="text-align: left;" trbidi="on">
<b>Introduction:</b><br />
Keeping a track of user's time in your web application is one of the most important issue to maintain. It not only helps to keep the track of user's but also it helps to solve any other analytical problems with application's data, like average in time, average out time, average time spent in your application etc. So how to keep the users login logout information of your web application.<br />
<br />
By clicking on the login button you can easily get the login time, and I hope you have kept your session checking active during logging of your users. On other hand by clicking on the Logout button you can also trace the logout time. But what happen when user close the browser, then how will you keep the track of user's logout time. Here in this post we will discuss about this serious issue.<br />
<br />
<b>Using of Web Services</b><br />
Instead of using normal methods we will use Web services to get the logout time for the user.<br />
<br />
<b>What is Web Services?</b><br />
According to MSDN<br />
<blockquote class="tr_bq">
Web services are components on a Web server that a client application can call by making HTTP requests across the Web. ASP.NET enables you to create custom Web services or to use built-in application services, and to call these services from any client application.
</blockquote>
<b>Key Concept:</b><br />
There is a function named onbeforeunload of javascript. This is called at the time of unloading the web page, whether you are closing the browser or closing the tab or redirecting to any other web page from that particular page, where it is coded. <u>Do not use an alert() within </u>onbeforeunload<u>, it will not work</u>.<br />
<br />
Using this we are getting the login session id and passes it to the web services. And in web service we are doing our necessary thing(sql server entry or putting it in any notepad with login id etc.).<br />
<br />
<b>Using the code:</b><br />
Lets create a project named it whatever you want. Add a new web form and design it according to you.<br />
<br />
On the aspx page's head section write down the following code.<br />
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: Consolas; font-size: 9.5pt;">script</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt;">src</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></</span><span style="color: maroon; font-family: Consolas; font-size: 9.5pt;">script</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><</span><span style="color: maroon; font-family: Consolas; font-size: 9.5pt;">script</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> window.onbeforeunload = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">function</span><span style="font-family: Consolas; font-size: 9.5pt;"> (evt) {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">var</span><span style="font-family: Consolas; font-size: 9.5pt;"> message = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">'You have started writing or editing
a post.'</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">var</span><span style="font-family: Consolas; font-size: 9.5pt;"> loginId = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">'</span><span style="font-family: Consolas; font-size: 9.5pt;"><%</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;"> Session[</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"LoginId"</span><span style="font-family: Consolas; font-size: 9.5pt;">].ToString() %></span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">'</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> console.log(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">'in'</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> $.ajax({<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> url: </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Logout.asmx/LogoutMethod"</span><span style="font-family: Consolas; font-size: 9.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> contentType: </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"application/json;
charset=utf-8"</span><span style="font-family: Consolas; font-size: 9.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> type: </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"POST"</span><span style="font-family: Consolas; font-size: 9.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> success: </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">function</span><span style="font-family: Consolas; font-size: 9.5pt;"> (data) {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> alert(data);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> },<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> error: </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">function</span><span style="font-family: Consolas; font-size: 9.5pt;"> (x, y, z) {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> alert(x.responseText + </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">" "</span><span style="font-family: Consolas; font-size: 9.5pt;"> + x.status);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> });<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%;"></</span><span style="color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">script</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">></span><o:p></o:p></div>
</div>
<br />
On body you do whatever your design or work. In the web services write down again the following code. And make sure that <span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">[System.Web.Script.Services.</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">ScriptService</span><span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">] </span><span style="background: white; line-height: 115%;"><span style="font-family: inherit;">is uncommented</span></span><span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">. </span><br />
<span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 115%;"><br /></span>
<span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 115%;"></span><br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">[</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">WebService</span><span style="font-family: Consolas; font-size: 9.5pt;">(Namespace = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"http://tempuri.org/"</span><span style="font-family: Consolas; font-size: 9.5pt;">)]<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">[</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">WebServiceBinding</span><span style="font-family: Consolas; font-size: 9.5pt;">(ConformsTo = </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">WsiProfiles</span><span style="font-family: Consolas; font-size: 9.5pt;">.BasicProfile1_1)]<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">[System.ComponentModel.</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ToolboxItem</span><span style="font-family: Consolas; font-size: 9.5pt;">(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">false</span><span style="font-family: Consolas; font-size: 9.5pt;">)]<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: green; font-family: Consolas; font-size: 9.5pt;">// To allow this Web
Service to be called from script, using ASP.NET AJAX, uncomment the following
line. </span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">[System.Web.Script.Services.</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">ScriptService</span><span style="font-family: Consolas; font-size: 9.5pt;">]<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Logout</span><span style="font-family: Consolas; font-size: 9.5pt;"> :
System.Web.Services.</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">WebService</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> [</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">WebMethod</span><span style="font-family: Consolas; font-size: 9.5pt;"> (EnableSession = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">true</span><span style="font-family: Consolas; font-size: 9.5pt;">)]<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">public</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> LogoutMethod()<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: green; font-family: Consolas; font-size: 9.5pt;">// take a log.txt and write on there with
time</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> a = Session[</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"LoginId"</span><span style="font-family: Consolas; font-size: 9.5pt;">].ToString();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">File</span><span style="font-family: Consolas; font-size: 9.5pt;">.AppendAllText(Server.MapPath(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"~/log.txt"</span><span style="font-family: Consolas; font-size: 9.5pt;">),</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"Login id loges
out "</span><span style="font-family: Consolas; font-size: 9.5pt;">+a+
</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"
at "</span><span style="font-family: Consolas; font-size: 9.5pt;">+
</span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DateTime</span><span style="font-family: Consolas; font-size: 9.5pt;">.Now.ToString()+ </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">Environment</span><span style="font-family: Consolas; font-size: 9.5pt;">.NewLine);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">return</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">""</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">}</span><o:p></o:p></div>
</div>
<div class="MsoNormal">
<o:p></o:p></div>
<br />
Before run this create a <b>log.txt</b> file in your solution explorer, where all your log out log will be stored.<br />
<br />
You can down the full source code <a href="https://app.box.com/s/p4blqpalpbxxjmac7kkmkn17tpizqe74" target="_blank">here</a>. Now its your turn to do. Try it in your machine.<br />
<br />
<div style="text-align: center;">
<span style="font-size: x-large;"><a href="https://app.box.com/s/p4blqpalpbxxjmac7kkmkn17tpizqe74" target="_blank">Download Now</a> </span></div>
<a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=9261026" rel="tag" style="display: none;">CodeProject</a>
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com0tag:blogger.com,1999:blog-331704360604939704.post-40175436281277690492015-05-23T10:20:00.001+05:302015-06-13T17:36:52.205+05:30Team management Part-I (View users)<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
Team Management</div>
<ol>
<li><a href="http://asp-arka.blogspot.in/2015/05/team-management-part-1.html" target="_blank">Team Management part 1 (View users)</a> [Current]</li>
<li><a href="http://asp-arka.blogspot.in/2015/06/team-management-part-ii-add-users.html">Team Management Part II (Add Users)</a> </li>
</ol>
<br />
In various applications user is the main character to play a role and for software developer, user management is a big issue to handle. Many thing like user satisfaction, user info secrecy, child parent management, easy to handle, scalability etc. are one of the parts of user management process. Today in this post I choose to write about the parent child relation within a user management or rather we should say the Team management. This is only the part 1, registration checking delete and many others are coming after this.<br />
<div>
<br />
<b><u>What is a Team?</u></b><br />
<b><u><br /></u></b></div>
<div>
So what is a Team? A group of users which has an admin or manager who is managing a set of people or users. And with all those users a team is forming. In the terms of database all the users are virtual, there is no existing of a physical user. So how to manage those virtual users from our database. Lets see.</div>
<div>
<br /></div>
<div>
<b><u>Basic Database design:</u></b></div>
<div>
<br /></div>
<div>
Database design is one of the most important part of a team management process. If your table structure is not properly maintained then many more problems will arise as the no. of team members will increase. As it follows a tree structure you can take a single table or more than one table to put your users with their all details and an important one, their <b>level</b>. Level is the one thing from which you can actually track your users and do a descend tracking of users. <br />
<br />
<b><u>Database Design:</u></b><br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
UserId (Primary Key)<o:p></o:p></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Int (Identity(1,1))<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Email<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
NVarChar(255)<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Name<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
NVarChar(255)<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Password<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
NVarChar(255)<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
ParentId<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Int<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
IsDelete<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Bit</div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
</div>
<div>
Here I didn't take any position to place the member under an admin. All the users are under one roof. And they are distinguished by <b>UserId</b> & <b>Email</b> and described as a child of a Parent with <b>ParentId</b>.<br />
<br />
Design of the database is quite simple and straight forward. I hope you will understand it clearly.<br />
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- techcseblog_sidebar-right-1_AdSense1_728x90_as -->
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-6159992269699002" data-ad-slot="9858000153" style="display: inline-block; height: 90px; width: 728px;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script><br />
<b><u>Query to fetch:</u></b><br />
<br />
Now we have to write the SQL query to fetch the data along with the parent details. The most easiest and simplest way is to use Self Join. To know Self join more precicely you can follow either <a href="http://www.w3resource.com/sql/joins/perform-a-self-join.php" target="_blank">w3resource.com</a> or <a href="http://www.w3schools.com/sql/sql_join.asp" target="_blank">w3schools.com</a>. Both have explained it very well. Now lets come to our query.<br />
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">select</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> a<span style="color: grey;">.</span>UserId<span style="color: grey;">,</span> a<span style="color: grey;">.</span>Name<span style="color: grey;">,</span> a<span style="color: grey;">.</span>Email<span style="color: grey;">,</span> b<span style="color: grey;">.</span>UserId<span style="color: grey;">,</span> b<span style="color: grey;">.</span>Name<span style="color: grey;">,</span> b<span style="color: grey;">.</span>Email <span style="color: blue;">from</span> tblUser a
<span style="color: grey;">inner</span> <span style="color: grey;">join</span>
tblUser b <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;">on</span><span style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;"> a<span style="color: grey;">.</span>ParentId <span style="color: grey;">=</span>
b<span style="color: grey;">.</span>UserID</span><o:p></o:p></div>
</div>
<br />
This query will return the all users with their and their parents details.<br />
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">select</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> a<span style="color: grey;">.</span>UserId<span style="color: grey;">,</span> a<span style="color: grey;">.</span>Name<span style="color: grey;">,</span> a<span style="color: grey;">.</span>Email<span style="color: grey;">,</span> b<span style="color: grey;">.</span>UserId<span style="color: grey;">,</span> b<span style="color: grey;">.</span>Name<span style="color: grey;">,</span> b<span style="color: grey;">.</span>Email <span style="color: blue;">from</span> tblUser a
<span style="color: grey;">inner</span> <span style="color: grey;">join</span>
tblUser b <o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;">on</span><span style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;"> a<span style="color: grey;">.</span>ParentId <span style="color: grey;">=</span>
b<span style="color: grey;">.</span>UserID <span style="color: grey;">and</span> a<span style="color: grey;">.</span>UserId <span style="color: grey;">=</span> <span style="color: red;">'<user_id>'</span></span><o:p></o:p></div>
</div>
<br />
With the help of this query you can get a single user's details with his/her parents details.<br />
<br />
Now you have to find out the possible children and possible parents of a selected node. For this follow the bellow SQL query.<br />
<br />
<b>Query to find all possible parents</b><br />
<b><br /></b>
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">DECLARE</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> @UserId <span style="color: blue;">INT</span><span style="color: grey;">;<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">SET</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> @UserId <span style="color: grey;">=</span> 4<span style="color: grey;">;<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">WITH</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> tblParent <span style="color: blue;">AS<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: grey; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">(<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">SELECT</span> <span style="color: grey;">*<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">FROM</span>
tblUser <span style="color: blue;">WHERE</span> UserId <span style="color: grey;">=</span>
@UserId<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">UNION</span> <span style="color: grey;">ALL<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">SELECT</span>
tblUser<span style="color: grey;">.*<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">FROM</span>
tblUser <span style="color: grey;">JOIN</span>
tblParent <span style="color: blue;">ON</span>
tblUser<span style="color: grey;">.</span>UserId <span style="color: grey;">=</span>
tblParent<span style="color: grey;">.</span>ParentId<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: grey; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">SELECT</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: grey;">*</span> <span style="color: blue;">FROM</span> tblParent<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">WHERE</span>
UserId <span style="color: grey;"><></span> @UserId<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;">OPTION</span><span style="color: grey; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;">(</span><span style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;">MAXRECURSION 32767<span style="color: grey;">)</span></span><o:p></o:p></div>
</div>
<br />
<b>Query to find all possible children</b><br />
<b><br /></b>
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">DECLARE</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> @userId <span style="color: blue;">INT</span><span style="color: grey;">;<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">SET</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> @userId <span style="color: grey;">=</span> 1<span style="color: grey;">;<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">WITH</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> tblChild <span style="color: blue;">AS<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: grey; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">(<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">SELECT</span> <span style="color: grey;">*<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">FROM</span>
tblUser <span style="color: blue;">WHERE</span> ParentId <span style="color: grey;">=</span>
@userId<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">UNION</span> <span style="color: grey;">ALL<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">SELECT</span>
tblUser<span style="color: grey;">.*</span> <span style="color: blue;">FROM</span>
tblUser <span style="color: grey;">JOIN</span>
tblChild <span style="color: blue;">ON</span>
tblUser<span style="color: grey;">.</span>ParentId <span style="color: grey;">=</span>
tblChild<span style="color: grey;">.</span>UserId<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: grey; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">SELECT</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: grey;">*<o:p></o:p></span></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">FROM</span>
tblChild<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;">OPTION</span><span style="color: grey; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;">(</span><span style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;">MAXRECURSION 32767<span style="color: grey;">)</span></span><o:p></o:p></div>
</div>
<br />
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- techcseblog_sidebar-right-1_AdSense1_728x90_as -->
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-6159992269699002" data-ad-slot="9858000153" style="display: inline-block; height: 90px; width: 728px;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script><br />
<b><u>View Team:</u></b><br />
<b><u><br /></u></b>
You have done your database, you have shown the details of user and their parents information in a tabular format. Now its time for some graphics. We will produce a genealogy or family view of the whole team, or you can set the admin from a particular user (can be set by sql query).<br />
<br />
There are whole lots of process to generate a genealogy view. Here I choose two of the easiest way to generate.<br />
<ol style="text-align: left;">
<li>Using Google <span style="background-color: white; color: #333333; font-family: inherit; letter-spacing: -0.01em; line-height: 1.3;">Organizational Chart</span></li>
<li><span style="background-color: white; color: #333333; font-family: inherit; letter-spacing: -0.01em; line-height: 1.3;"><span style="color: black; letter-spacing: normal; line-height: normal;">Using </span><b style="color: black; letter-spacing: normal; line-height: normal;">ul</b><span style="color: black; letter-spacing: normal; line-height: normal;">, </span><b style="color: black; letter-spacing: normal; line-height: normal;">li</b><span style="color: black; letter-spacing: normal; line-height: normal;"> and <b>CSS3</b></span></span></li>
</ol>
<div>
<b><u>Google <span style="background-color: white; color: #333333; font-family: inherit; letter-spacing: -0.01em; line-height: 1.3;">Organizational Chart:</span></u></b></div>
<div>
<b><span style="background-color: white; color: #333333; font-family: inherit; letter-spacing: -0.01em; line-height: 1.3;"><br /></span></b></div>
<div>
<span style="background-color: white; color: #333333; font-family: inherit; letter-spacing: -0.01em; line-height: 1.3;">You can get the full details of Google Organizational chart from <a href="https://developers.google.com/chart/interactive/docs/gallery/orgchart?csw=1" target="_blank">here</a>. But here I will show you how to connect this with your SQL database. For this you don't need to do much more thing. You just have to create the string which will contain the user data along with their parents' id or name.</span></div>
<div>
<span style="background-color: white; color: #333333; font-family: inherit; letter-spacing: -0.01em; line-height: 1.3;">Just have a look over the line</span></div>
<div>
<span style="background-color: white; color: #333333; font-family: inherit; letter-spacing: -0.01em; line-height: 1.3;"><br /></span></div>
<div>
<span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;">data.addRows([[</span><span style="background-color: white; box-sizing: border-box; color: #a31515; font-family: Consolas; font-size: 9.5pt;">'Mike'</span><span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;">,</span><span style="background-color: white; box-sizing: border-box; color: #a31515; font-family: Consolas; font-size: 9.5pt;">''</span><span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;">], [</span><span style="background-color: white; box-sizing: border-box; color: #a31515; font-family: Consolas; font-size: 9.5pt;">'Jim'</span><span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;">, </span><span style="background-color: white; box-sizing: border-box; color: #a31515; font-family: Consolas; font-size: 9.5pt;">'Mike'</span><span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;">], [</span><span style="background-color: white; box-sizing: border-box; color: #a31515; font-family: Consolas; font-size: 9.5pt;">'Alice'</span><span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;">, </span><span style="background-color: white; box-sizing: border-box; color: #a31515; font-family: Consolas; font-size: 9.5pt;">'Mike'</span><span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;">],[</span><span style="background-color: white; box-sizing: border-box; color: #a31515; font-family: Consolas; font-size: 9.5pt;">'Bob'</span><span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;">,</span><span style="background-color: white; box-sizing: border-box; color: #a31515; font-family: Consolas; font-size: 9.5pt;">'Jim'</span><span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;">],[</span><span style="background-color: white; box-sizing: border-box; color: #a31515; font-family: Consolas; font-size: 9.5pt;">'Carol'</span><span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;">, </span><span style="background-color: white; box-sizing: border-box; color: #a31515; font-family: Consolas; font-size: 9.5pt;">'Jim'</span><span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;">]]);</span></div>
<div>
<span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;"><br /></span></div>
<div>
<span style="background-color: white; box-sizing: border-box; color: #222222; font-family: inherit;">It contains the whole of the operation, it is holding the data. You have to create this data string to generate your parent child view. I am taking a DataTable to store the data. You will use the upper sql query to do so.</span></div>
<div>
<span style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas; font-size: 9.5pt;"><br /></span></div>
<br />
<div style="background: white; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">string</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"> s
= </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">""</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">;</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">DataTable</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"> table
= </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">new</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">DataTable</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">();</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">table.Columns.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"name"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">typeof</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">string</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">));</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">table.Columns.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"parent"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">, </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">typeof</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">string</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">));</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">table.Rows.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"Mike"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">""</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">);</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">table.Rows.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"Jim"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"Mike"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">);</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">table.Rows.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"Alice"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"Mike"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">);</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">table.Rows.Add(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"Carol"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"Jim"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">);</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">for</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"> (</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">int</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"> i = 0; i < table.Rows.Count; i++)</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">{</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"> s = s + </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"['"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">+table.Rows[i][0].ToString()+</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"','"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">+table.Rows[i][1].ToString()+</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">"'],"</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">;</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">}</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">s = s.TrimEnd(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">','</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";">);</span><span style="color: #222222; font-family: "Times New Roman","serif"; font-size: 15.0pt; line-height: 150%; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
</div>
<div>
<span style="background-color: white; box-sizing: border-box;">
</span><br />
<div class="MsoNormal" style="color: #222222; font-family: Consolas; font-size: 9.5pt;">
<span style="background-color: white; box-sizing: border-box;"><br /></span></div>
<span style="background-color: white; box-sizing: border-box;">
</span>
<br />
<div class="MsoNormal" style="color: #222222;">
<span style="background-color: white; box-sizing: border-box;"><o:p><span style="font-family: inherit;">Now in the <b>s</b> string you have all the data stored. Only passing the data stream to JS is left. To do follow the next step.</span></o:p></span></div>
<span style="background-color: white; box-sizing: border-box;">
</span>
<br />
<div class="MsoNormal" style="color: #222222; font-family: Consolas; font-size: 9.5pt;">
<span style="background-color: white; box-sizing: border-box;"><o:p><br /></o:p></span></div>
<span style="background-color: white; box-sizing: border-box;">
</span>
<br />
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1pt solid windowtext; color: #222222; font-family: Consolas; font-size: 9.5pt; padding: 1pt 4pt;">
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="color: #2b91af; font-size: 9.5pt; line-height: 150%;">String</span><span style="font-size: 9.5pt; line-height: 150%;"> csname1
= </span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"PopupScript"</span><span style="font-size: 9.5pt; line-height: 150%;">;</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="color: #2b91af; font-size: 9.5pt; line-height: 150%;">Type</span><span style="font-size: 9.5pt; line-height: 150%;"> cstype
= </span><span style="color: blue; font-size: 9.5pt; line-height: 150%;">this</span><span style="font-size: 9.5pt; line-height: 150%;">.GetType();</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="color: #2b91af; font-size: 9.5pt; line-height: 150%;">ClientScriptManager</span><span style="font-size: 9.5pt; line-height: 150%;"> cs = Page.ClientScript;</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="color: blue; font-size: 9.5pt; line-height: 150%;">if</span><span style="font-size: 9.5pt; line-height: 150%;"> (!cs.IsStartupScriptRegistered(cstype,
csname1))</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;">{</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> </span><span style="color: #2b91af; font-size: 9.5pt; line-height: 150%;">StringBuilder</span><span style="font-size: 9.5pt; line-height: 150%;"> cstext1
= </span><span style="color: blue; font-size: 9.5pt; line-height: 150%;">new</span><span style="font-size: 9.5pt; line-height: 150%;"> </span><span style="color: #2b91af; font-size: 9.5pt; line-height: 150%;">StringBuilder</span><span style="font-size: 9.5pt; line-height: 150%;">();</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> cstext1.Append(</span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"<script>"</span><span style="font-size: 9.5pt; line-height: 150%;">);</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> cstext1.Append(</span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"google.setOnLoadCallback(drawChart);"</span><span style="font-size: 9.5pt; line-height: 150%;">);</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> cstext1.Append(</span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"function drawChart() {"</span><span style="font-size: 9.5pt; line-height: 150%;">);</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> cstext1.Append(</span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"var data = new
google.visualization.DataTable();"</span><span style="font-size: 9.5pt; line-height: 150%;">);</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> cstext1.Append(</span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"data.addColumn('string', 'Name');
data.addColumn('string', 'Manager');"</span><span style="font-size: 9.5pt; line-height: 150%;">);</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> cstext1.Append(</span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"data.addRows(["</span><span style="font-size: 9.5pt; line-height: 150%;">+s+</span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"]);"</span><span style="font-size: 9.5pt; line-height: 150%;">);</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> cstext1.Append(</span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));"</span><span style="font-size: 9.5pt; line-height: 150%;">);</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> cstext1.Append(</span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"chart.draw(data, { allowHtml: true
});"</span><span style="font-size: 9.5pt; line-height: 150%;">);</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> cstext1.Append(</span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"}"</span><span style="font-size: 9.5pt; line-height: 150%;">);</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> cstext1.Append(</span><span style="color: #a31515; font-size: 9.5pt; line-height: 150%;">"</script>"</span><span style="font-size: 9.5pt; line-height: 150%;">);</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> cs.RegisterStartupScript(cstype,
csname1, cstext1.ToString());</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-size: 9.5pt; line-height: 150%;"> }</span><span style="font-family: 'Times New Roman', serif; font-size: 15pt; line-height: 150%;"><o:p></o:p></span></span></div>
</div>
<span style="background-color: white; box-sizing: border-box;">
</span>
<br />
<div class="MsoNormal" style="color: #222222; font-family: Consolas; font-size: 9.5pt;">
<span style="background-color: white; box-sizing: border-box;"><o:p>
</o:p></span></div>
<span style="background-color: white; box-sizing: border-box;">
</span>
<br />
<div class="MsoNormal" style="color: #222222; font-family: Consolas; font-size: 9.5pt; line-height: 150%;">
<span style="background-color: white; box-sizing: border-box;"><br /></span></div>
<span style="background-color: white; box-sizing: border-box;">
</span>
<br />
<div class="MsoNormal" style="line-height: 150%;">
<span style="background-color: white; box-sizing: border-box;"><span style="color: #222222; font-family: inherit;">Here I am using</span><span style="color: #222222; font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 12.6666669845581px;">ClientScriptManager </span><span style="font-family: inherit;">to run the created JS code from back end(C# code). Run the code and see the result. </span></span></div>
<span style="background-color: white; box-sizing: border-box;">
</span>
<br />
<div class="MsoNormal" style="color: #222222; line-height: 150%;">
<span style="background-color: white; box-sizing: border-box;"><span style="color: black; line-height: normal;"><span style="font-family: inherit;"><br /></span></span></span></div>
<span style="background-color: white; box-sizing: border-box;">
</span>
<div class="MsoNormal" style="color: #222222; line-height: 150%;">
<span style="background-color: white; box-sizing: border-box;"><span style="font-family: inherit;"><b><u><span style="color: black; line-height: normal;">Using </span><span style="color: black; line-height: normal;">ul</span><span style="color: black; line-height: normal;">, </span><span style="color: black; line-height: normal;">li</span><span style="color: black; line-height: normal;"> and CSS3:</span></u></b></span></span></div>
<span style="background-color: white; box-sizing: border-box;">
<div class="MsoNormal" style="color: #222222; line-height: 150%;">
<span style="font-family: inherit;"><span style="color: black; line-height: normal;"><br /></span></span></div>
<div class="MsoNormal">
We have seen how to do this with he help of Google Organizational Chart. Now its time for a pure HTML, CSS work to do. For that We need to generate the HTML. Follow the bellow code to generate the HTML quickly.<br />
<u><br /></u>
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DataView</span><span style="font-family: Consolas; font-size: 9.5pt;"> view = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DataView</span><span style="font-family: Consolas; font-size: 9.5pt;">(table);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DataTable</span><span style="font-family: Consolas; font-size: 9.5pt;"> distinctValues =
view.ToTable(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">true</span><span style="font-family: Consolas; font-size: 9.5pt;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"parentid"</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">tree += </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"<div
class='tree'><ul><li style='background-color:
white;'>Relegare(Admin)[rel]</li></ul></div>"</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<br /></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">for</span><span style="font-family: Consolas; font-size: 9.5pt;"> (</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">int</span><span style="font-family: Consolas; font-size: 9.5pt;"> i = 1; i < distinctValues.Rows.Count;i++ )<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">SqlDataAdapter</span><span style="font-family: Consolas; font-size: 9.5pt;"> da2 = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">SqlDataAdapter</span><span style="font-family: Consolas; font-size: 9.5pt;">(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"select
userid,fname+' '+lname from tbl_userlogin where parentid='"</span><span style="font-family: Consolas; font-size: 9.5pt;"> +
distinctValues.Rows[i][</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"parentid"</span><span style="font-family: Consolas; font-size: 9.5pt;">] + </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"'"</span><span style="font-family: Consolas; font-size: 9.5pt;">,con);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DataTable</span><span style="font-family: Consolas; font-size: 9.5pt;"> dt2 = </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt;">DataTable</span><span style="font-family: Consolas; font-size: 9.5pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> da2.Fill(dt2);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">string</span><span style="font-family: Consolas; font-size: 9.5pt;"> temp = </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">""</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">for</span><span style="font-family: Consolas; font-size: 9.5pt;">(</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">int</span><span style="font-family: Consolas; font-size: 9.5pt;"> j =0;j<dt2.Rows.Count;j++)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">if</span><span style="font-family: Consolas; font-size: 9.5pt;"> (j == 0)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> temp += </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"<ul>"</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> temp += </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"<li>"</span><span style="font-family: Consolas; font-size: 9.5pt;"> +
dt2.Rows[j][1].ToString() + </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">" ["</span><span style="font-family: Consolas; font-size: 9.5pt;"> + dt2.Rows[j][0].ToString() + </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"]</li>"</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">if</span><span style="font-family: Consolas; font-size: 9.5pt;"> (j == dt2.Rows.Count-1)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> temp
+= </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"</ul>"</span><span style="font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">if</span><span style="font-family: Consolas; font-size: 9.5pt;"> (i == 1)<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> tree = tree.Replace(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"[rel]"</span><span style="font-family: Consolas; font-size: 9.5pt;">, temp);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> </span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">else</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> tree = tree.Replace(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"["</span><span style="font-family: Consolas; font-size: 9.5pt;">+distinctValues.Rows[i][0].ToString()
+ </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"]"</span><span style="font-family: Consolas; font-size: 9.5pt;">, temp);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; margin-bottom: 0.0001pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt;">tree = tree.Replace(</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">"[]"</span><span style="font-family: Consolas; font-size: 9.5pt;">,</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt;">""</span><span style="font-family: Consolas; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">tree = </span><span style="color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">Regex</span><span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">.Replace(tree,
</span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">@"\[(.*?)\]"</span><span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">, </span><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">""</span><span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">);</span><o:p></o:p></div>
</div>
</div>
<div class="MsoNormal" style="color: #222222; line-height: 150%;">
<span style="font-family: inherit;"><b><span style="color: black; line-height: normal;"><u><br /></u></span></b></span></div>
<div class="MsoNormal">
For CSS follow the jsfiddle online demo.<br />
<br />
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="300" src="//jsfiddle.net/zt15p044/3/embedded/" width="100%"></iframe><br />
<div style="color: #222222; line-height: 150%;">
<br /></div>
</div>
</span></div>
Run your own project to check the team management, though I didn't mention the add or edit/delete part of the team management. In next article I will discuss about the manage roles and permissions of users from their admin end. Enjoy coding.<br />
<br />
Download the <span style="background-color: white;"><span style="line-height: 24px;">Download the full source code of Google Organizational chart </span></span><a href="https://app.box.com/s/p6tx48si44j3dtfujd0579aaxhcljvns" style="background-color: white; line-height: 24px;" target="_blank">here</a><span style="background-color: white; line-height: 24px;">.</span></div>
<a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=9261026" rel="tag" style="display: none;">CodeProject</a>
</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com0tag:blogger.com,1999:blog-331704360604939704.post-65066655069133739702015-05-21T01:33:00.002+05:302015-05-21T01:34:40.341+05:30Find all the input in a particular cell of a HTML table<div dir="ltr" style="text-align: left;" trbidi="on">
Here in this post I will show you how to fetch all the input data of a particular cell of a HTML table using JQuery. What ever the input we are taking in HTML (text, radio, password, checkbox etc.)<br />
<br />
Follow the following JSFiddle to get the value of all input tag value in a particular cell.<br />
<br />
How it s happening ?<br />
For each tr and every td of that tr, we are searching for the input tag. And where we are getting an input tag we are taking the value of that element. We have taken value as we are moving on text boxes only. If your code is based on checkbox, radio button or any thing else, then you have to code according to that.<br />
<br />
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="300" src="//jsfiddle.net/arkadeepde/tb9dg4vb/3/embedded/" width="100%"></iframe><br />
<br />
I have taken here <b>tr:eq(1) td:eq(1)</b> for the only 2nd cell of 2nd tr (searching starts with 0). If you want to search through over all table then use <b> </b><b>tr td</b> only.<br />
<br />
Customize your code and enjoy...</div>
Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com0tag:blogger.com,1999:blog-331704360604939704.post-73533243308306932372015-04-26T22:39:00.001+05:302015-10-16T22:49:49.409+05:30Prevent Enter Click on Text Box using Java Script<div dir="ltr" style="text-align: left;" trbidi="on">
When ever in your html if you click Enter key on a text box after typing your text the very next submit button is being hit automatically. Now not every time it causes problems but few times it creates an serious issue to the application.<br />
So how to prevent this issue? With java script we can handle this very easily. Lets see how to do so?<br />
<br />
Into a notepad document write down this line.<br />
<br />
<div style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; padding: 0in;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%;"><</span><span style="color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">input</span><span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">type</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">='text'</span><span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;"> </span><span style="color: red; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">onkeydown</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">="return
(event.keyCode!=13);"/></span><o:p></o:p></div>
</div>
<br />
<span style="color: red; font-family: Consolas; font-size: 9.5pt; line-height: 14.5666675567627px;">onkeydown</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 14.5666675567627px;">="return (event.keyCode!=13);" </span><br />
<span style="line-height: 14.5666675567627px;"><span style="font-family: inherit;"><br /></span></span>
<span style="line-height: 14.5666675567627px;"><span style="font-family: inherit;">This is the main code to prevent the Enter press within the textbox. </span></span><br />
<span style="line-height: 14.5666675567627px;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-family: inherit;"><span style="line-height: 14.5666675567627px;"><i>Note: ASCII key of ENTER is 13.</i></span></span><br />
<span style="font-family: inherit;"><span style="line-height: 14.5666675567627px;"><br /></span></span>
<span style="font-family: inherit;"><span style="line-height: 14.5666675567627px;">Now save your document, run it in browser and check.</span></span><br />
<span style="font-family: inherit;"><span style="line-height: 14.5666675567627px;"><br /></span></span>
<span style="line-height: 14.5666675567627px;"><b>On line demo:</b></span><br />
<span style="line-height: 14.5666675567627px;"><br /></span>
<span style="line-height: 14.5666675567627px;">
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="300" src="//jsfiddle.net/arkadeepde/f892wjjh/3/embedded/" width="100%"></iframe>
</span><br />
<a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=9261026" rel="tag" style="display: none;">CodeProject</a>
<br /></div>Arkahttp://www.blogger.com/profile/09369698288471437978noreply@blogger.com0