<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7004123387151996883</id><updated>2024-10-08T18:44:03.716-07:00</updated><category term="Android"/><category term="Android - Http Client get /post  method"/><category term="Android localhost HttpClient Connection Refused"/><category term="Checking and unchecking"/><category term="Hello world"/><category term="jQuery Checkboxes"/><category term="json"/><category term="php"/><category term="syntax Editor"/><category term="xml"/><title type='text'>Web  &amp;amp; Software Techniques and Tips</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>233</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-9180539350883830942</id><published>2021-03-17T03:52:00.000-07:00</published><updated>2021-03-17T03:52:24.793-07:00</updated><title type='text'>No creatable public component detected</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Error :&amp;nbsp; &quot;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;b&gt;No creatable public component detected&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QsCPzIxp1bj_JrnWjPEgOK0bKaIDGDPdvj7k36PP22f43yCKmhDJX7KzERID38wTRSXr5bOMzKCxyw-AkvzQn9kVlK4HTkhTdZMv3UmUajob9jDBWDnxZ24UsVm1g6yspsxYBxNPL8SA/s307/VB.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;147&quot; data-original-width=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QsCPzIxp1bj_JrnWjPEgOK0bKaIDGDPdvj7k36PP22f43yCKmhDJX7KzERID38wTRSXr5bOMzKCxyw-AkvzQn9kVlK4HTkhTdZMv3UmUajob9jDBWDnxZ24UsVm1g6yspsxYBxNPL8SA/s0/VB.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;When trying to recompile a ActiveX.dll in VB6, I get the Message &quot;No Creatable Public Component Detected&lt;/span&gt;&amp;nbsp;There was no error in code .&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Solution:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;span style=&quot;color: #192527;&quot;&gt;In the ActiveX DLL projects you need to have at least 1 class module with&lt;/span&gt;&lt;br style=&quot;color: #192527;&quot; /&gt;&lt;span style=&quot;color: #192527;&quot;&gt;the Instancing property set to MultiUse or GlobalMultiuse. Open up each&lt;/span&gt;&lt;br style=&quot;color: #192527;&quot; /&gt;&lt;span style=&quot;color: #192527;&quot;&gt;class module in the IDE and check the properties window&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;span style=&quot;color: #192527;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Just change the instancing to Multiuse or GlobalMultiuse&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;Arial, Tahoma, Helvetica, FreeSans, sans-serif&quot; style=&quot;background-color: white; color: #222222;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;Arial, Tahoma, Helvetica, FreeSans, sans-serif&quot; style=&quot;background-color: white; color: #222222; font-size: 13.2px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdM3qoypz2fTKiT5CR3EYlNNEQOfwousHyay2dWhWNTDK28JNUDIOmOMzJMj0mhZkkpdHHF-zFYm4hFZoXykWKSnXxuq0rFOQrYia6ebovm4MGiZ_DowvJf53r5NFGv1yD4-p3NqH2KUvZ/s191/2.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;123&quot; data-original-width=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdM3qoypz2fTKiT5CR3EYlNNEQOfwousHyay2dWhWNTDK28JNUDIOmOMzJMj0mhZkkpdHHF-zFYm4hFZoXykWKSnXxuq0rFOQrYia6ebovm4MGiZ_DowvJf53r5NFGv1yD4-p3NqH2KUvZ/s0/2.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/9180539350883830942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/9180539350883830942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/9180539350883830942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/9180539350883830942'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2021/03/no-creatable-public-component-detected.html' title='No creatable public component detected'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QsCPzIxp1bj_JrnWjPEgOK0bKaIDGDPdvj7k36PP22f43yCKmhDJX7KzERID38wTRSXr5bOMzKCxyw-AkvzQn9kVlK4HTkhTdZMv3UmUajob9jDBWDnxZ24UsVm1g6yspsxYBxNPL8SA/s72-c/VB.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-9199633692028712503</id><published>2021-03-17T03:07:00.002-07:00</published><updated>2021-03-17T03:07:23.144-07:00</updated><title type='text'>Add an XML Sitemap to your Blogger Blog</title><content type='html'>&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: white; color: #444444; font-size: 12pt;&quot;&gt;The XML Sitemap file is like a directory of all web pages that exist on
your website or blog. Google, Bing and other search engines can use these
sitemap files to discover pages on your site that their search bots may have
otherwise missed during regular crawling.&lt;/span&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-outline-level: 3;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #333333; font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;The
Problem with Blogger Sitemap Files&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-outline-level: 3;&quot;&gt;&lt;span style=&quot;color: #333333; font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-font-weight: bold; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;A complete
XML sitemap file should mention all pages of a site but that’s not the case if
your blog is hosted on the Blogger or blogspot platform.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Google accepts sitemaps in XML, RSS,
or Atom formats. They&amp;nbsp;&lt;a href=&quot;https://webmasters.googleblog.com/2014/10/best-practices-for-xml-sitemaps-rssatom.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #81439c;&quot;&gt;recommend&lt;/span&gt;&lt;/a&gt;&amp;nbsp;use both
XML sitemaps and RSS/Atom feeds for optimal crawling.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;The default atom RSS feed of any
Blogger blog will have only the most recent blog posts –&amp;nbsp;&lt;a href=&quot;http://googleblog.blogspot.com/atom.xml?redirect=false&quot; target=&quot;_blank&quot; title=&quot;XML Sitemap for Google Blog&quot;&gt;&lt;span style=&quot;color: #81439c;&quot;&gt;see example&lt;/span&gt;&lt;/a&gt;.
That’s a limitation because some of your older blog pages, that are missing in
the default XML sitemap file, may never get indexed in search engines. There’s
however a simple solution to fix this problem.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-outline-level: 3;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #333333; font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Generate
XML Sitemap for your Blogger Blog&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;This section is valid for both
regular Blogger blogs (that have a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: #FBF2E9; border: none windowtext 1.0pt; color: #36313d; font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-border-alt: none windowtext 0cm; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; padding: 0cm;&quot;&gt;blogspot.com&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&amp;nbsp;address) and also the
self-hosted Blogger blogs that use a custom domain (like postsecret.com).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Here’s what you need to do to expose
your blog’s complete site structure to search engines with the help of an XML
sitemap.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;
 &lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; color: #444444; line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Open the&amp;nbsp;&lt;a href=&quot;https://www.labnol.org/blogger/sitemap&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #81439c;&quot;&gt;Sitemap
     Generator&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&amp;nbsp;and type the full address of your Blogger
     blog.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
 &lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; color: #444444; line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Click the Generate Sitemap button and this
     tool will instantly create the XML file with your sitemap. Copy the entire
     text to your clipboard.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
 &lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; color: #444444; line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Next, go to your Blogger.com dashboard,
     navigate to Settings –&amp;gt; Search Preferences, enable Custom robots.txt
     option (available in the Crawling and Indexing section). Paste the XML
     sitemap here and save your changes. And we are done. Search engines will
     automatically discover your XML sitemap files via the robots.txt file and
     you don’t have to ping them manually.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; color: #444444; line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiri6LhNkM1wqjLyKiz9dHKpdYqF4edKuz4ZL6cb7gP5Rmi2W8EYqyP1MntaetszkMXJcmJ5K_Tzi-wHOaSWEoAmInC_HJM9QcZRPB1YxyH2C9HewcwWggTHe29RmxAZP_QlvX90yV4EXB4/s988/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;616&quot; data-original-width=&quot;988&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiri6LhNkM1wqjLyKiz9dHKpdYqF4edKuz4ZL6cb7gP5Rmi2W8EYqyP1MntaetszkMXJcmJ5K_Tzi-wHOaSWEoAmInC_HJM9QcZRPB1YxyH2C9HewcwWggTHe29RmxAZP_QlvX90yV4EXB4/w400-h250/Capture.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;color: #444444; font-family: times;&quot;&gt;Internally, the XML sitemap generator counts all the blog posts that are available in your Blogger blog. It then splits the posts in batches of 500 posts each and generates multiple XML feed for each batch. Thus search engines will be able to discover every single post on your blog since it would be part of one of these XML sitemaps.&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #444444; font-family: &amp;quot;Source Sans Pro&amp;quot;, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen, Ubuntu, Cantarell, &amp;quot;Fira Sans&amp;quot;, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 18px; margin: 0px 0px 3.6rem;&quot;&gt;&lt;span class=&quot;gatsby-resp-image-wrapper&quot; style=&quot;box-sizing: inherit; display: block; margin-left: auto; margin-right: auto; max-width: 720px; position: relative;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #444444; font-family: &amp;quot;Source Sans Pro&amp;quot;, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen, Ubuntu, Cantarell, &amp;quot;Fira Sans&amp;quot;, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 18px; margin: 0px 0px 3.6rem;&quot;&gt;&lt;span class=&quot;gatsby-resp-image-wrapper&quot; style=&quot;box-sizing: inherit; display: block; margin-left: auto; margin-right: auto; max-width: 500px; position: relative;&quot;&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/9199633692028712503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/9199633692028712503' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/9199633692028712503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/9199633692028712503'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2021/03/add-xml-sitemap-to-your-blogger-blog.html' title='Add an XML Sitemap to your Blogger Blog'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiri6LhNkM1wqjLyKiz9dHKpdYqF4edKuz4ZL6cb7gP5Rmi2W8EYqyP1MntaetszkMXJcmJ5K_Tzi-wHOaSWEoAmInC_HJM9QcZRPB1YxyH2C9HewcwWggTHe29RmxAZP_QlvX90yV4EXB4/s72-w400-h250-c/Capture.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-28975913614553803</id><published>2021-03-16T04:00:00.001-07:00</published><updated>2021-03-16T04:00:48.001-07:00</updated><title type='text'>Install and uninstall Windows services using InstallUtil.exe utility</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #171717;&quot;&gt;&lt;b&gt;Install using InstallUtil.exe utility&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ol style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 16px 0px 16px 38px; outline-color: inherit; padding: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none decimal; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;From the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; outline-color: inherit;&quot;&gt;Start&lt;/span&gt;&amp;nbsp;menu, select the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; outline-color: inherit;&quot;&gt;Visual Studio &amp;lt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;version&lt;/em&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;directory, then select&amp;nbsp;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; outline-color: inherit;&quot;&gt;Developer Command Prompt for VS &amp;lt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;version&lt;/em&gt;&amp;gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;The Developer Command Prompt for Visual Studio appears.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none decimal; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;Access the directory where your project&#39;s compiled executable file is located.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none decimal; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;Run&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;InstallUtil.exe&lt;/em&gt;&amp;nbsp;from the command prompt with your project&#39;s executable as a parameter:&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; color: #171717;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #171717;&quot;&gt;installutil &amp;lt;yourproject&amp;gt;.exe&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;color: #171717; font-family: verdana; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;&amp;nbsp;you’re using the Developer Command Prompt for Visual Studio,&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;InstallUtil.exe&lt;/em&gt;&amp;nbsp;should be on the system path. Otherwise, you can add it to the path, or use the fully qualified path to invoke it. This tool is installed with the .NET Framework in&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;%WINDIR%\Microsoft.NET\Framework[64]\&amp;lt;framework_version&amp;gt;&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;For example:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: inherit; color: #171717; list-style: none; margin: 16px 0px 16px 38px; outline-color: inherit; padding: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;For the 32-bit version of the .NET Framework 4 or 4.5 and later, if your Windows installation directory is&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;C:\Windows&lt;/em&gt;, the default path is&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe&lt;/em&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;For the 64-bit version of the .NET Framework 4 or 4.5 and later, the default path is&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe&lt;/em&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;h2 class=&quot;heading-anchor&quot; id=&quot;uninstall-using-installutilexe-utility&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; line-height: 1.3; margin: 32px 0px 12px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;Uninstall using InstallUtil.exe utility&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-left: 28.5pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #171717;&quot;&gt;From the&amp;nbsp;&lt;b&gt;Start&lt;/b&gt;&amp;nbsp;menu,
select the&amp;nbsp;&lt;b&gt;Visual Studio &amp;lt;&lt;i&gt;version&lt;/i&gt;&amp;gt;&lt;/b&gt;&amp;nbsp;directory,
then select&amp;nbsp;&lt;b&gt;Developer Command Prompt for VS &amp;lt;&lt;i&gt;version&lt;/i&gt;&amp;gt;&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-left: 28.5pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;The Developer Command Prompt for
Visual Studio appears.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-left: 28.5pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #171717;&quot;&gt;Run&amp;nbsp;&lt;i&gt;InstallUtil.exe&lt;/i&gt;&amp;nbsp;from
the command prompt with your project&#39;s output as a parameter: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 28.5pt; margin-right: 0cm; margin-top: 0cm; 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;&quot;&gt;&lt;span style=&quot;border: 1pt none windowtext; color: #171717; padding: 0cm;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;installutil /u &amp;lt;yourproject&amp;gt;.exe&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-left: 28.5pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #171717;&quot;&gt;After the
executable for a service is deleted, the service might still be present in the
registry. If that&#39;s the case, use the command&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;sc delete&lt;/span&gt;&amp;nbsp;to remove the entry for the service
from the registry.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/28975913614553803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/28975913614553803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/28975913614553803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/28975913614553803'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2021/03/install-and-uninstall-windows-services.html' title='Install and uninstall Windows services using InstallUtil.exe utility'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-3834988070957713379</id><published>2021-03-15T04:33:00.000-07:00</published><updated>2021-03-15T04:33:11.086-07:00</updated><title type='text'>Refresh the list of remote branches in Visual Studio Team Explorer Visual Studio 2017/2015/2019 </title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b style=&quot;color: #111111; font-family: verdana;&quot;&gt;Visual Studio 2019&lt;/b&gt;&lt;/p&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;color: #111111; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;color: #111111; font-family: verdana;&quot;&gt;By default the Visual Studio Team Explorer does not refresh the remote branches when you fetch updates from the server. The fix for this is pretty easy, you need to set &quot;Prune remote branches during fetch&quot; to true in the &quot;Git Settings&quot;. You can do this in the global settings or per repository.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;color: #111111; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color: #111111; font-family: verdana;&quot;&gt;Go to Team Explorer settings&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: #111111; font-family: verdana;&quot;&gt;Select either &quot;Global Settings&quot; or &quot;Repository Settings&quot;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: #111111; font-family: verdana;&quot;&gt;Set &quot;Prune remote branches during fetch&quot; to true&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoONDpb6EUBd4rsT20SPhmnLm14C27dwBo-D-JztR4Z9XDHfryWE20bJl0ea9pvifZyIps0PN2pH510PMPC32wSVLOjw0gY2RdL9Z5NOSGi9CYe-OCHXiU5N71sRNd5nc5GlfEwcKVc0fc/s273/prune-setting.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;91&quot; data-original-width=&quot;273&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoONDpb6EUBd4rsT20SPhmnLm14C27dwBo-D-JztR4Z9XDHfryWE20bJl0ea9pvifZyIps0PN2pH510PMPC32wSVLOjw0gY2RdL9Z5NOSGi9CYe-OCHXiU5N71sRNd5nc5GlfEwcKVc0fc/w400-h133/prune-setting.png&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;color: #111111; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #111111;&quot;&gt;Prune remote branches during fetch&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #111111;&quot;&gt;And your done, now the remote branches will be updated every time you fetch or pull.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;color: #111111; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111;&quot;&gt;Visual Studio&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #111111;&quot;&gt;2015/&lt;/span&gt;&lt;span style=&quot;color: #111111;&quot;&gt;2017 - Refresh&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: verdana;&quot;&gt;&lt;b&gt;remotes/origin&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;color: #111111;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; color: #171717;&quot;&gt;Right-click on your local repo and select&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: #171717; font-weight: 600; outline-color: inherit;&quot;&gt;Open Command Prompt&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: #111111; font-family: verdana;&quot;&gt;run&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #5f6368;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;b&gt;git fetch --prune&amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #5f6368;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA0n9x6eUSzgA6fZWyJZxB3pH0T4sDgwRBUY2qSNwapJ6x9u4_e35ecdGglDMIl4NS54qFYISpN_TLwSEjrR7tT6o3xja94xGXd36S04VAWvF29AKTCG3Uz9CZF_XYcD140YCRJqrs_uLt/s368/open_cmd_prompt_repo_vs.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;173&quot; data-original-width=&quot;368&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA0n9x6eUSzgA6fZWyJZxB3pH0T4sDgwRBUY2qSNwapJ6x9u4_e35ecdGglDMIl4NS54qFYISpN_TLwSEjrR7tT6o3xja94xGXd36S04VAWvF29AKTCG3Uz9CZF_XYcD140YCRJqrs_uLt/w400-h188/open_cmd_prompt_repo_vs.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/3834988070957713379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/3834988070957713379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3834988070957713379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3834988070957713379'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2021/03/refresh-list-of-remote-branches-in.html' title='Refresh the list of remote branches in Visual Studio Team Explorer Visual Studio 2017/2015/2019 '/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoONDpb6EUBd4rsT20SPhmnLm14C27dwBo-D-JztR4Z9XDHfryWE20bJl0ea9pvifZyIps0PN2pH510PMPC32wSVLOjw0gY2RdL9Z5NOSGi9CYe-OCHXiU5N71sRNd5nc5GlfEwcKVc0fc/s72-w400-h133-c/prune-setting.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-2028951706380212981</id><published>2021-03-15T04:13:00.002-07:00</published><updated>2021-03-15T04:26:57.495-07:00</updated><title type='text'>Calculate Date and Time Difference Between Two Dates C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span face=&quot;&#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Verdana, Arial, Helvetica, sans-serif, Tahoma&quot; style=&quot;background-color: white; color: #444444; font-family: verdana; font-size: x-small; line-height: 18px;&quot;&gt;A very common requirement is to display the Date and Time difference between two dates.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span face=&quot;&#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Verdana, Arial, Helvetica, sans-serif, Tahoma&quot; style=&quot;background-color: white; color: #444444; font-family: verdana; font-size: x-small; line-height: 18px;&quot;&gt;Let us see how to do it:&lt;/span&gt;&lt;br /&gt;
&lt;span face=&quot;&#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Verdana, Arial, Helvetica, sans-serif, Tahoma&quot; style=&quot;background-color: white; color: #444444; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;strong style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Verdana, Arial, Helvetica, sans-serif, Tahoma; font-size: 13px; line-height: 18px;&quot;&gt;C#&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;public class Program&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;public static void Main()&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp;DateTime date1 =&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp;System.Convert.ToDateTime(&quot;2009-1-01 11:08:22&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp;DateTime date2 =&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp;System.Convert.ToDateTime(&quot;2009-1-02&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp;TimeSpan ts = new TimeSpan();&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp;ts = date2.Subtract(date1);&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp;Console.WriteLine(ts.Days + &quot; Days &quot;&amp;nbsp; + ts.Hours + &quot; Hours &quot; +&amp;nbsp; &amp;nbsp;ts.Seconds + &quot; Seconds &quot;);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;&lt;b&gt;Output&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;&amp;nbsp;0 Days 12 Hours 38 Seconds&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/2028951706380212981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/2028951706380212981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/2028951706380212981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/2028951706380212981'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2013/01/calculate-date-and-time-difference.html' title='Calculate Date and Time Difference Between Two Dates C#'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-4342228070585666371</id><published>2021-03-15T03:46:00.000-07:00</published><updated>2021-03-15T03:46:57.856-07:00</updated><title type='text'>Copy paste not working issue in Remote Desktop (RDP)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;h1 style=&quot;background-color: white; color: #3366aa; line-height: 21px; margin: 3px 3px 3px 1px;&quot;&gt;&lt;br /&gt;&lt;/h1&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: verdana;&quot;&gt;&lt;b&gt;Problem/Issue&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br style=&quot;background-color: white; color: #333333; line-height: 21px;&quot; /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; style=&quot;background-color: white; color: #333333; line-height: 21px;&quot;&gt;The clipboard sharing is handled using a small application running on the remote machine, called &quot;&lt;/span&gt;&lt;strong style=&quot;background-color: white; color: #333333; line-height: 21px;&quot;&gt;RDPCLIP.EXE&lt;/strong&gt;&lt;span face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; style=&quot;background-color: white; color: #333333; line-height: 21px;&quot;&gt;&quot;. If this application fails to do the job, your clipboard sharing will stop working and you will not be able to copy paste text, data or files from local computer to remote server using remote desktop connection.&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; line-height: 21px;&quot; /&gt;&lt;br /&gt;&lt;b&gt;Solution&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; style=&quot;background-color: white; color: #333333; line-height: 21px;&quot;&gt;Here is how you can solve this problem:&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; line-height: 21px;&quot; /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: verdana;&quot;&gt;1. Login to remote computer using Remote Desktop (RDP)&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: verdana;&quot;&gt;2. Open Task Manager in the remote machine&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: verdana;&quot;&gt;3. Click the &quot;Process&quot; tab&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: verdana;&quot;&gt;4. Locate a program called &quot;rdpclip.exe&quot;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: verdana;&quot;&gt;5. Right click and select &quot;End process&quot; to kill this program&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: verdana;&quot;&gt;6. Click on &quot;File&quot; menu in the task manager and select &quot;New Task (Run)&quot;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: verdana;&quot;&gt;7. Type rdpclip.exe and press the button to start the process.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br style=&quot;background-color: white; color: #333333; line-height: 21px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #333333; line-height: 21px;&quot; /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2N6RilF-IOdwaZ7J4sZMhOnLA7Ku9N_XNZ94gLWYR532d-vN0Jq6A3FlGSpCQPgxh6juwuo-Y5sgpk_hdU4qvuNNeQ3JLnhPnIe1QQLVhTOJOLedRwskNY803gi3B99eji5GATuBhp-QU/s527/1234567.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;460&quot; data-original-width=&quot;527&quot; height=&quot;349&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2N6RilF-IOdwaZ7J4sZMhOnLA7Ku9N_XNZ94gLWYR532d-vN0Jq6A3FlGSpCQPgxh6juwuo-Y5sgpk_hdU4qvuNNeQ3JLnhPnIe1QQLVhTOJOLedRwskNY803gi3B99eji5GATuBhp-QU/w400-h349/1234567.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br style=&quot;background-color: white; color: #333333; line-height: 21px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #333333; line-height: 21px;&quot; /&gt;&lt;span face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; style=&quot;background-color: white; color: #333333; line-height: 21px;&quot;&gt;By killing existing instance of the rdpclip.exe and restarting the program, you can get your&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;background-color: white; color: #333333; line-height: 21px;&quot;&gt;copy paste work again in your remote desktop&lt;/i&gt;&lt;span face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; style=&quot;background-color: white; color: #333333; line-height: 21px;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/4342228070585666371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/4342228070585666371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/4342228070585666371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/4342228070585666371'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2013/01/copy-pasting-and-clipboard-not-working.html' title='Copy paste not working issue in Remote Desktop (RDP)'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2N6RilF-IOdwaZ7J4sZMhOnLA7Ku9N_XNZ94gLWYR532d-vN0Jq6A3FlGSpCQPgxh6juwuo-Y5sgpk_hdU4qvuNNeQ3JLnhPnIe1QQLVhTOJOLedRwskNY803gi3B99eji5GATuBhp-QU/s72-w400-h349-c/1234567.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-3194319630152324895</id><published>2021-03-15T03:39:00.001-07:00</published><updated>2021-03-15T04:36:43.370-07:00</updated><title type='text'>Trim last character from a string or each word C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;b&gt;Input:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
I have a string say&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, serif; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Hello&lt;b&gt;!&lt;/b&gt; world&lt;b&gt;!&lt;/b&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;I want to do a trim or a remove to take out the ! off world but not off Hello.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;b&gt;Solution:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, serif; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Hello! world!&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TrimEnd&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;!&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;border: 0px; clear: both; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/3194319630152324895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/3194319630152324895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3194319630152324895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3194319630152324895'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2013/03/trim-last-character-from-string-c.html' title='Trim last character from a string or each word C#'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-2451361227751158455</id><published>2021-03-15T03:38:00.000-07:00</published><updated>2021-03-15T03:38:45.405-07:00</updated><title type='text'>PHP: short_open_tag Not working in php 5.3.1  </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h1 itemprop=&quot;name&quot; style=&quot;background-color: white; border: 0px; line-height: 1.3; margin: 0px 0px 7px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, Liberation Sans, DejaVu Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 23px;&quot;&gt;&amp;lt;? ?&amp;gt; tags not working in php 5.3.1&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;div&gt;
&lt;b&gt;Issue/problem&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
I just installed php 5.3.1 in server and now my old work which I used to write with&amp;nbsp;&amp;lt;? ?&amp;gt;&amp;nbsp; tags is not working at all..&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Solution&lt;/span&gt;:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; text-align: left; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;WAMP Server&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;ol style=&quot;border: 0px; box-sizing: inherit; color: #242729; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; list-style-image: initial; list-style-position: initial; margin-bottom: var(--s-prose-spacing); margin-left: 30px; margin-right: 0px; margin-top: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: var(--s-prose-spacing-condensed); margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;Click on the wampserver tray icon.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: var(--s-prose-spacing-condensed); margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;Go to&amp;nbsp;&lt;strong style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PHP&lt;/strong&gt;. Then&amp;nbsp;&lt;strong style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PHP Settings&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;Click&amp;nbsp;&lt;strong style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;short open tag&lt;/strong&gt;. (When it&#39;s on it will have a checkmark next to it.)&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; clear: both; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;XAMPP&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; clear: both; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: var(--s-prose-spacing); margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;If you are using xampp in windows then please do following&lt;/span&gt;&lt;/p&gt;&lt;ol style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; list-style-image: initial; list-style-position: initial; margin-bottom: var(--s-prose-spacing); margin-left: 30px; margin-right: 0px; margin-top: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: var(--s-prose-spacing-condensed); margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;Open XAMPP control panel.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: var(--s-prose-spacing-condensed); margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;Click on CONFIG button.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;Go to PHP (php.ini) option.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: var(--s-prose-spacing); margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;Find short_open_tag using ctrl+f utility&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: var(--s-prose-spacing); margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;You will found&amp;nbsp;&lt;code style=&quot;background-color: var(--black-075); border-radius: 3px; border: 0px; box-sizing: inherit; color: var(--black-800); font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;short_open_tag&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: var(--s-prose-spacing); margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;kindly remove the semicolon&amp;nbsp;&lt;strong style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(;)&lt;/strong&gt;&amp;nbsp;from line.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: var(--s-prose-spacing); margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;and keep it as&amp;nbsp;&lt;code style=&quot;background-color: var(--black-075); border-radius: 3px; border: 0px; box-sizing: inherit; color: var(--black-800); font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;short_open_tag = on&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;Finally, restart your Apache server&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium;&quot;&gt;&lt;span face=&quot;Arial, Liberation Sans, DejaVu Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 18px;&quot;&gt;If you use wamp or xamp or iis 7 -&amp;gt; php manger , it&#39;s really easy to activate them. Just click on icon-&amp;gt;php server-&amp;gt;setting-&amp;gt;allow short tag open&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/2451361227751158455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/2451361227751158455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/2451361227751158455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/2451361227751158455'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2013/04/tags-not-working-in-php-531.html' title='PHP: short_open_tag Not working in php 5.3.1  '/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-1096035531360538496</id><published>2021-03-15T03:36:00.000-07:00</published><updated>2021-03-15T03:36:44.337-07:00</updated><title type='text'>Remember to set UpdatePanel&#39;s UpdateMode to Conditional</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h2 style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif; text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;UpdateMode property&amp;nbsp;of the UpdatePanel&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt;&lt;div style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif; font-size: small;&quot;&gt;
Since the cool thing about the ASP.NET Ajax&amp;nbsp;UpdatePanel&amp;nbsp;is that its contents are updated asynchronously&amp;nbsp;when an event that would normally generate a postback is raised inside, one would think that this is its default behavior.&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif; font-size: small;&quot;&gt;
But it&#39;s not: the&amp;nbsp;UpdateMode property&amp;nbsp;of the UpdatePanel has 2 possible values:&lt;/div&gt;
&lt;ul style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif; font-size: small;&quot;&gt;
&lt;li&gt;&lt;strong&gt;Always&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Conditional&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif; font-size: small;&quot;&gt;
and the default value is&amp;nbsp;&lt;strong&gt;Always&lt;/strong&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif; font-size: small;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;
When set to&amp;nbsp;&lt;strong&gt;Always&lt;/strong&gt;,&amp;nbsp;the UpdatePanel is updated on every postback raised from anywhere in the page, so from controls inside the panel, inside other panels or just on the page.&lt;/li&gt;&lt;li&gt;
When set to&amp;nbsp;&lt;strong&gt;Conditional&lt;/strong&gt;, the UpdatePanel will be updated only on postback originated by controls inside the panel or from the triggers specified.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;

&lt;div style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif; font-size: small;&quot;&gt;
So, if you have multiple update panels and you&amp;nbsp;don&#39;t want to update all of them to be updated every time, you have to set the&amp;nbsp;&lt;strong&gt;UpdateMode&lt;/strong&gt;&amp;nbsp;to&amp;nbsp;&lt;strong&gt;Conditional&lt;/strong&gt;:&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;dropshadow code&quot; style=&quot;background-color: white; background-image: url(http://codeclimber.net.nz/images/shadowAlpha.png) !important; background-position: 100% 100%; background-repeat: no-repeat; clear: left; float: left; font-family: tahoma, arial, helvetica, sans-serif; font-size: small; margin: 10px 0px 10px 10px; padding: 0px; width: 588px;&quot;&gt;
&lt;div class=&quot;innerbox&quot; style=&quot;border: 1px solid rgb(153, 153, 153); bottom: 6px; margin: 0px; padding: 0px; position: relative; right: 6px;&quot;&gt;
&lt;pre class=&quot;csharpcode&quot; style=&quot;font-family: Consolas, &amp;quot;Courier New&amp;quot;, Courier, monospace; padding: 4px;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot; style=&quot;color: maroon;&quot;&gt;asp:UpdatePanel&lt;/span&gt; &lt;span class=&quot;attr&quot; style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;=&quot;UpdatePanel1&quot;&lt;/span&gt; 
                  &lt;span class=&quot;attr&quot; style=&quot;color: red;&quot;&gt;UpdateMode&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;=&quot;Conditional&quot;&lt;/span&gt;
                  &lt;span class=&quot;attr&quot; style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/1096035531360538496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/1096035531360538496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/1096035531360538496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/1096035531360538496'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2013/02/remember-to-set-updatepanels-updatemode.html' title='Remember to set UpdatePanel&#39;s UpdateMode to Conditional'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-6467188595365194759</id><published>2021-03-15T03:35:00.001-07:00</published><updated>2021-03-15T04:37:23.806-07:00</updated><title type='text'>GROUPING SETS Clause in SQL Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;&lt;b style=&quot;outline: none 0px;&quot;&gt;Introduction&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;&lt;b style=&quot;outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;We all know the use of a &quot;group by&quot; statement. Normally a GROUP BY statement is used in conjunction with aggregate functions (like sum, count, avg etc.) to group the result-set by one or more columns. In a sort, whenever data is to be summarized, the developer uses a Group By clause. The GROUP BY clause is also used to get DISTINCT rows from any result set.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;GROUPING SET is introduced in SQL Server 2008. GROUPING SET is able to generate a result set that can be generated by a UNION ALL of multiple simple GROUP BY clauses. It is capable of generating a result set that is equivalent to the result set generated by ROLL UP or CUBE operations.&lt;b style=&quot;outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;&lt;b style=&quot;outline: none 0px;&quot;&gt;GROUPING SETS Equivalents&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;&lt;b style=&quot;outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;Specifying GROUPING SETS as the GROUP BY list is equivalent to a UNION ALL of queries, each with one of the grouping sets as its GROUP BY list. We can also use GROUPING SETS in replacement of ROLLUP and CUBE.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-family: Segoe UI; font-size: x-small; outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgeOgUqbZSrU7u9Cn_nyvO0Voi0Be4zfA-hN58NkRLp-yNI3K8hJZhVRd4SgYj0wEdgu-FHpjFhJMd8DQRl9cQFbkHTRrRYrOKggDwhLlyzKj9Q1layBdDPEvT6gqnrTptllIUlXVUsjiE/s650/NKtable.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;414&quot; data-original-width=&quot;650&quot; height=&quot;255&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgeOgUqbZSrU7u9Cn_nyvO0Voi0Be4zfA-hN58NkRLp-yNI3K8hJZhVRd4SgYj0wEdgu-FHpjFhJMd8DQRl9cQFbkHTRrRYrOKggDwhLlyzKj9Q1layBdDPEvT6gqnrTptllIUlXVUsjiE/w400-h255/NKtable.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: Segoe UI; font-size: x-small; outline: none 0px;&quot;&gt;&lt;b style=&quot;outline: none 0px;&quot;&gt;Example&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&lt;span style=&quot;font-family: Segoe UI; font-size: x-small; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;In this example, an Employee Master table is created and some dummy values are inserted:&lt;/span&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&lt;span style=&quot;font-family: Segoe UI; outline: none 0px;&quot;&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;TABLE&lt;/span&gt;&amp;nbsp;#EmployeeMaster&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;(&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeCode&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;(&lt;/span&gt;10&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;),&lt;/span&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeName&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;(&lt;/span&gt;25&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;),&lt;/span&gt;&amp;nbsp;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DepartmentCode&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;(&lt;/span&gt;10&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;),&lt;/span&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LocationCode&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;(&lt;/span&gt;10&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;),&lt;/span&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; salary&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: Segoe UI; outline: none 0px;&quot;&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;into&lt;/span&gt;&amp;nbsp;#EmployeeMaster&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;(&lt;/span&gt;EmployeeCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;EmployeeName&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;DepartmentCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;LocationCode&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;salary&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;VALUES&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;(&lt;/span&gt;&lt;span style=&quot;color: red; font-size: 10pt; outline: none 0px;&quot;&gt;&#39;E0001&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;Jignesh&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;IT&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;GNR&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;2000&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;),&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;(&lt;/span&gt;&lt;span style=&quot;color: red; font-size: 10pt; outline: none 0px;&quot;&gt;&#39;E0002&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;Tejas&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;IT&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;GNR&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp; 5000&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;),&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;(&lt;/span&gt;&lt;span style=&quot;color: red; font-size: 10pt; outline: none 0px;&quot;&gt;&#39;E0003&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;Rakesh&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;QA&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;BVN&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;4000&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;),&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;(&lt;/span&gt;&lt;span style=&quot;color: red; font-size: 10pt; outline: none 0px;&quot;&gt;&#39;E0004&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;Bhavin&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;QA&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;BVN&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;2000&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;),&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;(&lt;/span&gt;&lt;span style=&quot;color: red; font-size: 10pt; outline: none 0px;&quot;&gt;&#39;E0005&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;Sandip&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;HR&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;ABD&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;3000&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;),&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;(&lt;/span&gt;&lt;span style=&quot;color: red; font-size: 10pt; outline: none 0px;&quot;&gt;&#39;E0005&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;Tarun&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;HR&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red; outline: none 0px;&quot;&gt;&#39;ABD&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;5000&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-family: Segoe UI; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-family: Segoe UI; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;Now I want some summarized data, like total cost by&amp;nbsp;Employee, total cost by Department, total cost by location and total cost for all employees with all locations in&amp;nbsp;a single result set.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;Before SQL Server 2008, to do this we must write a different query and UNION these queries (this is the same as the following query).&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-family: Segoe UI; font-size: x-small; outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: Segoe UI; font-size: x-small; outline: none 0px;&quot;&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;EmployeeCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;DepartmentCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;LocationCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta; outline: none 0px;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;(&lt;/span&gt;salary&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;)&lt;/span&gt;&amp;nbsp;TotalCost&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;#EmployeeMaster&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;Group&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;BY&lt;/span&gt;&amp;nbsp;EmployeeCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;DepartmentCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;LocationCode&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;UNION&lt;br style=&quot;outline: none 0px;&quot; /&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;NULL&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;EmployeeCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;DepartmentCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;NULL&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;LocationCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta; outline: none 0px;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;(&lt;/span&gt;salary&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;)&lt;/span&gt;&amp;nbsp;TotalCost&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;#EmployeeMaster&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;Group&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;BY&lt;/span&gt;&amp;nbsp;DepartmentCode&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;UNION&lt;br style=&quot;outline: none 0px;&quot; /&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;NULL&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;EmployeeCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;NULL&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;DepartmentCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;LocationCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta; outline: none 0px;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;(&lt;/span&gt;salary&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;)&lt;/span&gt;&amp;nbsp;TotalCost&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;#EmployeeMaster&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;Group&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;BY&lt;/span&gt;&amp;nbsp;LocationCode&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;UNION&lt;br style=&quot;outline: none 0px;&quot; /&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;NULL&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;EmployeeCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;NULL&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;DepartmentCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;NULL&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;LocationCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta; outline: none 0px;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;(&lt;/span&gt;salary&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;)&lt;/span&gt;&amp;nbsp;TotalCost&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;#EmployeeMaster&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: Segoe UI; outline: none 0px;&quot;&gt;With SQL Server 2008:&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: Segoe UI; outline: none 0px;&quot;&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;EmployeeCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;DepartmentCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;LocationCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta; outline: none 0px;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;(&lt;/span&gt;salary&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;)&lt;/span&gt;&amp;nbsp;TotalCost&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;from&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;#EmployeeMaster&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;Group&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;BY&lt;/span&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: magenta; outline: none 0px;&quot;&gt;GROUPING&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue; outline: none 0px;&quot;&gt;SETS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 10pt; outline: none 0px;&quot;&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: 10pt; outline: none 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;EmployeeCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;DepartmentCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,&lt;/span&gt;&amp;nbsp;LocationCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: Segoe UI; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-size: 10pt; outline: none 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,(&lt;/span&gt;DepartmentCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;)&lt;/span&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,(&lt;/span&gt;LocationCode&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;)&lt;/span&gt;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;,()&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style=&quot;outline: none 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: grey; outline: none 0px;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Segoe UI; font-size: x-small; outline: none 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-family: Segoe UI; font-size: x-small; outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisCqa8z1X4_AxFn0xSvVbGTKWjaHujMlX7R9Iuqz040murHE46-_Qc5jHdKMIXrg8Q0JtIFNzNecLMip9TouT-nbCL5GKkiiX0n0Ar8qcdEH9Ttb66Qdkg6U8nZ_X4T-aW_y_OpbV-RYO5/s650/NKTables.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;291&quot; data-original-width=&quot;650&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisCqa8z1X4_AxFn0xSvVbGTKWjaHujMlX7R9Iuqz040murHE46-_Qc5jHdKMIXrg8Q0JtIFNzNecLMip9TouT-nbCL5GKkiiX0n0Ar8qcdEH9Ttb66Qdkg6U8nZ_X4T-aW_y_OpbV-RYO5/w400-h179/NKTables.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;segoe UI&amp;quot;; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #333333; font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-size: x-small; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;&lt;b style=&quot;outline: none 0px;&quot;&gt;Conclusion&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;&lt;b style=&quot;outline: none 0px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-size: 13px; margin-bottom: 0pt; outline: none 0px;&quot;&gt;
&lt;span style=&quot;font-size: x-small; outline: none 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small; outline: none 0px;&quot;&gt;Using GROUPING SETS, we can write multiple &quot;Group By&quot; clauses within a single query and get a single result set. Also it can be used as equivalent to as well as with ROLLUP and CUBE.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/6467188595365194759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/6467188595365194759' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/6467188595365194759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/6467188595365194759'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2013/02/grouping-sets-clause-in-sql-server.html' title='GROUPING SETS Clause in SQL Server'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgeOgUqbZSrU7u9Cn_nyvO0Voi0Be4zfA-hN58NkRLp-yNI3K8hJZhVRd4SgYj0wEdgu-FHpjFhJMd8DQRl9cQFbkHTRrRYrOKggDwhLlyzKj9Q1layBdDPEvT6gqnrTptllIUlXVUsjiE/s72-w400-h255-c/NKtable.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-8027388388506171717</id><published>2021-03-12T07:25:00.001-08:00</published><updated>2021-03-15T04:36:25.667-07:00</updated><title type='text'>How to get first record out of each group from the result retrieved by using group by command</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Suppose if Input is:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 192px;&quot;&gt;

 &lt;colgroup&gt;&lt;col span=&quot;3&quot; style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td class=&quot;gmail-xl63&quot; height=&quot;20&quot; style=&quot;border: 0.5pt solid windowtext; font-family: Calibri, sans-serif; font-size: 11pt; font-weight: 700; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap; width: 48pt;&quot; width=&quot;64&quot;&gt;ID&lt;/td&gt;
  &lt;td class=&quot;gmail-xl63&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: 0.5pt solid windowtext; font-family: Calibri, sans-serif; font-size: 11pt; font-weight: 700; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap; width: 48pt;&quot; width=&quot;64&quot;&gt;GROUP ID&amp;nbsp;&lt;/td&gt;
  &lt;td class=&quot;gmail-xl63&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: 0.5pt solid windowtext; font-family: Calibri, sans-serif; font-size: 11pt; font-weight: 700; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap; width: 48pt;&quot; width=&quot;64&quot;&gt;QTY&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;100&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;2&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;200&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;3&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;300&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;4&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;2&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;98&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;5&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;2&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;198&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;6&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;3&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;175&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;7&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;3&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;275&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;8&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;3&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;375&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;9&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;4&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl64&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;215&lt;/td&gt;
 &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Output should be&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 192px;&quot;&gt;

 &lt;colgroup&gt;&lt;col span=&quot;3&quot; style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td class=&quot;gmail-xl65&quot; height=&quot;20&quot; style=&quot;border: 0.5pt solid windowtext; font-family: Calibri, sans-serif; font-size: 11pt; font-weight: 700; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap; width: 48pt;&quot; width=&quot;64&quot;&gt;ID&lt;/td&gt;
  &lt;td class=&quot;gmail-xl65&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: 0.5pt solid windowtext; font-family: Calibri, sans-serif; font-size: 11pt; font-weight: 700; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap; width: 48pt;&quot; width=&quot;64&quot;&gt;GROUP ID&amp;nbsp;&lt;/td&gt;
  &lt;td class=&quot;gmail-xl65&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: 0.5pt solid windowtext; font-family: Calibri, sans-serif; font-size: 11pt; font-weight: 700; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap; width: 48pt;&quot; width=&quot;64&quot;&gt;QTY&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;1&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;100&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;4&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;2&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;98&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;6&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;3&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;175&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; height=&quot;20&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: 0.5pt solid windowtext; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; height: 15pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;9&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;4&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;gmail-xl66&quot; style=&quot;border-bottom: 0.5pt solid windowtext; border-image: initial; border-left: none; border-right: 0.5pt solid windowtext; border-top: none; font-family: Arial, sans-serif; font-size: 11pt; padding-left: 1px; padding-right: 1px; padding-top: 1px; vertical-align: bottom; white-space: nowrap;&quot;&gt;215&lt;/td&gt;
 &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&amp;nbsp;Solution:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; clear: both; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;Get first record out of each group from the result:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot; style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, serif; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;background-color: white; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;declare&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;T &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID int&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; GroupID int&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; Qty int&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;insert&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;into&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;T &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;98&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;198&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;175&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;275&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;375&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;215&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; cte &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    ID&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    GroupID&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    Qty&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    rank&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;over&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;partition &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;by&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; GroupID &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;order&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;by&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; ID&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; rn
  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;T
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;  
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; ID&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; GroupID&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; Qty
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; cte
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;where&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; rn &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/8027388388506171717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/8027388388506171717' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/8027388388506171717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/8027388388506171717'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2013/03/how-to-get-first-record-out-of-each.html' title='How to get first record out of each group from the result retrieved by using group by command'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-3982763363833044579</id><published>2021-03-11T03:30:00.000-08:00</published><updated>2021-03-11T03:30:08.515-08:00</updated><title type='text'>PHP Coupon Script v 4.0  </title><content type='html'>&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;PHP Coupon Script&lt;/span&gt;&lt;/h1&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Easy-to-use SEO friendly coupon script which allow you to create Discounts/Promotion Coupons web site.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Earn affiliate commissions while offering discounts for your visitors!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;With 9 different designs you will be able to create perfect coupon web site in any niche!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Add website/store with Seo title, keywords and affiliate url&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Activate or inactivate any coupon&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Moderate each coupon and comment&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;You can change design for your site with single click&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Change Site Title, Keywords and Description&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Google Analytics And google adsense code intergration&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Control Number of listing display on home page&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Insert Your Affiliate link as a merchant address&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Earn Affiliate Commissions from all sales&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;0&quot; style=&quot;background-color: white; color: #555244; font-family: Helvetica, Arial, FreeSans, sans-serif; font-size: 14px; height: 80px; width: 638px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class=&quot;btmod moduletable&quot; style=&quot;line-height: 18px; margin-bottom: 15px;&quot;&gt;&lt;h2 style=&quot;color: #45443d; font-weight: normal; line-height: 24.5px; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Coupon Script Features&lt;/span&gt;&lt;/h2&gt;&lt;h3 style=&quot;color: #1da5b3; font-weight: normal; line-height: 25.2px; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Site Settings&lt;a id=&quot;settings&quot; name=&quot;settings&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style: none; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Change Site Title, Keywords and Description&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Change site Logo&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Active/Inactive coupons Approval when user submit it on site.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Active/Inactive comments Approval when user submit it on site.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Google Analytics: Simply Put good analytics code or any other code for tracking.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin: 10px 0px; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;h3 style=&quot;color: #1da5b3; font-weight: normal; line-height: 25.2px; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Google adsense and Banners&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style: none; margin: 10px 0px; padding: 0px;&quot; type=&quot;disc&quot;&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Here You Simply put google adsense code&amp;nbsp; or any affiliate code and static banner code to display on different position in site.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin: 10px 0px; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;h3 style=&quot;color: #1da5b3; font-weight: normal; line-height: 25.2px; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Listing settings&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style: none; margin: 10px 0px; padding: 0px;&quot; type=&quot;disc&quot;&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;In this section you control Number of listing display for each page that include Home Page Popular Stores, Featured Stores, featured coupons and new coupons.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin: 10px 0px; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;h3 style=&quot;color: #1da5b3; font-weight: normal; line-height: 25.2px; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Site Themes/Design&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style: none; margin: 10px 0px; padding: 0px;&quot; type=&quot;disc&quot;&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;You can change design for your site with single click. You can also request us for custom design.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; style=&quot;background-color: white; color: #555244; height: 80px; width: 638px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class=&quot;btmod moduletable&quot; style=&quot;line-height: 18px; margin-bottom: 15px;&quot;&gt;&lt;h3 style=&quot;color: #1da5b3; font-weight: normal; line-height: 25.2px; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Tags&lt;a id=&quot;tags&quot; name=&quot;tags&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style: none; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Add unlimited Tags&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Insert title, keywords, and description&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Add offers for Tags Pages&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; style=&quot;background-color: white; color: #555244; height: 80px; width: 638px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class=&quot;btmod moduletable&quot; style=&quot;line-height: 18px; margin-bottom: 15px;&quot;&gt;&lt;h3 style=&quot;color: #1da5b3; font-weight: normal; line-height: 25.2px; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Websites/Stores Listing&lt;a id=&quot;stores&quot; name=&quot;stores&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style: none; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Add website/store with Seo title, keywords and affiliate url&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Image Upload with thumbnail creation&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Select multiple tags for each website/store&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Edit , Make Feature websitse/stores&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Activate or inactivate any website/store&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; style=&quot;background-color: white; color: #555244; height: 80px; width: 638px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class=&quot;btmod moduletable&quot; style=&quot;line-height: 18px; margin-bottom: 15px;&quot;&gt;&lt;h3 style=&quot;color: #1da5b3; font-weight: normal; line-height: 25.2px; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Coupons&lt;a id=&quot;coupon&quot; name=&quot;coupon&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style: none; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Add Coupons&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Edit Coupons&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Delete Coupon&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Activate or inactivate any coupon&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; style=&quot;background-color: white; color: #555244; height: 80px; width: 638px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class=&quot;btmod moduletable&quot; style=&quot;line-height: 18px; margin-bottom: 15px;&quot;&gt;&lt;h3 style=&quot;color: #1da5b3; font-weight: normal; line-height: 25.2px; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Users&lt;a id=&quot;users&quot; name=&quot;users&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style: none; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Users can post coupons&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Users can post comments&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Moderate each coupon and comment. or Let it display instant when user submit.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; style=&quot;background-color: white; color: #555244; height: 80px; width: 638px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class=&quot;btmod moduletable&quot; style=&quot;line-height: 18px; margin-bottom: 15px;&quot;&gt;&lt;h3 style=&quot;color: #1da5b3; font-weight: normal; line-height: 25.2px; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Comments&lt;a id=&quot;comments&quot; name=&quot;comments&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style: none; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Approve comments&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Delete comments&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Activate or inactivate any comment&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; style=&quot;background-color: white; color: #555244; font-family: Helvetica, Arial, FreeSans, sans-serif; font-size: 14px; height: 80px; width: 638px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class=&quot;btmod moduletable&quot; style=&quot;line-height: 18px; margin-bottom: 15px;&quot;&gt;&lt;h3 style=&quot;color: #1da5b3; font-weight: normal; line-height: 25.2px; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Admins/Moderators&lt;a id=&quot;admins&quot; name=&quot;admins&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style: none; margin: 10px 0px; padding: 0px;&quot;&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Add admins with email and password&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Create unlimited admins to moderate different parts of site.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Admin can moderate, Coupons, Comments, Sites/Stores, Tags, Static Pages, Site Settings&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background: url(&amp;quot;../media/bullet-list.gif&amp;quot;) 0px 3px no-repeat; list-style-type: none; margin-left: 0px; padding-left: 20px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div style=&quot;background-color: transparent; border: 0px; color: #333333; line-height: 1.3em; margin: 0px 0px 0.75em; outline: 0px; padding: 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Coupon Script v 4.0 Nulled Demo:&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div class=&quot;dwnld-button-shortcode button-download aligncenter&quot; style=&quot;background-image: -webkit-linear-gradient(top, rgb(236, 236, 236), rgb(221, 221, 221)); border-radius: 5px; border: 1px solid rgb(128, 128, 128); box-shadow: rgba(125, 125, 125, 0.498) 0px 0px 3px 0px, rgb(221, 221, 221) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 1.3em; margin: 0px auto 10px; max-width: 280px; outline: 0px; padding: 2px; position: relative; vertical-align: baseline; width: 280px;&quot;&gt;&lt;a class=&quot;download&quot; href=&quot;http://www.couponscript.org/demo.php&quot; style=&quot;background-image: url(&amp;quot;http://www.sharechef.com/wp-content/plugins/download-button-shortcode/img/button-download.png&amp;quot;); background-position: 20px 45%; background-repeat: no-repeat; border-radius: 4px; border: 0px; color: #2266bb; display: block; margin: 0px; outline: 0px; padding: 0px 0px 0px 75px; text-decoration-line: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-image: -webkit-linear-gradient(top, rgb(255, 255, 255), rgb(240, 240, 240)); border-radius: 0px 3px 3px 0px; border: 0px; display: block; font-size: 18px; line-height: 18px; margin: 0px; outline: 0px; padding: 15px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;download-title&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Demo&lt;/span&gt;&lt;br /&gt;&lt;em class=&quot;download-description&quot; style=&quot;background-color: transparent; border: 0px; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Coupon Script v 4.0 Nulled&amp;nbsp;&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/3982763363833044579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/3982763363833044579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3982763363833044579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3982763363833044579'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2012/07/coupon-script-v-40-nulled.html' title='PHP Coupon Script v 4.0  '/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-3016261475186519709</id><published>2021-03-11T00:33:00.000-08:00</published><updated>2021-03-11T00:33:27.022-08:00</updated><title type='text'>The SQL Server (RELYONDB) service on local computer started and then stopped.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; font-family: Calibri, sans-serif; font-size: 15px; line-height: 17.5px; margin-bottom: 24px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Error:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; font-family: Calibri, sans-serif; font-size: 15px; line-height: 17.5px; margin-bottom: 24px; padding: 0px; vertical-align: baseline;&quot;&gt;
The SQL Server (RELYONDB) service on local computer started and then stopped. Some services stop automatically if they have no work to do, for example, the performance logs and alert service.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; font-family: Calibri, sans-serif; font-size: 15px; line-height: 17.5px; margin-bottom: 24px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Causes:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; font-family: Calibri, sans-serif; font-size: 15px; line-height: 17.5px; margin-bottom: 24px; padding: 0px; vertical-align: baseline;&quot;&gt;
SQL Server [RELYONDB] is corrupted. Need to install it again. Later attach the database files.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; font-family: Calibri, sans-serif; font-size: 15px; line-height: 17.5px; margin-bottom: 24px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Solution 1:&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; font-family: Calibri, sans-serif; font-size: 15px; line-height: 17.5px; list-style: square; margin: 0px 0px 24px 1.5em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Select Microsoft SQL Server 2005, and click Remove.&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;In the first dialog, make sure to select the “RELYONDB: Database Engine” radio button.&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;If RELYONDB is the only instance, then select all check boxes &amp;amp; Click Next and Finish to proceed with the uninstall.&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;If there is no other SQL instance, I would go on to clean out all SQL components with the following steps.&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;From Add/Remove Programs, uninstall Microsoft SQL Server VSS Writer.&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Uninstall Microsoft SQL Server Setup Support Files.&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Uninstall MIcrosoft SQL Server Native Client.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/3016261475186519709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/3016261475186519709' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3016261475186519709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3016261475186519709'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2012/11/the-sql-server-relyondb-service-on.html' title='The SQL Server (RELYONDB) service on local computer started and then stopped.'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-3272316018515307193</id><published>2021-03-11T00:06:00.000-08:00</published><updated>2021-03-11T00:06:27.118-08:00</updated><title type='text'>Using the Microsoft Web Platform Installer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div&gt;&lt;h2 class=&quot;heading-anchor&quot; id=&quot;introduction&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; line-height: 1.3; margin: 32px 0px 12px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Introduction&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The Microsoft® Web Platform Installer (Web PI) makes it easy for you to download, install, and keep up to date on the latest software components of the Microsoft® Web Platform for development and application hosting on the Windows® operating system. Web PI does the work of comparing the newest available components across the Microsoft Web Platform against what is already installed on your computer; you can see what is new and what you haven&#39;t yet installed. You can use Web PI to learn more about different components and install one or more components in a chained installation, with Web PI handling reboots and logging failures where applicable. The currently available software components include Microsoft WebMatrix, Internet Information Services (IIS), the latest versions of PHP 5.2 and PHP 5.3, Microsoft® SQL Server® 2008 R2 Express, the Microsoft®.NET Framework, and Microsoft® Visual Web Developer 2010 Express Edition with Service Pack 1.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Web PI also provides an interface to the &lt;a href=&quot;https://www.microsoft.com/web/gallery/&quot;&gt;Windows Web App Gallery&lt;/a&gt;, a community-driven hub of the most popular open-source and community Web applications that run on Windows. Accessible from anywhere through the &lt;a href=&quot;https://www.microsoft.com/web/&quot;&gt;Microsoft Web Platform site&lt;/a&gt;, the Windows Web App Gallery provides a streamlined way for users to explore, discover, and install Microsoft® ASP.NET, PHP, and other types of Web applications for the Windows operating system, providing Web developers with access to millions of Web users worldwide. The Windows Web App Gallery lets developers submit their own applications for inclusion; once accepted, a Web application can appear in Web PI for anyone to download.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;System requirements for Web PI include an Internet connection and one of the following supported operating systems:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Windows Server® 2008 R2 or Windows Server® 2008&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Windows Server® 2003 Service Pack 2 (SP2)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Windows Vista® Service Pack 2 (SP2)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Windows® XP Service Pack 3 (SP3)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Windows® 7&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Web PI for Hosters&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Web PI can help in the following scenarios:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Building reference machines used for the creation of images for dedicated or virtual dedicated offerings.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Building the Web Server reference machine for a shared hosting environment.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Updating existing machines with the latest components.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Deploying an internal development or testing environment.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Referring customers to use Web PI to setup their own dedicated machines or local environments for development and testing before deploying to hosted environments.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Web PI for Web Hosting Customers&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Web PI can help in the following scenarios:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Deploying a development environment with the entire Web Platform stack of components. Includes the latest Web, database, and development tools and technologies.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Updating the development environment with the latest components.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Install the Web Platform&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Web PI automates the discovery and installation of the Microsoft Web Platform, which includes the Web Server, Frameworks and Runtimes, Database, and Tools sections. In version 3.0, the Microsoft Web Platform also installs the latest 5.2 and 5.3 versions of PHP.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Download&amp;nbsp;&lt;a href=&quot;https://www.microsoft.com/web/Downloads/platform.aspx&quot;&gt;Web PI&lt;/a&gt;. WebPI starts up on the &quot;Spotlight&quot; tab, where we highlight products and applications that we think will be the most interesting for our users&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhifZ8cYIomol88cShbf5QI6g-ATMoQ9_R5DzB81LtIq7loHpZimfp5ttTeUIRmVDXUM0gausiPG0l5g7OINZVcjH4AMCjiK2UXjuTr24Pe2oJ3faGCUp9SghxaI4muk-fg7DkNcMX6GGRC/s780/Wp1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;540&quot; data-original-width=&quot;780&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhifZ8cYIomol88cShbf5QI6g-ATMoQ9_R5DzB81LtIq7loHpZimfp5ttTeUIRmVDXUM0gausiPG0l5g7OINZVcjH4AMCjiK2UXjuTr24Pe2oJ3faGCUp9SghxaI4muk-fg7DkNcMX6GGRC/w400-h278/Wp1.png&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;h6 class=&quot;heading-anchor&quot; id=&quot;figure-1-webpi-spotlight-tab&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; letter-spacing: 1px; line-height: 1.3; margin: 36px 0px 6px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Figure 1: &quot;WebPI Spotlight&quot; tab&lt;/span&gt;&lt;/h6&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;WebPI separates the components you can install into two main categories: Products and Applications. In the Products tab, you will find all the components you need to build and maintain your web sites. The Applications tab is home to our wide collection of open-source applications that you can use as a great starting place for developing your sites&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &quot;Products&quot; tab shows the four main components: Server, Frameworks, Database and Tools.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLwUgvyMF5dbmf3RK9dVtXP40Q-esXGZYwHw8LvK72PndsUAtJY-0J1A-7alCaDOH8F3evRPrtJLJannbweE-vJ35DqvY9Zur1z4Q4zD5ZOrBctW3VaaLMsZpX6NJ2GiZNwoo0Wmd9RXVh/s779/Products.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;540&quot; data-original-width=&quot;779&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLwUgvyMF5dbmf3RK9dVtXP40Q-esXGZYwHw8LvK72PndsUAtJY-0J1A-7alCaDOH8F3evRPrtJLJannbweE-vJ35DqvY9Zur1z4Q4zD5ZOrBctW3VaaLMsZpX6NJ2GiZNwoo0Wmd9RXVh/w400-h278/Products.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;h6 class=&quot;heading-anchor&quot; id=&quot;figure-2-products-tab&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; letter-spacing: 1px; line-height: 1.3; margin: 36px 0px 6px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Figure 2: &quot;Products&quot; tab&lt;/span&gt;&lt;/h6&gt;&lt;h3 class=&quot;heading-anchor&quot; id=&quot;server&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; line-height: 1.3; margin: 30px 0px 18px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;a aria-labelledby=&quot;server&quot; class=&quot;anchor-link docon docon-link&quot; href=&quot;https://docs.microsoft.com/en-us/iis/install/web-platform-installer/using-the-microsoft-web-platform-installer#server&quot; style=&quot;-webkit-font-smoothing: antialiased; background-color: transparent; border: 0px; box-sizing: inherit; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); cursor: pointer; direction: ltr; display: inline-block; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; height: 1px; left: 0px; line-height: 16px; margin: -1px; opacity: 0; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; speak: none; text-align: center; text-decoration-line: none; top: 1.1375rem; transform: translateY(-50%) scale(1); transition: opacity 0.1s linear 0s; width: 1px;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Server&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The Internet Information Services (IIS) Web server ships in the Windows client and server operating systems, providing a secure, easy-to-manage Web platform for reliably hosting rich Web applications and Web services.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;As of the IIS 7.0 release (which shipped in Windows Server 2008), IIS began using its new extensible architecture to release free Web extensions, such as the Web Deployment Tool and Database Manager. Microsoft fully supports these extensions for the lifetime of the operating system and also has plans of localizing the extensions for international customers.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;WebPI currently installs the latest IIS release (version 7.5, which shipped with Windows Server 2008 R2).&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Also included in WebPI is IIS Express 7.5, the lightweight self-contained version optimized for developers. IIS Express makes it easy to use the most current version of IIS to develop and test websites. It has all the core capabilities of IIS 7.5 as well as additional features designed to ease website development including:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: inherit; color: #171717; list-style: none; margin: 16px 0px 16px 38px; outline-color: inherit; padding: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It doesn&#39;t run as a service or require administrator user rights to perform most tasks&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;IIS Express works well with ASP.NET and PHP applications&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Multiple users of IIS Express can work independently on the same computer&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Web PI simplifies the discovery and installation of Web server components by:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: inherit; color: #171717; list-style: none; margin: 16px 0px 16px 38px; outline-color: inherit; padding: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; outline-color: inherit;&quot;&gt;Automatically configuring the IIS Web server components that ship in Windows.&lt;/span&gt;&amp;nbsp;On Windows 7 and Windows Vista, the Web server components are &quot;Optional Windows Components.&quot; Optional Windows components are part of the Windows installation but are not activated until the user explicitly goes through the process of activating the IIS Windows feature. Likewise, with Windows Server® 2003 and Windows Server 2008, a systems administrator uses Server Manager to install the Web Server role (which installs IIS). With Web PI, setting up the Windows components involves selecting a single product entry&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; outline-color: inherit;&quot;&gt;Automatically &quot;discovering&quot; IIS Extensions that ship on the Web.&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;The IIS team ships extensions that expand the management and runtime capabilities of the IIS Web server and applications hosted on IIS. Users can select from the IIS Web extensions that appear alongside the IIS components that ship in Windows. This integration makes it easy to find and install the Web extensions that the IIS product team delivers on a quarterly basis.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;To see all the IIS components available for installation, just search for&amp;nbsp;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; outline-color: inherit;&quot;&gt;IIS&lt;/span&gt;&amp;nbsp;or to install the recommended set, search for and install the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; outline-color: inherit;&quot;&gt;IIS 7 Recommended Configuration&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCJtxZziKJFi-yC6oGNCsFx_vh58Htf9kNYveTehbj6LKgpKM5slTSe0dtt0q0WQNsCEoWIjUAfil_mnzNn4bSmd80gk80fKgMGcaquXdJiz43g6gnIgRI9kuGg0NAq6nqJ4oAc6IFQ410/s779/IIS+components.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;539&quot; data-original-width=&quot;779&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCJtxZziKJFi-yC6oGNCsFx_vh58Htf9kNYveTehbj6LKgpKM5slTSe0dtt0q0WQNsCEoWIjUAfil_mnzNn4bSmd80gk80fKgMGcaquXdJiz43g6gnIgRI9kuGg0NAq6nqJ4oAc6IFQ410/w400-h276/IIS+components.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;h6 class=&quot;heading-anchor&quot; id=&quot;figure-3-searching-for-iis-components-in-webpi&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; letter-spacing: 1px; line-height: 1.3; margin: 36px 0px 6px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Figure 3: Searching for IIS components in WebPI&lt;/span&gt;&lt;/h6&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;You can learn more about the IIS extension by double-clicking the extension name. For example, on the details page for an IIS component, you can learn more about what the extension does before installing it, and there are links to even more detailed descriptions&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, SegoeUI, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRgEKisoZ-zIDnZnn6UcYS-f-dii0LfVqRIKP-5TpBPfurv6k_0r2t7rDqlxmmSrBqwuWiG-9_C_SbbDJEW8BKB6rbNtbV7A_cG-Vs7vwPk0RDVatRfmdXv8ydLQNualKMnIhPA2f8P7bG/s779/FTP.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;539&quot; data-original-width=&quot;779&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRgEKisoZ-zIDnZnn6UcYS-f-dii0LfVqRIKP-5TpBPfurv6k_0r2t7rDqlxmmSrBqwuWiG-9_C_SbbDJEW8BKB6rbNtbV7A_cG-Vs7vwPk0RDVatRfmdXv8ydLQNualKMnIhPA2f8P7bG/w400-h276/FTP.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;h6 class=&quot;heading-anchor&quot; id=&quot;figure-4-more-information-on-the-iis-ftp-publishing-service-75&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; letter-spacing: 1px; line-height: 1.3; margin: 36px 0px 6px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Figure 4: More information on the IIS: FTP Publishing Service 7.5&lt;/span&gt;&lt;/h6&gt;&lt;h3 class=&quot;heading-anchor&quot; id=&quot;frameworks&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; line-height: 1.3; margin: 30px 0px 18px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;a aria-labelledby=&quot;frameworks&quot; class=&quot;anchor-link docon docon-link&quot; href=&quot;https://docs.microsoft.com/en-us/iis/install/web-platform-installer/using-the-microsoft-web-platform-installer#frameworks&quot; style=&quot;-webkit-font-smoothing: antialiased; background-color: transparent; border: 0px; box-sizing: inherit; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); cursor: pointer; direction: ltr; display: inline-block; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; height: 1px; left: 0px; line-height: 16px; margin: -1px; opacity: 0; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; speak: none; text-align: center; text-decoration-line: none; top: 1.1375rem; transform: translateY(-50%) scale(1); transition: opacity 0.1s linear 0s; width: 1px;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Frameworks&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;h6 class=&quot;heading-anchor&quot; id=&quot;section&quot; style=&quot;box-sizing: inherit; letter-spacing: 1px; line-height: 1.3; margin: 36px 0px 6px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;/h6&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-text-stroke-width: 0px; background-color: white; box-sizing: inherit; color: #171717; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 1rem 0px 0px; orphans: 2; outline-color: inherit; overflow-wrap: break-word; padding: 0px; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The Frameworks section provides developers with programming frameworks for application development.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-text-stroke-width: 0px; background-color: white; box-sizing: inherit; color: #171717; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 1rem 0px 0px; orphans: 2; outline-color: inherit; overflow-wrap: break-word; padding: 0px; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV_sqfNIGsoOZiDKX-iQfLmvzVt1cHIt6yQuF_K9A5lyWlgNSZ7gB86j1OXh_sE7BTb_J8z3WNRdEs1hEZLWNmhG3umEPYvr7VBKDEvAVANy_w_DCw-I5FBWDKzL4WPrxq8dcytioJTLBK/s779/php.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;539&quot; data-original-width=&quot;779&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV_sqfNIGsoOZiDKX-iQfLmvzVt1cHIt6yQuF_K9A5lyWlgNSZ7gB86j1OXh_sE7BTb_J8z3WNRdEs1hEZLWNmhG3umEPYvr7VBKDEvAVANy_w_DCw-I5FBWDKzL4WPrxq8dcytioJTLBK/w400-h276/php.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;h6 class=&quot;heading-anchor&quot; id=&quot;figure-5-frameworks&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; letter-spacing: 1px; line-height: 1.3; margin: 36px 0px 6px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Figure 5: Frameworks&lt;/span&gt;&lt;/h6&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Web Pl 3.0 currently installs the latest community PHP 5.2.and 5.3 from the community PHP download page. Web PI installs PHP along with the following optional PHP components:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: inherit; color: #171717; list-style: none; margin: 16px 0px 16px 38px; outline-color: inherit; padding: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;a data-linktype=&quot;external&quot; href=&quot;http://us3.php.net/mysql&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;MySQL Extension&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;a data-linktype=&quot;external&quot; href=&quot;http://us3.php.net/mysqli&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;MySQL Improved Extension&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;a data-linktype=&quot;external&quot; href=&quot;http://us3.php.net/mysqli&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;SQL Server Improved Extension&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;a data-linktype=&quot;external&quot; href=&quot;http://us3.php.net/gd&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Image Processing and GD&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;a data-linktype=&quot;external&quot; href=&quot;http://us3.php.net/gettext&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Gettext extension&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;a data-linktype=&quot;external&quot; href=&quot;http://us3.php.net/curl&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Client URL Library&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;a data-linktype=&quot;external&quot; href=&quot;http://us3.php.net/exif&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Exchangeable Image Information&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;a data-linktype=&quot;external&quot; href=&quot;http://us3.php.net/xmlrpc&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;XML-RPC&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;a data-linktype=&quot;external&quot; href=&quot;http://us3.php.net/openssl&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;OpenSSL&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Web PI also installs ASP.NET MVC 3.0. ASP.NET is a powerful framework for building dynamic Web applications. As a programming framework, ASP.NET is adaptable to a wide variety of projects and development styles. ASP.NET is part of the .NET Framework, and when coding ASP.NET applications developers have access to the entire .NET Framework. The Model View Controller (MVC) extension enables users to build MVC applications by using the ASP.NET framework.&lt;/span&gt;&lt;/p&gt;&lt;h3 class=&quot;heading-anchor&quot; id=&quot;database&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; line-height: 1.3; margin: 30px 0px 18px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Database&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The Database section includes the SQL Server tools for application development and management.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;SQL Server 2008 R2 is a complete database engine providing ease of use and manageability for running high-performance Web applications. You can select SQL Server 2008 Express SP1 for a flexible runtime environment for database programming.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;SQL Server 2008 R2 Management Studio Express gives developers tools to more easily manage databases in development, staging, or production environments—you can use this option if the SQL Server Express runtime itself is already installed to simplify the management of databases.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUGreakxO0OX3Xv6UkQjIj0IuBqkSKumYVNahQGrLL7oMg-6wCEAVuCeTselXQP5mELjTEzpHV6puW7yEtYbX2FITmjUyEkpVRrM1PDJB-5jaNJ1tlBgAk_QaV8K3893noxPs_4ax0qxYr/s782/DB.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;540&quot; data-original-width=&quot;782&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUGreakxO0OX3Xv6UkQjIj0IuBqkSKumYVNahQGrLL7oMg-6wCEAVuCeTselXQP5mELjTEzpHV6puW7yEtYbX2FITmjUyEkpVRrM1PDJB-5jaNJ1tlBgAk_QaV8K3893noxPs_4ax0qxYr/w400-h276/DB.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;h6 class=&quot;heading-anchor&quot; id=&quot;figure-6-database&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; letter-spacing: 1px; line-height: 1.3; margin: 36px 0px 6px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Figure 6: Database&lt;/span&gt;&lt;/h6&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The SQL Server 2008 R2 Management Objects gets pulled in as a dependency for some extensions and/or applications. (Typically, a user will not install this option.)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Web PI includes the Microsoft® SQL Server® 2008 Driver v 2.0 for PHP, which enables reliable, scalable integration with SQL Server for PHP applications deployed on the Windows platform. The extension allows the reading and writing of data from within PHP scripts and provides a procedural interface for accessing data in all editions of SQL Server 2008 (including Express). The extension also supports the use of PHP streams to read and write large objects. Information, including the source code, is available on&amp;nbsp;&lt;a data-linktype=&quot;external&quot; href=&quot;http://www.codeplex.com/SQL2K5PHP&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;CodePlex&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;h3 class=&quot;heading-anchor&quot; id=&quot;tools&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; line-height: 1.3; margin: 30px 0px 18px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;a aria-labelledby=&quot;tools&quot; class=&quot;anchor-link docon docon-link&quot; href=&quot;https://docs.microsoft.com/en-us/iis/install/web-platform-installer/using-the-microsoft-web-platform-installer#tools&quot; style=&quot;-webkit-font-smoothing: antialiased; background-color: transparent; border: 0px; box-sizing: inherit; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); cursor: pointer; direction: ltr; display: inline-block; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; height: 1px; left: 0px; line-height: 16px; margin: -1px; opacity: 0; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; speak: none; text-align: center; text-decoration-line: none; top: 1.1375rem; transform: translateY(-50%) scale(1); transition: opacity 0.1s linear 0s; width: 1px;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Tools&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The Tools section provides developer tools to build Web applications for the Microsoft Web Platform.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Visual Web Developer Express is a free Microsoft® Visual Studio® Web development environment for building and testing next-generation, standards-based Web applications and services. With full support for Web standards, JavaScript, and ASP.NET, Visual Web Developer Express enables developers to quickly build out new applications.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The Microsoft® Silverlight™ 4 Tools for Visual Studio provide a development environment for Microsoft® Silverlight™ programmers. The Silverlight Tools are free add-ons to the free download version of Visual Web Developer Express or the full version of Microsoft® Visual Studio® 2010 SP1.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4qqwtXSwJTte82KMfd39peA62y0Mhg-F2SSpKpkikddnHvW1wzRG8l4B4tf1ZvARaes6rqifR1g84oUFjrlWqy99pO3jgqks5rKSQFKm3AdhcB5nM5Iw2u_NH0vYvS2AvVJHxI43vxXgh/s778/Tools.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;539&quot; data-original-width=&quot;778&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4qqwtXSwJTte82KMfd39peA62y0Mhg-F2SSpKpkikddnHvW1wzRG8l4B4tf1ZvARaes6rqifR1g84oUFjrlWqy99pO3jgqks5rKSQFKm3AdhcB5nM5Iw2u_NH0vYvS2AvVJHxI43vxXgh/w400-h278/Tools.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;h6 class=&quot;heading-anchor&quot; id=&quot;figure-7-tools&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; letter-spacing: 1px; line-height: 1.3; margin: 36px 0px 6px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Tools&lt;/span&gt;&lt;/h6&gt;&lt;h2 class=&quot;heading-anchor&quot; id=&quot;install-applications-from-the-microsoft-web-application-gallery&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; line-height: 1.3; margin: 32px 0px 12px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;a aria-labelledby=&quot;install-applications-from-the-microsoft-web-application-gallery&quot; class=&quot;anchor-link docon docon-link&quot; href=&quot;https://docs.microsoft.com/en-us/iis/install/web-platform-installer/using-the-microsoft-web-platform-installer#install-applications-from-the-microsoft-web-application-gallery&quot; style=&quot;-webkit-font-smoothing: antialiased; background-color: transparent; border: 0px; box-sizing: inherit; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); cursor: pointer; direction: ltr; display: inline-block; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; height: 1px; left: 0px; line-height: 16px; margin: -1px; opacity: 0; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; speak: none; text-align: center; text-decoration-line: none; top: 1.3rem; transform: translateY(-50%) scale(1); transition: opacity 0.1s linear 0s; width: 1px;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Install Applications from the Microsoft Web Application Gallery&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The Web Platform Installer 3.0 simplifies discovery and deployment of ASP.NET and PHP applications in the&amp;nbsp;&lt;a data-linktype=&quot;external&quot; href=&quot;https://www.microsoft.com/web/gallery/&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;Windows Web App Gallery&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;To learn more about the Web Application Gallery, see&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://docs.microsoft.com/en-us/iis/develop/windows-web-application-gallery/introducing-the-windows-web-application-gallery&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;Introducing the Windows Web Application Gallery&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;When an application is added to the Windows Web Application Gallery, the application integrates into an Atom feed which Web PI consumes; every time a user opens the Web Applications tab, the user sees the latest applications in the Web Application Gallery.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbLeJq_aHZMaVTtqBg3vAzc_jDuv33cz1B7QPYGuQlKqIVKgFayAV5zfL5okjugTRk93kzKVyECl2gaB3oe0DDEdR9A-569x0buWsbbqtOcd25onJ6-Ofo_bzYU_SUoawAO2GDt56SFZcV/s781/WEbapp.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;542&quot; data-original-width=&quot;781&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbLeJq_aHZMaVTtqBg3vAzc_jDuv33cz1B7QPYGuQlKqIVKgFayAV5zfL5okjugTRk93kzKVyECl2gaB3oe0DDEdR9A-569x0buWsbbqtOcd25onJ6-Ofo_bzYU_SUoawAO2GDt56SFZcV/w400-h278/WEbapp.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;h6 class=&quot;heading-anchor&quot; id=&quot;figure-8-web-applications&quot; style=&quot;background-color: white; box-sizing: inherit; color: #171717; letter-spacing: 1px; line-height: 1.3; margin: 36px 0px 6px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Figure 8: Web Applications&lt;/span&gt;&lt;/h6&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;By default, you see the full list of applications in the Windows Web Application Gallery. You can also browse by category to discover applications. These applications are free of charge (although the application provider can offer premium paid support) and follow the&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://docs.microsoft.com/en-us/iis/develop/windows-web-application-gallery/windows-web-application-gallery-principles&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;Windows Web Application Gallery Principles&lt;/a&gt;&amp;nbsp;for running well on Windows.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;When you select an application, Web PI automatically installs the prerequisite Windows components and other components (such as PHP) to run the application. The list of required Web Platform dependencies for WordPress is displayed for you before installation. In this example, Wordpress is being installed on a Windows 7 machine. By default, WebPI will bring along Microsoft WebMatrix, a free, solid and reliable platform for customizing popular web applications&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The prerequisite information comes from the application developer. As part of the application submission process, the application provider gives Microsoft information such as a prerequisite environment and a URL to the Microsoft Web Deployment–enabled package. Web PI uses that information to make sure that the environment is set up properly to run the application on Windows, using the application package that is publicly available for download on the application community site.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;For more developer information on Web Application Gallery, see the&amp;nbsp;&lt;a data-linktype=&quot;external&quot; href=&quot;https://www.microsoft.com/web/gallery/developer.aspx&quot; style=&quot;background-color: transparent; box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;Windows Web App Gallery Developer site&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #171717; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;Reference :&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;span style=&quot;color: #171717; font-family: verdana;&quot;&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/iis/install/web-platform-installer/using-the-microsoft-web-platform-installer&quot;&gt;https://docs.microsoft.com/en-us/iis/install/web-platform-installer/using-the-microsoft-web-platform-installer&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/3272316018515307193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/3272316018515307193' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3272316018515307193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3272316018515307193'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2013/04/microsoft-web-platform-installer-45-iis.html' title='Using the Microsoft Web Platform Installer'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhifZ8cYIomol88cShbf5QI6g-ATMoQ9_R5DzB81LtIq7loHpZimfp5ttTeUIRmVDXUM0gausiPG0l5g7OINZVcjH4AMCjiK2UXjuTr24Pe2oJ3faGCUp9SghxaI4muk-fg7DkNcMX6GGRC/s72-w400-h278-c/Wp1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-8956280010999257538</id><published>2021-03-10T23:06:00.002-08:00</published><updated>2021-03-10T23:06:47.743-08:00</updated><title type='text'>PHP: &lt;? ?&gt; Tags Not Working in PHP 5.3.x under UNIX / Linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #111111; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px; line-height: 21.9844px; margin-bottom: 1.571em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;b&gt;Problem /&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: 18px;&quot;&gt;Issue&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #111111; line-height: 21.9844px; margin-bottom: 1.571em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;I have recently installed php 5.3.5 in my UNIX box and my old working php code not working. It displays code in pages which is in &amp;lt;? … my code … ?&amp;gt; php tags. How do I fix this problem/Issue?&lt;/span&gt;&lt;/div&gt;&lt;h2 style=&quot;background-color: white; color: #111111; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px; line-height: 21.9844px; margin-bottom: 1.571em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;background-color: white; color: #111111; font-size: 14px; line-height: 21.9844px; margin-bottom: 1.571em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;
You need to allow the&amp;nbsp;php tag by editing php.ini file. Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are not under your control, because short tags may not be supported on the target server. For portable, redistributable code, be sure not to use short tags.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #111111; font-size: 14px; line-height: 21.9844px; margin-bottom: 1.571em; padding: 0px;&quot;&gt;&lt;code style=&quot;background-attachment: scroll; background-color: #eeeeee; background-image: none; background-position: 0px 0px; background-repeat: repeat; border: 1px solid rgb(221, 221, 221); display: block; font-family: Consolas, &amp;quot;Andale Mono&amp;quot;, Monaco, Courier, &amp;quot;Courier New&amp;quot;, Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin: 0px 0px 1.833em; overflow: auto; padding: 0.667em 0.917em;&quot;&gt;# vi php.ini&lt;/code&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Make the changes as follows:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;ini&quot; style=&quot;background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; color: #111111; font-family: Consolas, &amp;quot;Andale Mono&amp;quot;, Monaco, Courier, &amp;quot;Courier New&amp;quot;, Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;&quot;&gt;&amp;nbsp;
&lt;span style=&quot;color: #000099; margin: 0px; padding: 0px;&quot;&gt;short_open_tag &lt;/span&gt;=&lt;span style=&quot;color: #660066; margin: 0px; padding: 0px;&quot;&gt; On&lt;/span&gt;
&amp;nbsp;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #111111; font-size: 14px; line-height: 21.9844px; margin-bottom: 1.571em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;
Save and close the file .Reload or restart the apache web server:&lt;/span&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;code style=&quot;background-attachment: scroll; background-color: #eeeeee; background-image: none; background-position: 0px 0px; background-repeat: repeat; border: 1px solid rgb(221, 221, 221); display: block; font-family: Consolas, &amp;quot;Andale Mono&amp;quot;, Monaco, Courier, &amp;quot;Courier New&amp;quot;, Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin: 0px 0px 1.833em; overflow: auto; padding: 0.667em 0.917em;&quot;&gt;# apachectl -k restart&lt;/code&gt;&lt;span style=&quot;font-family: Arial, Helvetica Neue, Helvetica, sans-serif;&quot;&gt;OR&lt;/span&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;code style=&quot;background-attachment: scroll; background-color: #eeeeee; background-image: none; background-position: 0px 0px; background-repeat: repeat; border: 1px solid rgb(221, 221, 221); display: block; font-family: Consolas, &amp;quot;Andale Mono&amp;quot;, Monaco, Courier, &amp;quot;Courier New&amp;quot;, Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin: 0px 0px 1.833em; overflow: auto; padding: 0.667em 0.917em;&quot;&gt;# service httpd restart&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/8956280010999257538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/8956280010999257538' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/8956280010999257538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/8956280010999257538'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2013/04/hp-tags-not-working-in-php-53x-under.html' title='PHP: &lt;? ?&gt; Tags Not Working in PHP 5.3.x under UNIX / Linux'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-3837900625132364776</id><published>2021-03-10T22:03:00.001-08:00</published><updated>2021-03-10T22:03:42.193-08:00</updated><title type='text'>SQL - Calculating time difference in Minutes, Hours, Days, Weeks, Months, Years</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;h2 style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;In this article I will show you how you can easily in SQL,&amp;nbsp;&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px;&quot;&gt;calculate time difference&lt;/b&gt;&amp;nbsp;between two dates in minutes, hours, days, and even weeks, months and years!&lt;br /&gt;&lt;br /&gt;The key of this calculation is in&amp;nbsp;&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px;&quot;&gt;Modulo&lt;/b&gt;&amp;nbsp;operator,&amp;nbsp;&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px;&quot;&gt;%&lt;/b&gt;. It returns the&amp;nbsp;&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px;&quot;&gt;remainder&lt;/b&gt;&amp;nbsp;(NOT the result!) of one number divided by another!&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: Helvetica, Arial, sans-serif; font-size: 18px; margin: 0px; padding: 40px 0px 10px;&quot;&gt;
Simple example&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;
The following example divides the number 38 by 5. This results in 7 as the integer portion of the result, and demonstrates how modulo returns the remainder of 3.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: &amp;quot;Segoe UI&amp;quot;, Tahoma, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: &amp;quot;Segoe UI&amp;quot;, Tahoma, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;
&lt;code class=&quot;sql keyword&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;SELECT&lt;/code&gt;&lt;span style=&quot;background-color: #f9f9f9; color: black; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; line-height: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;38 / 5 &lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;AS&lt;/code&gt;&lt;span style=&quot;background-color: #f9f9f9; color: black; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; line-height: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;Integer&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;, 38 % 5 &lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;AS&lt;/code&gt;&lt;span style=&quot;background-color: #f9f9f9; color: black; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; line-height: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;Remainder;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: &amp;quot;Segoe UI&amp;quot;, Tahoma, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;
&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: &amp;quot;Segoe UI&amp;quot;, Tahoma, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;
&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;Integer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Remainder&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;----------- -----------&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;(1 row(s) affected)&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span face=&quot;&#39;Segoe UI&#39;, Tahoma, Arial, Helvetica, sans-serif&quot; style=&quot;background-color: white; color: #333333; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;sql plain&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span face=&quot;&#39;Segoe UI&#39;, Tahoma, Arial, Helvetica, sans-serif&quot; style=&quot;background-color: white; color: #333333; line-height: 19px;&quot;&gt;We will calculate the difference between two dates: ARTICLE created date - &quot;2012-04-01 08:10:16&quot;, and NOW datetime which we will be set as variable - &quot;2012-04-10 11:35:36&quot;.&lt;/span&gt;&lt;span face=&quot;&#39;Segoe UI&#39;, Tahoma, Arial, Helvetica, sans-serif&quot; style=&quot;background-color: white; color: #333333; line-height: 19px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;
In real world instead of last date, you would probably use GETDATE() SQL function, that returns real datetime.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: &amp;quot;Segoe UI&amp;quot;, Tahoma, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: &amp;quot;Segoe UI&amp;quot;, Tahoma, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;DECLARE&lt;/code&gt; &lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;@articleDT DATETIME;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;DECLARE&lt;/code&gt; &lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;@nowDate DATETIME;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql comments&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #008200; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;-- Time of the ARTICLE created&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt; &lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;@articleDT = &lt;/code&gt;&lt;code class=&quot;sql string&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: blue; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&#39;2012-04-01 08:10:16&#39;&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql comments&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #008200; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;-- Simulation of NOW datetime&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql comments&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #008200; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;-- (in real world you would probably use GETDATE())&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt; &lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;@nowDate = &lt;/code&gt;&lt;code class=&quot;sql string&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: blue; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&#39;2012-04-10 11:35:36&#39;&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number10 index9 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;line number11 index10 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql comments&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #008200; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;-- Created 9 days ago.&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;SELECT&lt;/code&gt; &lt;code class=&quot;sql string&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: blue; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&#39;Created &#39;&lt;/code&gt; &lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;+ &lt;/code&gt;&lt;code class=&quot;sql color2&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: deeppink; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;CAST&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;(DATEDIFF(&lt;/code&gt;&lt;code class=&quot;sql color2&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: deeppink; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;day&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;, @articleDT, @nowDate) &lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;AS&lt;/code&gt; &lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;NVARCHAR(50)) + &lt;/code&gt;&lt;code class=&quot;sql string&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: blue; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&#39; days ago.&#39;&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number13 index12 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;line number14 index13 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql comments&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #008200; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;-- Created 1 weeks, 2 days, 3 hours, 25 minutes and 20 seconds ago.&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number15 index14 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;SELECT&lt;/code&gt; &lt;code class=&quot;sql string&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: blue; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&#39;Created &#39;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number16 index15 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql spaces&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;+ &lt;/code&gt;&lt;code class=&quot;sql color2&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: deeppink; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;CAST&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;(DATEDIFF(&lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;second&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;, @articleDT, @nowDate) / 60 / 60 / 24 / 7 &lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;AS&lt;/code&gt; &lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;NVARCHAR(50)) + &lt;/code&gt;&lt;code class=&quot;sql string&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: blue; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&#39; weeks, &#39;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number17 index16 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql spaces&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;+ &lt;/code&gt;&lt;code class=&quot;sql color2&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: deeppink; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;CAST&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;(DATEDIFF(&lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;second&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;, @articleDT, @nowDate) / 60 / 60 / 24 % 7 &lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;AS&lt;/code&gt; &lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;NVARCHAR(50)) + &lt;/code&gt;&lt;code class=&quot;sql string&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: blue; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&#39; days, &#39;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number18 index17 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql spaces&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;+ &lt;/code&gt;&lt;code class=&quot;sql color2&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: deeppink; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;CAST&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;(DATEDIFF(&lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;second&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;, @articleDT, @nowDate) / 60 / 60 % 24&amp;nbsp; &lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;AS&lt;/code&gt; &lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;NVARCHAR(50)) + &lt;/code&gt;&lt;code class=&quot;sql string&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: blue; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&#39; hours, &#39;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number19 index18 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql spaces&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;+ &lt;/code&gt;&lt;code class=&quot;sql color2&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: deeppink; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;CAST&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;(DATEDIFF(&lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;second&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;, @articleDT, @nowDate) / 60 % 60 &lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;AS&lt;/code&gt; &lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;NVARCHAR(50)) + &lt;/code&gt;&lt;code class=&quot;sql string&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: blue; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&#39; minutes and &#39;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number20 index19 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql spaces&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;+ &lt;/code&gt;&lt;code class=&quot;sql color2&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: deeppink; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;CAST&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;(DATEDIFF(&lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;second&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;, @articleDT, @nowDate) % 60 &lt;/code&gt;&lt;code class=&quot;sql keyword&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: #006699; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;AS&lt;/code&gt; &lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;NVARCHAR(50)) + &lt;/code&gt;&lt;code class=&quot;sql string&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: blue; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&#39; seconds ago.&#39;&lt;/code&gt;&lt;code class=&quot;sql plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number21 index20 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;sql spaces&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;
&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;
As you can see, this algorithm will give you very useful text-like information about how much time has passed since the article was created.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: &amp;quot;Segoe UI&amp;quot;, Tahoma, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: &amp;quot;Segoe UI&amp;quot;, Tahoma, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;plain plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;--------------------------------------------------------------------&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;plain plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;Created 9 days ago.&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;plain plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;(1 row(s) affected)&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;plain plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;----------------------------------------------------------------------------------------------&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;plain plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;Created 1 weeks, 2 days, 3 hours, 25 minutes and 20 seconds ago.&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number10 index9 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;line number11 index10 alt2&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;plain plain&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;(1 row(s) affected)&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;
&lt;code class=&quot;plain spaces&quot; style=&quot;background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px; position: static; right: auto !important; top: auto !important; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background-color: #f9f9f9; background-image: none; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-radius: 0px; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; bottom: auto !important; box-sizing: content-box; color: black; float: none; height: auto; inset: auto; left: auto !important; line-height: 1em; margin: 0px; min-height: auto; outline: 0px; overflow: visible; padding: 0px 1em; position: static; right: auto !important; top: auto !important; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;
&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;
This functionality is also very useful when you must display the time in format like:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 19px; padding: 0px 0px 5px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;
&quot;News posted few hours ago...&quot;&lt;br /&gt;&quot;Article posted two weeks ago...&quot;&lt;br /&gt;&quot;Article posted six months ago...&quot;,&lt;br /&gt;etc...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/3837900625132364776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/3837900625132364776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3837900625132364776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/3837900625132364776'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2013/04/sql-calculating-time-difference-in.html' title='SQL - Calculating time difference in Minutes, Hours, Days, Weeks, Months, Years'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-1144184327779602752</id><published>2021-03-10T22:00:00.000-08:00</published><updated>2021-03-10T22:00:23.164-08:00</updated><title type='text'>Parsing a URL with SQL Server Functions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14pt;&quot;&gt;
Problem&lt;/h2&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
In my environment I have a few tables with thousands of rows that have URLs in particular columns.&amp;nbsp; We are going through some changes in the environment and need to be able to parse out the data (base URL, file name, query parameters) from the specific columns then move the parsed data to another database design.&amp;nbsp; Moving the data is no problem.&amp;nbsp; I plan on using SQL Server 2005 Integration Services and I have a good sense of how to use that tool.&amp;nbsp; By the way, all of the URLs are in varchar fields if that makes any difference.&amp;nbsp; Can you provide any recommendations on how to parse that data?&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14pt;&quot;&gt;
Solution&lt;/h2&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
Although there are probably a few different ways to approach this task, let&#39;s break it apart and see how we can code each one of these scenarios with T-SQL commands in SQL Server 2005.&amp;nbsp; I assume you will be parsing the data from a single column to three new columns in a new database\table design.&amp;nbsp; Since you are familiar with SQL Server 2005 Integration Services, I will not dig into those details and just focus on how to capture the data that you need.&amp;nbsp; So let&#39;s take a look at each scenario and give an explanation on the T-SQL coding in SQL Server 2005.&lt;/div&gt;
&lt;h3 style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;&quot;&gt;
Example Table and Data&lt;/h3&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
Here an example table and example data for this tip:&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;USE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;zCustomerDB&lt;br /&gt;GO&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CREATE TABLE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;ExampleURLs&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;URL_ID&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;INT&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: #434343; font-family: monospace; font-size: 12px;&quot;&gt;IDENTITY&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;PRIMARY KEY&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;NOT NULL,&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;500&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;))&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;INSERT INTO&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;[zCustomerDB].[dbo].[ExampleURLs]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;[CompleteURL]&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;VALUES&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;http://www.test.com/page.asp?tip=1156&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;INSERT INTO&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;[zCustomerDB].[dbo].[ExampleURLs]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;[CompleteURL]&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;VALUES&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;http://www.test.com/page.asp?tip=1299&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;INSERT INTO&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;[zCustomerDB].[dbo].[ExampleURLs]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;[CompleteURL]&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;VALUES&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;http://www.test.com/page.asp?tip=1262&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;INSERT INTO&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;[zCustomerDB].[dbo].[ExampleURLs]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;[CompleteURL]&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;VALUES&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;http://www.test.com/page.asp?tip=1240&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;INSERT INTO&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;[zCustomerDB].[dbo].[ExampleURLs]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;[CompleteURL]&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;VALUES&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;http://www.test.com/page.asp?tip=1226&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;&quot;&gt;
cenario 1 - Base URL&lt;/h3&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
As an example, let&#39;s say the data you are working with looks like &#39;http://www.mssqltips.com/sqlservertip/1156/opportunities-with-sql-server-2005-express-edition/&#39; and you need to capture the &#39;www.mssqltips.com&#39; portion of the column.&amp;nbsp; Below is an example of what that code could look like.&amp;nbsp; This code is fairly straight forward with a single&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms187748.aspx&quot; target=&quot;_blank&quot;&gt;SUBSTRING&lt;/a&gt;&amp;nbsp;command performing all of the heavy lifting.&amp;nbsp; The&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms180040.aspx&quot; target=&quot;_blank&quot;&gt;REVERSE&lt;/a&gt;command is used to find the last slash so the entire directory structure is returned.&amp;nbsp; The&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms186323.aspx&quot; target=&quot;_blank&quot;&gt;CHARINDEX&lt;/a&gt;&amp;nbsp;command is used to determine the position of characters such as &#39;//&#39; in &#39;http://&#39; and &#39;/&#39; in the URL directory path.&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;SELECT&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;URL_ID&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- URL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;//&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;) +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- Position of the double slashes&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;/&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- Position of the last single slash&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;SUBSTRING&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&lt;br /&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;//&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;) +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;/&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;) )&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- Final string&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;FROM&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;zCustomerDB.dbo.ExampleURLs&lt;br /&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;&quot;&gt;
Scenario 2 - File Name&lt;/h3&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
In this scenario let&#39;s capture file name which is the &#39;tip.asp&#39; portion of the &#39;http://www.mssqltips.com/sqlservertip/1156/opportunities-with-sql-server-2005-express-edition/&#39; URL.&amp;nbsp; This code makes additional usage of the&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms180040.aspx&quot; target=&quot;_blank&quot;&gt;REVERSE&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms187748.aspx&quot; target=&quot;_blank&quot;&gt;SUBSTRING&lt;/a&gt;&amp;nbsp;commands, but the subtle portion of this code is positioning each portion of the&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms187748.aspx&quot; target=&quot;_blank&quot;&gt;SUBSTRING&lt;/a&gt;&amp;nbsp;correctly.&amp;nbsp; This is accomplished by using the &#39;+1&#39; in the starting position (second position) of the&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms187748.aspx&quot; target=&quot;_blank&quot;&gt;SUBSTRING&lt;/a&gt;&amp;nbsp;command and using a &#39;-1&#39; in the length position (third position) of the&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms187748.aspx&quot; target=&quot;_blank&quot;&gt;SUBSTRING&lt;/a&gt;&amp;nbsp;command.&amp;nbsp; In this circumstance the&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms186323.aspx&quot; target=&quot;_blank&quot;&gt;CHARINDEX&lt;/a&gt;&amp;nbsp;command is used to determine the position of the &#39;?&#39; and &#39;/&#39; characters.&amp;nbsp; Here is an example of what that code could look like:&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;SELECT&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;URL_ID&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- Backwards version of the URL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;/&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- Position of the slash&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;?&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- Position of the question mark&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;/&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)) - (&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;?&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;))-&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- Length&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;RTRIM&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;SUBSTRING&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&lt;br /&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;?&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)+&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&lt;br /&gt;((&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;/&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)) - (&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;?&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;))-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;))))&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- Final parsed value&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;FROM&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;zCustomerDB.dbo.ExampleURLs&lt;br /&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;&quot;&gt;
Scenario 3 - Query Parameters&lt;/h3&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
In the final example capturing the query parameters is based on finding the correct position for the question mark &#39;?&#39; in the URL.&amp;nbsp; With the &#39;http://www.mssqltips.com/sqlservertip/1156/opportunities-with-sql-server-2005-express-edition/&#39; sample data, you would need to capture the &#39;tip=1156&#39; portion of the column.&amp;nbsp; Here is an example of what that code could look like by leveraging the&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms180040.aspx&quot; target=&quot;_blank&quot;&gt;REVERSE&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms186323.aspx&quot; target=&quot;_blank&quot;&gt;CHARINDEX&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms187748.aspx&quot; target=&quot;_blank&quot;&gt;SUBSTRING&lt;/a&gt;&amp;nbsp;commands once again in a little different context:&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;SELECT&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;URL_ID&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- Backwards version of the URL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;?&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- Position of the question mark&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;RTRIM&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;SUBSTRING&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;CHARINDEX&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: red; font-family: monospace; font-size: 12px;&quot;&gt;&#39;?&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: magenta; font-family: monospace; font-size: 12px;&quot;&gt;REVERSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;CompleteURL&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;) -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: grey; font-family: monospace; font-size: 12px;&quot;&gt;)))&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: green; font-family: monospace; font-size: 12px;&quot;&gt;-- Final parsed value&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; color: blue; font-family: monospace; font-size: 12px;&quot;&gt;FROM&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #ffffe1; font-family: monospace; font-size: 12px;&quot;&gt;zCustomerDB.dbo.ExampleURLs&lt;br /&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/1144184327779602752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/1144184327779602752' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/1144184327779602752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/1144184327779602752'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2013/06/parsing-url-with-sql-server-functions.html' title='Parsing a URL with SQL Server Functions'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-7013334624060831393</id><published>2021-03-10T21:57:00.002-08:00</published><updated>2021-03-14T22:55:40.608-07:00</updated><title type='text'>ASP.NET MVC  - Data Binding for Hierarchical Views or  Parent Child Relation C#.NET Core and .NET Standard</title><content type='html'>&lt;div class=&quot;jsx-2407523658 root guide-section&quot; style=&quot;background: white; border-radius: 0.214286rem; box-shadow: rgb(204, 204, 204) 0px 0px 0.714286rem; box-sizing: inherit; margin: 1.71429rem 0px; padding: 1.14286rem 2.28571rem 0.571429rem; position: relative;&quot;&gt;&lt;div class=&quot;jsx-3962230383&quot; data-module-id=&quot;introduction&quot; id=&quot;module-introduction&quot; style=&quot;box-sizing: inherit; overflow-wrap: break-word;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 24px; font-weight: 400; letter-spacing: 0.36px; line-height: 32px; margin: 16px 0px; text-align: left;&quot;&gt;Introduction&lt;/h3&gt;&lt;div class=&quot;jsx-3796526469&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Many developers know that they can create forms on web pages with a minimum of code using ASP.NET model binding. Visual Studio&#39;s default MVC view templates will even create a standard list, create, edit, and delete views without any additional programming.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;But the power of default model binding extends beyond the flat data model of a simple input form or list of records. Using a few straightforward coding techniques, developers can use ASP.NET to create forms and collect data for hierarchical entity relationships. In many applications, this can make the difference between leveraging the rapid development capabilities of ASP.NET MVC and strapping on the additional infrastructure and complexity of a client-side framework like Angular or React.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Using ASP.NET MVC model binding to present and collect hierarchical form data in a hierarchical structure&lt;/span&gt;&lt;span style=&quot;font-family: times;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;Scope&lt;/span&gt;&lt;/h3&gt;&lt;h3 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;Using ASP.NET MVC model binding to present and collect hierarchical form data in a hierarchical structure.&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The code presented in this guide are based on the .NET Framework. Implementation details for .NET Core and .NET Standard will be covered in a different guide.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;Structure&lt;/h3&gt;&lt;ol style=&quot;box-sizing: inherit; line-height: var(--psTypeLineHeightStandard); margin-bottom: 1.28571rem; margin-left: var(--psLayoutSpacingLarge); margin-right: 0px; margin-top: 1.28571rem; padding-left: 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;We&#39;ll begin with an overview of the case study entities and the principal views of the example solution used to prepare this guide.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Then, we&#39;ll see how to create a view model incorporating member fields of various primitive types and incorporating a field that is a collection of an object type.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Next, we&#39;ll look at the code required to present information to the end user.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;We&#39;ll conclude with a close look at how to ensure that Razor code creates the correct HTML and we&#39;ll take a look how to use HtmlHelpers and CSS to apply formatting to the form fields created by the view.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;/ol&gt;&lt;h3 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;jsx-2407523658 root guide-section&quot; style=&quot;background: white; border-radius: 0.214286rem; box-shadow: rgb(204, 204, 204) 0px 0px 0.714286rem; box-sizing: inherit; margin: 1.71429rem 0px; padding: 1.14286rem 2.28571rem 0.571429rem; position: relative;&quot;&gt;&lt;div class=&quot;jsx-3962230383&quot; data-module-id=&quot;blipbindingcasestudysolution&quot; id=&quot;module-blipbindingcasestudysolution&quot; style=&quot;box-sizing: inherit; overflow-wrap: break-word;&quot;&gt;&lt;div class=&quot;jsx-3962230383 anchor&quot; id=&quot;module-blipbindingcasestudysolution-anchor&quot; style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; overflow-wrap: break-word; position: relative; top: -30px;&quot;&gt;&lt;/div&gt;&lt;h2 data-css-19qk6p4=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 24px; font-weight: 400; letter-spacing: 0.36px; line-height: 32px; margin: 16px 0px;&quot;&gt;&lt;span style=&quot;font-size: 18px; letter-spacing: 0px;&quot;&gt;Entities and Relationships&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;jsx-3796526469&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Note that the many-to-many relationship between&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Orders&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Items&lt;/span&gt;&amp;nbsp;is implemented through the use of a&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;merge table with payload&lt;/em&gt;: in addition to maintaining the relationship between&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Orders&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Items&lt;/span&gt;, the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;OrderItems&lt;/span&gt;&amp;nbsp;table also contains information about the items included in an order, the price at which they were sold and the quantity which were sold.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Obviously, this isn&#39;t a complete order processing system; it&#39;s just meant to provide an example of hierarchical relationships in a familiar form.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The database is created and maintained using Entity Framework code-first design. Let&#39;s look at the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Customer&lt;/code&gt;&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Order&lt;/code&gt;&lt;/span&gt;&amp;nbsp;entities:&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;Customer.cs&lt;/h4&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Namespace Entities.Customers {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public class Customer {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Customer() {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Orders = new HashSet&amp;lt;Order&amp;gt;();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Key]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Column(Order = 0)]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [DatabaseGenerated(DatabaseGeneratedOption.None)]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Guid CustomerID { get; set; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Required]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [MaxLength(128)]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string CustomerName { get; set; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Required]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [MaxLength(3)]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string CountryIso3 { get; set; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [MaxLength(3)]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string RegionCode { get; set; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public virtual Country Country { get; set; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public virtual Region Region { get; set; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public virtual ICollection &amp;lt; Order &amp;gt; Orders { get; set; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Note the following characteristics:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;ul style=&quot;box-sizing: inherit; line-height: var(--psTypeLineHeightStandard); margin-bottom: 1.28571rem; margin-left: var(--psLayoutSpacingLarge); margin-right: 0px; margin-top: 1.28571rem; padding-left: 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;ComponentModel DataAnnotations are used to identify the key field for the database and to specify the size and other options.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The one-to-many relationship between&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Customers&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Orders&lt;/span&gt;&amp;nbsp;is created by the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;virtual&lt;/code&gt;&lt;/span&gt;&amp;nbsp;member field comprised of a collection of&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Order&lt;/code&gt;&lt;/span&gt;&amp;nbsp;entities.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The required relationship between&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Customers&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Countries&lt;/span&gt;&amp;nbsp;in the database is reflected in the field to hold the value&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;CountryIso3&lt;/code&gt;&lt;/span&gt;&amp;nbsp;and the field to identify the relationship,&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Country&lt;/code&gt;&lt;/span&gt;, which is of type&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Country&lt;/code&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;/ul&gt;&lt;h4 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;Order.cs&lt;/h4&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Order&lt;/code&gt;&lt;/span&gt;&amp;nbsp;entity is defined in a similar way:&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;namespace Entities.Orders&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&lt;/span&gt;public class Order&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Order()&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Items = new HashSet&amp;lt;Item&amp;gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Key]&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;[DatabaseGenerated(DatabaseGeneratedOption.None)]&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Guid OrderID { get; set; }&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Required]&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Guid CustomerID { get; set; }&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Required]&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public DateTime OrderDate { get; set; }&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Required]&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [MaxLength(128)]&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string Description { get; set; }&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public virtual ICollection&amp;lt;Item&amp;gt; Items { get; set; }&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public virtual Customer Customer { get; set; }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span face=&quot;Gotham SSm A, Gotham SSm B, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; margin: 0px; text-align: left;&quot;&gt;Note&lt;span style=&quot;font-size: 18px;&quot;&gt; that:&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;ul style=&quot;box-sizing: inherit; line-height: var(--psTypeLineHeightStandard); margin-bottom: 1.28571rem; margin-left: var(--psLayoutSpacingLarge); margin-right: 0px; margin-top: 1.28571rem; padding-left: 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Order&lt;/code&gt;&lt;/span&gt;&amp;nbsp;can only belong to one&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Customer&lt;/code&gt;&lt;/span&gt;, as reflected in the field for a single&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;CustomerID&lt;/code&gt;&lt;/span&gt;&amp;nbsp;and the navigation property&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Customer&lt;/code&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The one-to-many relationship between&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Orders&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Items&lt;/span&gt;&amp;nbsp;is implemented through the virtual property for the collection of&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Item&lt;/code&gt;&lt;/span&gt;&amp;nbsp;entities.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;jsx-2407523658 root guide-section&quot; style=&quot;background: white; border-radius: 0.214286rem; box-shadow: rgb(204, 204, 204) 0px 0px 0.714286rem; box-sizing: inherit; margin: 1.71429rem 0px; padding: 1.14286rem 2.28571rem 0.571429rem; position: relative;&quot;&gt;&lt;div class=&quot;jsx-3962230383&quot; data-module-id=&quot;presentingdata&quot; id=&quot;module-presentingdata&quot; style=&quot;box-sizing: inherit; overflow-wrap: break-word;&quot;&gt;&lt;div class=&quot;jsx-3962230383 anchor&quot; id=&quot;module-presentingdata-anchor&quot; style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; overflow-wrap: break-word; position: relative; top: -30px;&quot;&gt;&lt;/div&gt;&lt;h2 data-css-19qk6p4=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 24px; font-weight: 400; letter-spacing: 0.36px; line-height: 32px; margin: 16px 0px;&quot;&gt;Presenting Data&lt;/h2&gt;&lt;div class=&quot;jsx-3796526469&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;For the purposes of this guide, there are two notable views in the case study, one to display a list of customers and another to display a list of orders for each customer.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Customer/Index View&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The view for the list of customers is a simple table displaying some basic information about the customer and an&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Html.ActionLink&lt;/code&gt;&lt;/span&gt;&amp;nbsp;helper method to navigate to the list of orders for the customer:&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigBvmVR4Rw0ew5AhQYOIDg-3vlPrYCmbCSO6Gpnwn_u6uarv3eZnxJ875N-dj827MJD5RDYkd81xCHZHWhuqj3vPfVDm6GVBqJHN-tBAXl3BOtdS5N_QtfRaDRnqBuclisYwUDdbkz0qKJ/s1020/LandingPage.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;491&quot; data-original-width=&quot;1020&quot; height=&quot;309&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigBvmVR4Rw0ew5AhQYOIDg-3vlPrYCmbCSO6Gpnwn_u6uarv3eZnxJ875N-dj827MJD5RDYkd81xCHZHWhuqj3vPfVDm6GVBqJHN-tBAXl3BOtdS5N_QtfRaDRnqBuclisYwUDdbkz0qKJ/w640-h309/LandingPage.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Customer/Index view&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Views\Customer\Index.cshtml&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the code for the view above, note that the list of customers is created with a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;foreach&lt;/code&gt;&lt;/span&gt;&amp;nbsp;loop that iterates through the collection of&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;CustomerDisplayViewModel&lt;/code&gt;&lt;/span&gt;&amp;nbsp;entities. This is a standard way of presenting a list with a variable number of records:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;@foreach(var item in Model)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.DisplayFor(modelItem =&amp;gt; item.CustomerID)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.DisplayFor(modelItem =&amp;gt; item.CustomerName)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.DisplayFor(modelItem =&amp;gt; item.CountryName)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.DisplayFor(modelItem =&amp;gt; item.RegionName)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.ActionLink(&quot;Orders&quot;, &quot;Index&quot;, &quot;Order&quot;,&amp;nbsp; new { customerid = item.CustomerID }, null)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span face=&quot;Gotham SSm A, Gotham SSm B, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the list of customers, the view model has a flat structure, it&#39;s just an enumerable list of objects that contain the customer information. Here&#39;s the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;@model&lt;/code&gt;&lt;/span&gt;&amp;nbsp;directive from the beginning of&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Index.cshtml&lt;/code&gt;&lt;/span&gt;:&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;@model IEnumerable&amp;lt;Entities.Customers.ViewModels.CustomerDisplayViewModel&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span face=&quot;Gotham SSm A, Gotham SSm B, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;Now let&#39;s take a closer look at that view model.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;Customers.ViewModels\CustomerDisplayViewModel.cs&lt;/h4&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;namespace Entities.Customers.ViewModels&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; public class CustomerDisplayViewModel&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Display(Name = &quot;Customer Number&quot;)]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Guid CustomerID { get; set; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Display(Name = &quot;Customer Name&quot;)]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string CustomerName { get; set; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Display(Name = &quot;Country&quot;)]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string CountryName { get; set; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Display(Name = &quot;State / Province / Region&quot;)]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string RegionName { get; set; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;When the repository method populates this model it combines data from the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; letter-spacing: 0px;&quot;&gt;Customers&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&amp;nbsp;table with&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; letter-spacing: 0px;&quot;&gt;CountryNameEnglish&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&amp;nbsp;from the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; letter-spacing: 0px;&quot;&gt;Country&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&amp;nbsp;table and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; letter-spacing: 0px;&quot;&gt;RegionName&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&amp;nbsp;from the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; letter-spacing: 0px;&quot;&gt;Region&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&amp;nbsp;table. In this way, the view model can present information that is more helpful to the user than the index values for country and region from the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; letter-spacing: 0px;&quot;&gt;Customers&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&amp;nbsp;table.&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;h3 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Order/Index View&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The simple list of orders for a customer shows the customer information and the order number and date as read-only fields, and the purchase order/description as an editable field. By changing values in the editable field and saving we can see how model binding works when doing HttpPost actions.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6mGLf9DOBuSjJyUjhG9yLbBaH7SLrkMgq5KJXbvl0afdjQ5FoCaPk8Ab7ObvL36CrTbH5HmclS-YGx_jv4y61__xC3ewJke-yfD3Gk6uM8pCy29aTT_Ap5wp9aYXBAjj2kroTiwys9HzN/s1020/EditMode.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;662&quot; data-original-width=&quot;1020&quot; height=&quot;260&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6mGLf9DOBuSjJyUjhG9yLbBaH7SLrkMgq5KJXbvl0afdjQ5FoCaPk8Ab7ObvL36CrTbH5HmclS-YGx_jv4y61__xC3ewJke-yfD3Gk6uM8pCy29aTT_Ap5wp9aYXBAjj2kroTiwys9HzN/w400-h260/EditMode.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; font-size: 18px; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Order/Index view&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In this view, we&#39;re presenting information in a hierarchical structure. At the top level is the customer information. Underneath that is the list of orders for the customer.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Let&#39;s see how the data is presented in code.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-size: 18px; font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Views\Order\Index.cshtml&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; text-align: left;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;For the top-tier data, pertaining to the customer, the fields are composed in a very standard way:&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;lt;div class=&quot;form-group&quot;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.LabelFor(model =&amp;gt; model.CustomerName, new { @class = &quot;control-label col-md-2&quot; })&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;col-md-10&quot;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.EditorFor(model =&amp;gt; model.CustomerName, new { htmlAttributes = new { @class = &quot;form-control&quot;, @readonly = &quot;readonly&quot; } })&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Note that we&#39;re using the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;EditorFor&lt;/code&gt;&lt;/span&gt;&amp;nbsp;HtmlHelper to let the Razor engine determine the correct type of HTML element for the data type. We&#39;re also applying the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;form-control&lt;/code&gt;&lt;/span&gt;&amp;nbsp;CSS class to be sure the control picks up the appropriate styling. The field is changed from an editable textbox to a display-only field with the application of the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;@readonly&lt;/code&gt;&lt;/span&gt;&amp;nbsp;HTML attribute.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;For the second tier data, the list of orders, we&#39;re looping through the records in the view model. But in this case we&#39;re&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;not&lt;/span&gt;&amp;nbsp;using a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;foreach&lt;/code&gt;&lt;/span&gt;&amp;nbsp;loop and we&#39;re&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;not&lt;/span&gt;&amp;nbsp;using the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;EditorFor&lt;/code&gt;&lt;/span&gt;&amp;nbsp;HtmlHelper. We&#39;ll look at the reasons for these choices in more detail in the section on saving data.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;@if (Model.Orders != null)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; for (var i = 0; i &amp;lt; Model.Orders.Count(); i++)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.HiddenFor(x =&amp;gt; Model.Orders[i].CustomerID)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.TextBoxFor(x =&amp;gt; Model.Orders[i].OrderID, new { @class = &quot;form-control&quot;, @readonly = &quot;readonly&quot; })&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.TextBoxFor(x =&amp;gt; Model.Orders[i].OrderDate, new { @class = &quot;form-control&quot;, @readonly = &quot;readonly&quot; })&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.TextBoxFor(x =&amp;gt; Model.Orders[i].Description, new { @class = &quot;form-control&quot; })&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;}&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span face=&quot;Gotham SSm A, Gotham SSm B, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;You&#39;ll also note that we&#39;re using a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;for&lt;/code&gt;&lt;/span&gt;&amp;nbsp;loop with a counting variable rather than a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;foreach&lt;/code&gt;&lt;/span&gt;&amp;nbsp;loop.&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;This is crucial to getting binding to work for the &#39;HttpPost&#39; action, as we&#39;ll see soon.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;CustomerOrdersDisplayViewModel.cs&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The view model for customer orders reflects the hierarchical structure of the view shown above. It assembles the display information about the customer from the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Customers&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Countries&lt;/span&gt;, and&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Regions&lt;/span&gt;&amp;nbsp;tables and includes a property that is a collection of&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;OrderDisplayViewModel&lt;/code&gt;&lt;/span&gt;&amp;nbsp;entities.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span face=&quot;Gotham SSm A, Gotham SSm B, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;namespace Entities.Orders.ViewModels&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; public class CustomerOrdersListViewModel&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Display(Name = &quot;Customer Number&quot;)]&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Guid CustomerID { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Display(Name = &quot;Customer Name&quot;)]&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string CustomerName { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Display(Name = &quot;Country&quot;)]&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string CountryNameEnglish { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Display(Name = &quot;Region&quot;)]&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string RegionNameEnglish { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public List&amp;lt;OrderDisplayViewModel&amp;gt; Orders { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Lets take a look at the class that composes the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Orders&lt;/code&gt;&lt;/span&gt;&amp;nbsp;collection.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;OrderDisplayViewModel.cs&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Note that each entity in&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;OrderDisplayViewModel&lt;/code&gt;&lt;/span&gt;&amp;nbsp;is linked to the associated customer in&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;CustomerOrdersListViewModel&lt;/code&gt;&lt;/span&gt;. When we transpose the entities into the view model structure we need to preserve the relationship between the entities (and the tables in the database).&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;namespace Entities.Orders.ViewModels&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; public class OrderDisplayViewModel&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Guid CustomerID { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Display(Name = &quot;Order Number&quot;)]&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Guid OrderID { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Display(Name = &quot;Order Date&quot;)]&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public DateTime OrderDate { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Display(Name = &quot;PO / Description&quot;)]&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string Description { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Note also that there are no&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;virtual&lt;/code&gt;&lt;/span&gt;&amp;nbsp;properties in either of these classes to provide navigation between entities. The view models serve the functional purpose of the view and are uncoupled from the entity relationships of the classes and the database tables. Accordingly, when two view models are used together they reflect the relationship(s) between the view models, rather than the entities from which their data is drawn.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The repository methods take care of transposing the data from the structure of the entities to the structure of the view models and back again.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;OrdersController Action for Index HttpGet&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;By using MVVM and the repository design pattern, we can make our controller actions succinct and provide separation of concerns between the presentation layer, business logic, and data. We can see that in action in the controller action that populates the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Order/Index&lt;/span&gt;&amp;nbsp;view.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;Controllers\OrderController.cs&lt;/h4&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;using System;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;using System.Net;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;using System.Web.Mvc;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;using Data.Orders;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;using Entities.Orders.ViewModels;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;namespace Projects.Controllers&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; public class OrderController : Controller&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // GET: Order&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public ActionResult Index(string customerid)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!String.IsNullOrWhiteSpace(customerid))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (Guid.TryParse(customerid, out Guid customerId))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var repo = new OrdersRepository();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var model = repo.GetCustomerOrdersDisplay(customerId);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return View(model);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return new HttpStatusCodeResult(HttpStatusCode.BadRequest);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;br /&gt;&lt;/h4&gt;&lt;h4 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;All that this controller action needs to do when passed a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;CustomerID&lt;/code&gt;&lt;/span&gt;&amp;nbsp;from the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Customer/Index&lt;/span&gt;&amp;nbsp;view is pass that value to the appropriate repository method and take the resultant data model, an instance of the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;CustomerOrdersListViewModel&lt;/code&gt;&lt;/span&gt;&amp;nbsp;class, and pass it to the view.&lt;/span&gt;&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;jsx-2407523658 root guide-section&quot; style=&quot;background: white; border-radius: 0.214286rem; box-shadow: rgb(204, 204, 204) 0px 0px 0.714286rem; box-sizing: inherit; margin: 1.71429rem 0px; padding: 1.14286rem 2.28571rem 0.571429rem; position: relative;&quot;&gt;&lt;div class=&quot;jsx-3962230383&quot; data-module-id=&quot;savingdata&quot; id=&quot;module-savingdata&quot; style=&quot;box-sizing: inherit; overflow-wrap: break-word;&quot;&gt;&lt;div class=&quot;jsx-3962230383 anchor&quot; id=&quot;module-savingdata-anchor&quot; style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; overflow-wrap: break-word; position: relative; top: -30px;&quot;&gt;&lt;/div&gt;&lt;h2 data-css-19qk6p4=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 24px; font-weight: 400; letter-spacing: 0.36px; line-height: 32px; margin: 16px 0px;&quot;&gt;Saving Data&lt;/h2&gt;&lt;div class=&quot;jsx-3796526469&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Saving data using default binding can be a tricky process -- the correct approach is not well-documented. This is also a situation where the code fails silently. Developers will see their web pages being populated with data correctly, but the values won&#39;t show up in the model when it arrives at the controller action for HttpPost.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;To better understand this, we&#39;re first going to take a look at the problem, then show how to code the functionality correctly.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;What&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Not&lt;/span&gt;&amp;nbsp;to Do&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the Razor code for the list of customers above, we saw that we could populate the list using a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;foreach&lt;/code&gt;&lt;/span&gt;&amp;nbsp;loop and the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;DisplayFor&lt;/code&gt;&lt;/span&gt;&amp;nbsp;HtmlHelper method. If we used a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;foreach&lt;/code&gt;&lt;/span&gt;&amp;nbsp;loop for the list of orders, the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;&amp;lt;table&amp;gt;&lt;/code&gt;&lt;/span&gt;&amp;nbsp;element would look like this:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;table class=&quot;table&quot;&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.DisplayNameFor(model =&amp;gt; model.Orders[0].OrderID)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/th&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.DisplayNameFor(model =&amp;gt; model.Orders[0].OrderDate)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/th&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.DisplayNameFor(model =&amp;gt; model.Orders[0].Description)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/th&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; @if (Model.Orders != null)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var order in Model.Orders)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.HiddenFor(x =&amp;gt; order.CustomerID)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.DisplayFor(x =&amp;gt; order.OrderID)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.DisplayFor(x =&amp;gt; order.OrderDate)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.EditorFor(x =&amp;gt; order.Description)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;That&#39;s nice and concise, and seems to leverage the power of Razor HtmlHelper extension methods to &quot;automagically&quot; generate HTML. The problem is;&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;it doesn&#39;t work&lt;/em&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The HTML produced by the preceding code would look like this:&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbM9SWS5zj8H-9OoNUh-4L4SfOMBX6HiAjrwmws7pG1rFqtiIS3X_GhFqGBPKpS0TAfzuOo6HdRiLnQ7EtXPTtvS3pkJAQ7Roc6Q9jqLjao81m11w-G3lQDJabA6G-Bjzp5n9g-7CyZY3q/s935/HTMLRenderResult.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;434&quot; data-original-width=&quot;935&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbM9SWS5zj8H-9OoNUh-4L4SfOMBX6HiAjrwmws7pG1rFqtiIS3X_GhFqGBPKpS0TAfzuOo6HdRiLnQ7EtXPTtvS3pkJAQ7Roc6Q9jqLjao81m11w-G3lQDJabA6G-Bjzp5n9g-7CyZY3q/w640-h298/HTMLRenderResult.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Form Elements with Ambiguous Element Names and ID&#39;s&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Look at the areas highlighted in yellow. Each row is a separate textbox on the form shown above for the Order/Index view. Each record has the same value for the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;name&lt;/code&gt;&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;id&lt;/code&gt;&lt;/span&gt;&amp;nbsp;elements:&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;order.Description&lt;/code&gt;&lt;/span&gt;. Without a way to identify the records distinctly, MVC&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;gives up&lt;/span&gt;&amp;nbsp;and returns&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;null&lt;/code&gt;&lt;/span&gt;&amp;nbsp;for the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Orders&lt;/code&gt;&lt;/span&gt;&amp;nbsp;field of the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;CustomerOrdersListViewModel&lt;/code&gt;&lt;/span&gt;&amp;nbsp;to which the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Order/Index&lt;/span&gt;&amp;nbsp;view is bound.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Correctly Binding Collection Data&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the Razor code for the list of orders for a specific customer, we used a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;for&lt;/code&gt;&lt;/span&gt;&amp;nbsp;loop with a&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; local variable index value&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;i&lt;/code&gt;&lt;/span&gt;. The loop looks like this:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;@if (Model.Orders != null)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; for (var i = 0; i &amp;lt; Model.Orders.Count(); i++)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.HiddenFor(x =&amp;gt; Model.Orders[i].CustomerID)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.TextBoxFor(x =&amp;gt; Model.Orders[i].OrderID, new { @class = &quot;form-control&quot;, @readonly = &quot;readonly&quot; })&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.TextBoxFor(x =&amp;gt; Model.Orders[i].OrderDate, new { @class = &quot;form-control&quot;, @readonly = &quot;readonly&quot; })&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.TextBoxFor(x =&amp;gt; Model.Orders[i].Description, new { @class = &quot;form-control&quot; })&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Note the following particulars:&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol style=&quot;box-sizing: inherit; line-height: var(--psTypeLineHeightStandard); margin-bottom: 1.28571rem; margin-left: var(--psLayoutSpacingLarge); margin-right: 0px; margin-top: 1.28571rem; padding-left: 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The index value&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;i&lt;/code&gt;&lt;/span&gt;&amp;nbsp;appears in the lambda expression for each form element being generated by the loop, for example:&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;(x =&amp;gt; Model.Orders[i].OrderID)&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;TextBoxFor&lt;/code&gt;&lt;/span&gt;&amp;nbsp;HtmlHelper is used, rather than the more general (and automagic)&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;DisplayFor&lt;/code&gt;&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;EditorFor&lt;/code&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;OrderID&lt;/code&gt;&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;OrderDate&lt;/code&gt;&lt;/span&gt;&amp;nbsp;fields are set as&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;readonly&lt;/code&gt;&lt;/span&gt;&amp;nbsp;using the HTML&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;class&lt;/code&gt;&lt;/span&gt;&amp;nbsp;attribute, rather than using&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;DisplayFor&lt;/code&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Bootstrap textbox styling is applied by adding the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;@class = &quot;form-control&quot;&lt;/code&gt;&lt;/span&gt;&amp;nbsp;attribute.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/div&gt;&lt;/div&gt;&lt;/ol&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The generated HTML looks like this:&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjP8Z8nB3Xg1nLamegmJ8pO2ulsySLI_L9pzAj2gOYD8j-5sxaNT0RfbluqnXyDx88CHlxcSn3jga0PJDCmUv7dW44Bz7p_QE88aafXyAkE9-hz-PwotAHkF82xEn329jX5radZ4AWKYDaz/s964/HTMLRenderResult2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;622&quot; data-original-width=&quot;964&quot; height=&quot;412&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjP8Z8nB3Xg1nLamegmJ8pO2ulsySLI_L9pzAj2gOYD8j-5sxaNT0RfbluqnXyDx88CHlxcSn3jga0PJDCmUv7dW44Bz7p_QE88aafXyAkE9-hz-PwotAHkF82xEn329jX5radZ4AWKYDaz/w640-h412/HTMLRenderResult2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Form Elements with a Distinct Name and ID Attributes&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;As the areas highlighted in yellow show, each field has a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;name&lt;/code&gt;&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;id&lt;/code&gt;&lt;/span&gt;&amp;nbsp;attribute that is distinct for each record. The record index gives MVC something to use to bind the form data to the data model.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;By setting a breakpoint in the HttpPost controller action for the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Order/Index&lt;/span&gt;&amp;nbsp;view we can see that the new data we entered, &quot;expedite&quot; in the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Description&lt;/code&gt;&lt;/span&gt;&amp;nbsp;field of record 0, is being posted back to the server along with the values for the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;readonly&lt;/code&gt;&lt;/span&gt;&amp;nbsp;fields.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitEzIEgA4AanHyl6dKJK4ikhEexLyQHKPTtSqGZ2d0olOyS_eitOJ0L7sie1kycEOLXlDO399tkC1kjycob0Km7FbdV_f7Li1J0ZGIgKLeGusPgouOAg79vea_F6B5H_82kaq5gVtmrY8x/s894/SaveData.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;258&quot; data-original-width=&quot;894&quot; height=&quot;184&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitEzIEgA4AanHyl6dKJK4ikhEexLyQHKPTtSqGZ2d0olOyS_eitOJ0L7sie1kycEOLXlDO399tkC1kjycob0Km7FbdV_f7Li1J0ZGIgKLeGusPgouOAg79vea_F6B5H_82kaq5gVtmrY8x/w640-h184/SaveData.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Visual Studio Debugging Showing Property Inspector Values for an&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;OrderDisplayViewModel&lt;/code&gt;&lt;/span&gt;&amp;nbsp;Entity&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Posting Display Data&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;As we noted above, we&#39;re using the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;TextBoxFor&lt;/code&gt;&lt;/span&gt;&amp;nbsp;HtmlHelper for read-only fields, rather than the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;DisplayFor&lt;/code&gt;&lt;/span&gt;&amp;nbsp;helper. This is so we can return the data to the controller when the HttpPost event fires (when the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Save&lt;/span&gt;&amp;nbsp;button on the page is pressed).&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;When MVC generates the HTML for a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;DisplayFor&lt;/code&gt;&lt;/span&gt;&amp;nbsp;HTML helper, it renders the element as simple text.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;For example, a table cell coded like this:&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; @Html.DisplayFor(modelItem =&amp;gt; item.OrderID)&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span face=&quot;Gotham SSm A, Gotham SSm B, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;would render like this:&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; 490dabe1-1570-473a-8331-5f32333b2635&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;/td&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span face=&quot;&amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif&quot; style=&quot;font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;That&#39;s just straight text, so there&#39;s no way for MVC to bind it to the model.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;But a table cell for a display-only text field coded like this:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; @Html.TextBoxFor(x =&amp;gt; Model.Orders[i].OrderID, new { @class = &quot;form-control&quot;, @readonly = &quot;readonly&quot; })&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span face=&quot;Gotham SSm A, Gotham SSm B, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;would render like this:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;input name=&quot;Orders[0].OrderID&quot; class=&quot;form-control&quot; id=&quot;Orders_0__OrderID&quot; type=&quot;text&quot; readonly=&quot;readonly&quot; value=&quot;490dabe1-1570-473a-8331-5f32333b2635&quot; data-val-required=&quot;The Order Number field is required.&quot; data-val=&quot;true&quot;&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;As an&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;&amp;lt;input&amp;gt;&lt;/code&gt;&lt;/span&gt;&amp;nbsp;field, this element will be passed back to the controller during the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;POST&lt;/code&gt;&lt;/span&gt;. Because it has a distinct&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;id&lt;/code&gt;&lt;/span&gt;, the data in this&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;readonly&lt;/code&gt;&lt;/span&gt;&amp;nbsp;field can be bound to the view model just like data from an editable field. The values for&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;CustomerID&lt;/code&gt;&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;OrderID&lt;/code&gt;&lt;/span&gt;&amp;nbsp;give us the index values necessary to save the changes to the editable field,&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Description&lt;/code&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Note, also, that while we&#39;re displaying&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;OrderDate&lt;/code&gt;&lt;/span&gt;&amp;nbsp;as a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;readonly&lt;/code&gt;&lt;/span&gt;&amp;nbsp;text field, and thereby returning it during the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;POST&lt;/code&gt;&lt;/span&gt;&amp;nbsp;event, we don&#39;t have to. Only the index values necessary to save the changed data need to be returned in the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;POST&lt;/code&gt;&lt;/span&gt;&amp;nbsp;event.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In our example, the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;OrderID&lt;/code&gt;&lt;/span&gt;&amp;nbsp;field is displayed, but the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;CustomerID&lt;/code&gt;&lt;/span&gt;&amp;nbsp;field is included in the form using the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;HiddenFor&lt;/code&gt;&lt;/span&gt;&amp;nbsp;HtmlHelper. As coded, it looks like this:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;@Html.HiddenFor(x =&amp;gt; Model.Orders[i].CustomerID)&lt;br /&gt;``&lt;br /&gt;And the HTML rendered by it looks like this:&lt;br /&gt;```html&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;input name=&quot;Orders[0].CustomerID&quot; id=&quot;Orders_0__CustomerID&quot; type=&quot;hidden&quot; value=&quot;f8214550-69f6-4089-b58a-2de2d4ab01c8&quot; data-val-required=&quot;The CustomerID field is required.&quot; data-val=&quot;true&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-family: &amp;quot;Gotham SSm A&amp;quot;, &amp;quot;Gotham SSm B&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Roboto, Arial, sans-serif; font-size: 18px; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;side from being hidden on the HTML served to the client, this is a full-featured data element that is bound to the view model received by the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;HttpPost&lt;/code&gt;&lt;/span&gt;&amp;nbsp;controller action for the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Index&lt;/span&gt;&amp;nbsp;view. Using&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;HiddenFor&lt;/code&gt;&lt;/span&gt;&amp;nbsp;is a convenient way of keeping form layout simple while including all the data necessary for identifying the records to be updated during a&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;POST&lt;/code&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;font-style: italic; letter-spacing: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;font-style: italic;&quot;&gt;The astute reader may have realized that in our case study the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;jsx-3120878690&quot; color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;box-sizing: inherit; font-style: italic;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;CustomerID&lt;/code&gt;&lt;/span&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;field isn&#39;t necessary to save changes to an&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;jsx-3120878690&quot; color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;box-sizing: inherit; font-style: italic;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;Order&lt;/code&gt;&lt;/span&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;object. Because&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;jsx-3120878690&quot; color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;box-sizing: inherit; font-style: italic;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;OrderID&lt;/code&gt;&lt;/span&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;is a&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;jsx-3120878690&quot; color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;box-sizing: inherit; font-style: italic;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;GUID&lt;/code&gt;&lt;/span&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;it inherently provides a unique identifier for an individual order.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;font-style: italic; letter-spacing: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;font-style: italic; letter-spacing: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;HttpPost Controller Actions&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;By using the repository design pattern we can keep our controller actions simple. In the case of the&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;HttpPost&lt;/code&gt;&lt;/span&gt;&amp;nbsp;action for the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Order/Index&lt;/span&gt;&amp;nbsp;view, all we need to do is validate&amp;nbsp;&lt;span class=&quot;jsx-3120878690&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;code data-css-wz0v65=&quot;&quot; style=&quot;background: rgba(176, 176, 176, 0.25); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: inherit; color: #006395; line-height: 1.85714rem; padding: 0px 4px; white-space: pre-wrap; word-break: break-word;&quot;&gt;CustomerOrdersListViewModel&lt;/code&gt;&lt;/span&gt;&amp;nbsp;and pass it to the appropriate repository method.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px; text-align: left;&quot;&gt;Controllers\OrdersController.cs&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;[HttpPost]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px; text-align: left;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;[ValidateAntiForgeryToken]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;public ActionResult Index(CustomerOrdersListViewModel model)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; if (ModelState.IsValid)&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (model.Orders != null)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var repo = new OrdersRepository();&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; repo.SaveOrders(model.Orders);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return View(model);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; return new HttpStatusCodeResult(HttpStatusCode.BadRequest);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; line-height: 24px; margin: 1.28571rem 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&lt;span color=&quot;rgba(0, 0, 0, 0.95)&quot; style=&quot;font-size: 18px; letter-spacing: 0px;&quot;&gt;Save Repository Method&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; margin-bottom: 1.28571rem; margin-top: 1.28571rem;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The repository method associated with our order list view can also be simple. All we need to do is find the appropriate records in the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;Orders&lt;/span&gt;&amp;nbsp;table and update them.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 data-css-1nsv70o=&quot;&quot; style=&quot;box-sizing: inherit; color: rgba(0, 0, 0, 0.95); font-weight: 500; letter-spacing: 0px; line-height: 24px; margin: 1.28571rem 0px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Data\Orders\OrdersRepository.cs&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;public void SaveOrders(List&amp;lt;OrderDisplayViewModel&amp;gt; orders)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; if (orders != null)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using (var context = new ApplicationDbContext())&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var order in orders)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var record = context.Orders.Find(order.OrderID);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (record != null)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; record.Description = order.Description;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.SaveChanges();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;...&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/7013334624060831393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/7013334624060831393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/7013334624060831393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/7013334624060831393'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2021/03/aspnet-mvc-default-data-binding-for.html' title='ASP.NET MVC  - Data Binding for Hierarchical Views or  Parent Child Relation C#.NET Core and .NET Standard'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigBvmVR4Rw0ew5AhQYOIDg-3vlPrYCmbCSO6Gpnwn_u6uarv3eZnxJ875N-dj827MJD5RDYkd81xCHZHWhuqj3vPfVDm6GVBqJHN-tBAXl3BOtdS5N_QtfRaDRnqBuclisYwUDdbkz0qKJ/s72-w640-h309-c/LandingPage.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-8955632696668250629</id><published>2021-03-10T21:56:00.000-08:00</published><updated>2021-03-10T21:56:30.390-08:00</updated><title type='text'>ClosedXml Excel Process Examples C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;h2&gt;&lt;span style=&quot;background-color: white; letter-spacing: 0.162px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;background-color: white; color: #242729;&quot;&gt;Example of Read an Excel file into a DataTable&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;and Process Datatable.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: courier; letter-spacing: 0.162px;&quot;&gt;Finally Save&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: courier; letter-spacing: 0.162px;&quot;&gt;Datatable&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: courier; letter-spacing: 0.162px;&quot;&gt;&amp;nbsp;into&amp;nbsp;excel file.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: courier; letter-spacing: 0.162px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;background-color: white; letter-spacing: 0.162px;&quot;&gt;&lt;b&gt;SAMPLE CODE&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;background-color: white; letter-spacing: 0.162px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
using ClosedXML.Excel;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
&lt;br /&gt;
public class ClosedXmlExcelProcess&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public bool GenerateOutput(DataTable&amp;nbsp; dt, string OutputFilePath)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return&amp;nbsp; ProcessOutput(dt, OutputFilePath);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public bool GenerateOutput(string InputFilePath, string OutputFilePath)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataTable DtInput = ProcessInputFile(InputFilePath);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return ProcessOutput(DtInput, OutputFilePath);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private bool ProcessOutput(DataTable DtInput, string OutputFilePath)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (DtInput.Rows.Count &amp;lt;= 0 || DtInput.Columns.Count &amp;lt; 8)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Get Campaign Name from DataTable&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string _CampaignColumnName = DtInput.Columns[2].ColumnName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string _GroupColumnName = DtInput.Columns[3].ColumnName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string _ClickColumnName = DtInput.Columns[4].ColumnName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string _SalaryColumnName = DtInput.Columns[6].ColumnName;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Get Distinct Column Values of Campaign&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataTable mDistinctdt = DtInput.DefaultView.ToTable(true, _CampaignColumnName);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (mDistinctdt.Rows.Count &amp;gt; 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;string&amp;gt; lstCampaignName = mDistinctdt.AsEnumerable().Select(r =&amp;gt; r.Field&amp;lt;string&amp;gt;(_CampaignColumnName)).ToList();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (lstCampaignName.Count &amp;gt; 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; XLWorkbook wb = new XLWorkbook();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (string CampaignVal in lstCampaignName)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataView vwFilter = DtInput.DefaultView;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vwFilter.RowFilter = &quot;[&quot; + _CampaignColumnName + &quot;] =&amp;nbsp; &#39;&quot; + CampaignVal + &quot;&#39;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataTable dtFilteredRows = vwFilter.ToTable();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Filter Value like Excel Pivot Table using Linq&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;OutputResult&amp;gt; lstCampaignSheet = new List&amp;lt;OutputResult&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lstCampaignSheet = dtFilteredRows.AsEnumerable()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Select(x =&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;new&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;GroupName = x[_GroupColumnName],&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ClickCount = x[_ClickColumnName],&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Salary = x[_SalaryColumnName]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.GroupBy(s =&amp;gt; new { s.GroupName })&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Select(g =&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;new OutputResult&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AddGroupView = g.Key.GroupName.ToString(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Clicks = g.Sum(x =&amp;gt; Convert.ToInt32(x.ClickCount)),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Salary = g.Sum(x =&amp;gt; Convert.ToInt32(x.Salary)),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;).ToList();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IXLWorksheet ws = wb.Worksheets.Add(CampaignVal);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ws.Cell(1, 1).Value = &quot;Add Group View&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ws.Cell(1, 2).Value = &quot;Clicks&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ws.Cell(1, 3).Value = &quot;Views&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ws.Cell(1, 4).Value = &quot;CR&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ws.Cell(1, 1).Style.Fill.BackgroundColor = XLColor.Yellow;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lstCampaignSheet = lstCampaignSheet.Where(d =&amp;gt; d.Clicks &amp;gt; 0).OrderByDescending(d =&amp;gt; d.CR).ToList();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IXLRange range = ws.Cell(2, 1).InsertData(lstCampaignSheet.AsEnumerable());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ws.Range(range.FirstRow().RangeAddress.LastAddress, range.LastCellUsed().Address).AddConditionalFormat().WhenEqualOrGreaterThan(6)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Fill.SetBackgroundColor(XLColor.Red);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ws.Range(range.FirstRow().RangeAddress.LastAddress, range.LastCellUsed().Address).AddConditionalFormat().WhenEqualOrLessThan(6)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Fill.SetBackgroundColor(XLColor.Yellow);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ws.Columns().AdjustToContents();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wb.SaveAs(OutputFilePath);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private DataTable ProcessInputFile(string filePath)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Create a new DataTable.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataTable dt = new DataTable();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Open the Excel file using ClosedXML.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using (XLWorkbook workBook = new XLWorkbook(filePath))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Read the first Sheet from Excel file.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IXLWorksheet workSheet = workBook.Worksheet(1);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Loop through the Worksheet rows.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bool firstRow = true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (IXLRow row in workSheet.Rows())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Use the first row to add columns to DataTable.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (firstRow)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (IXLCell cell in row.Cells())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Columns.Add(cell.Value.ToString());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; firstRow = false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Add rows to DataTable.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Rows.Add();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int i = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (IXLCell cell in row.Cells())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Rows[dt.Rows.Count - 1][i] = cell.Value.ToString();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return dt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
public class OutputResult&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public string AddGroupView { get; set; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public int Clicks { get; set; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public int Salary { get; set; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;public decimal CR { get { return Salary / Clicks; } }&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/8955632696668250629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/8955632696668250629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/8955632696668250629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/8955632696668250629'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2019/01/closedxml-excel-process-examples.html' title='ClosedXml Excel Process Examples C#'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-6277322600311777833</id><published>2021-03-10T21:55:00.001-08:00</published><updated>2021-03-10T21:55:37.602-08:00</updated><title type='text'>Permutation Algorithm for  Words C#</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; letter-spacing: 0.162px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;background-color: white; letter-spacing: 0.162px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;A permutation, also called an “arrangement number” or “order, ” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S itself. A string of length n has n! permutation.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;background-color: white; letter-spacing: 0.162px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;background-color: white; letter-spacing: 0.162px;&quot;&gt;Below are the permutations of string ABC.&lt;/span&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; letter-spacing: 0.162px;&quot; /&gt;&lt;span style=&quot;background-color: white; letter-spacing: 0.162px;&quot;&gt;ABC ACB BAC BCA CBA CAB&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;background-color: white; color: #40424e; letter-spacing: 0.162px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Sample Code&lt;/b&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&amp;nbsp;String input = &quot;A B C D&quot;;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;List&amp;lt;string&amp;gt; str = input.Split(&#39; &#39;).ToList();&lt;br /&gt;
PermutationAlgorithm obj = new PermutationAlgorithm();&lt;br /&gt;
var lstPermute = obj.Permute(str);&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;Algorithm&lt;/b&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
public class PermutationAlgorithm&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public&amp;nbsp; List&amp;lt;Permutation&amp;gt; Permute(List&amp;lt;string&amp;gt; str)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int n = str.Count;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; StringBuilder sb = permute(str, 0, n-1, new System.Text.StringBuilder());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var lst = sb.ToString().TrimEnd(&#39;~&#39;).Split(&#39;~&#39;).ToList();&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return lst.Select((x , index )=&amp;gt; new Permutation { KeyWords = x,Index = index+1 }).ToList();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /**&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; * permutation function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; * @param str string to&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; calculate permutation for&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; * @param l starting index&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; * @param r end index&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private StringBuilder permute(List&amp;lt;string&amp;gt; str,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int l, int r, StringBuilder output)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (l == r)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output.Append(string.Join(&quot; &quot;, str) + &quot;~&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = l; i &amp;lt;= r; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; str = swap(str, l, i);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permute(str, l + 1, r, output);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; str = swap(str, l, i);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return output;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /**&lt;br /&gt;
&amp;nbsp; &amp;nbsp; * Swap Characters at position&lt;br /&gt;
&amp;nbsp; &amp;nbsp; * @param a string value&lt;br /&gt;
&amp;nbsp; &amp;nbsp; * @param i position 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; * @param j position 2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; * @return swapped string&lt;br /&gt;
&amp;nbsp; &amp;nbsp; */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public List&amp;lt;string&amp;gt; swap(List&amp;lt;string&amp;gt; a,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int i, int j)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string temp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; temp = a[i];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a[i] = a[j];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a[j] = temp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return a;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
public class Permutation&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public int Index { get; set; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public string KeyWords { get; set; }&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/6277322600311777833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/6277322600311777833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/6277322600311777833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/6277322600311777833'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2019/01/permutation-algorithm-for-words.html' title='Permutation Algorithm for  Words C#'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-396104939446092295</id><published>2012-12-10T22:53:00.003-08:00</published><updated>2012-12-10T22:53:57.475-08:00</updated><title type='text'>Operation is not valid due to the current state of the object Error</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;I got this error when I tried to save a Page with lots of form fields to SQL Server Database&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;The default max number of form fields that can be post is 1000.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;&quot; /&gt;&lt;b&gt;Solution:&lt;/b&gt;&lt;br style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;&quot; /&gt;&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;In order to solve this error add this Line to your Web.Config File:&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;csharpcode&quot; style=&quot;font-family: Consolas, &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;
&lt;pre style=&quot;font-family: Consolas, &#39;Courier New&#39;, Courier, monospace; margin: 0em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;lnum&quot; style=&quot;color: #606060;&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot; style=&quot;color: maroon;&quot;&gt;appSettings&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;font-family: Consolas, &#39;Courier New&#39;, Courier, monospace; margin: 0em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;lnum&quot; style=&quot;color: #606060;&quot;&gt;   2:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot; style=&quot;color: maroon;&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;attr&quot; style=&quot;color: red;&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;=&quot;aspnet:MaxHttpCollectionKeys&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot; style=&quot;color: red;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;=&quot;10000&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;font-family: Consolas, &#39;Courier New&#39;, Courier, monospace; margin: 0em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;lnum&quot; style=&quot;color: #606060;&quot;&gt;   3:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot; style=&quot;color: maroon;&quot;&gt;appSettings&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/396104939446092295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/396104939446092295' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/396104939446092295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/396104939446092295'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2012/12/operation-is-not-valid-due-to-current.html' title='Operation is not valid due to the current state of the object Error'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-7998010576736708246</id><published>2012-11-03T12:44:00.002-07:00</published><updated>2012-11-03T12:46:04.328-07:00</updated><title type='text'>Programmatically Creating an ASP.NET GridView Control</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 21px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The biggest project I’ve worked on in the past year involved building almost all of the ASP.NET controls for a page programmatically in the code-behind and putting them into a Placeholder, rather than declaring them in the markup file.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 21px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Many ASP.NET controls are relatively easy to build this way.&amp;nbsp; Buttons, TextBoxes, Labels, DropDownLists, even SqlDataSources can be created using a few simple lines of code.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 21px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Adding a print Button can be this simple:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;pre&gt;&lt;span style=&quot;color: #0b5394; font-family: Verdana, sans-serif;&quot;&gt;Dim btnPrint As New Button
btnPrint.Attributes.Add(&quot;onclick&quot;, &quot;javascript:window.print();&quot;)
btnPrint.Visible = False
Placeholder1.Controls.Add(btnPrint)&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 21px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 21px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The instructions for adding simple controls such as these can be easily found on&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/&quot; style=&quot;border: 0px; color: #ec8500; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot; title=&quot;Microsoft Developer Network&quot;&gt;MSDN&lt;/a&gt;&amp;nbsp;and many other sites.&amp;nbsp; Unfortunately,&amp;nbsp; instructions for building a complex GridView were nowhere to be found.&amp;nbsp; Take heart: It can be done!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 21px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Adding a GridView control is generally much more complicated than this, and also requires many more attributes.&amp;nbsp; Each column must be declared and added to the GridView prior to the GridView itself being added to the Form / Panel / Placeholder, etc.&amp;nbsp; Also, attributes like sorting, paging, Edit / Cancel Buttons must be taken into consideration.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 21px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Here is an example of the VB code for a full-featured GridView:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; line-height: 21px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;pre style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-family: Verdana, sans-serif;&quot;&gt;Dim gvExample As New GridView
With gvExample
.ID = &quot;gvExample&quot;
.CssClass = &quot;gridview&quot;
.DataSource = dvExample
.AutoGenerateColumns = False
.CellPadding = 4
.DataKeyNames = New String() {&quot;ExampleID&quot;}
.ForeColor = Drawing.ColorTranslator.FromHtml(&quot;#2a2723&quot;)
.GridLines = GridLines.None
.Width = Unit.Percentage(100)
.AllowSorting = True
.AllowPaging = False

Dim strHeadBack As String = &quot;#ffcb00&quot;
Dim strPagerBack As String = &quot;#009ddb&quot;
Dim strForeColor As String = &quot;#000000&quot;

.HeaderStyle.BackColor = Drawing.ColorTranslator.FromHtml(strHeadBack)
.HeaderStyle.Font.Bold = True
.HeaderStyle.ForeColor = Drawing.ColorTranslator.FromHtml(strForeColor)

.RowStyle.BackColor = Drawing.ColorTranslator.FromHtml(&quot;#FFFBD6&quot;)
.RowStyle.ForeColor = Drawing.ColorTranslator.FromHtml(&quot;#2a2723&quot;)
.RowStyle.HorizontalAlign = HorizontalAlign.Center

.AlternatingRowStyle.BackColor = Drawing.Color.White

.BorderColor = Drawing.ColorTranslator.FromHtml(&quot;#d80073&quot;)
.BorderStyle = BorderStyle.Groove

.Columns.Clear()

Dim ViewButton As New ButtonField
ViewButton.HeaderText = &quot;View&quot;
ViewButton.ButtonType = ButtonType.Button
ViewButton.Text = &quot;View&quot;
ViewButton.CommandName = &quot;ViewExample&quot;
.Columns.Add(ViewButton)

Dim EditButton As New TemplateField
EditButton.HeaderText = &quot;Edit&quot;
EditButton.ItemTemplate = New MyButtonTemplate &#39; This is a user-defined class that creates this Button
EditButton.Visible = bEditVisible
.Columns.Add(EditButton)

Dim Voided As New CheckBoxField
Voided.HeaderText = &quot;Voided&quot;
Voided.DataField = &quot;Voided&quot;
Voided.ReadOnly = True
Voided.Visible = bVoidVisible
.Columns.Add(Voided)

Dim ExampleDate As New TemplateField
ExampleDate.HeaderText = &quot;Date/Time&quot;
ExampleDate.SortExpression = &quot;Date_and_Time&quot;
ExampleDate.ItemTemplate = New MyLabelTemplate &#39; This is a user-defined class that creates this Label
ExampleDate.ItemStyle.Wrap = False
.Columns.Add(ExampleDate)

Dim ShortColumn As New BoundField
ShortColumn.ItemStyle.CssClass = &quot;left&quot;
ShortColumn.HeaderText = &quot;Short Column&quot;
ShortColumn.SortExpression = &quot;Short_Column&quot;
ShortColumn.DataField = &quot;Short_Column&quot;
ShortColumn.ItemStyle.Wrap = True
ShortColumn.ItemStyle.Width = 150
.Columns.Add(ShortColumn)

Dim LongColumn As New BoundField
LongColumn.ItemStyle.CssClass = &quot;left&quot;
LongColumn.HeaderText = &quot;Long Column&quot;
LongColumn.SortExpression = &quot;Long_Column&quot;
LongColumn.DataField = &quot;Long_Column&quot;
LongColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Left
LongColumn.ItemStyle.Wrap = True
LongColumn.ItemStyle.Width = 200
.Columns.Add(LongColumn)

Dim CreatedBy As New BoundField
CreatedBy.HeaderText = &quot;Created By&quot;
CreatedBy.SortExpression = &quot;CreatedBy&quot;
CreatedBy.DataField = &quot;CreatedBy&quot;
.Columns.Add(CreatedBy)

.Visible = True
.PageIndex = GridViewPageIndex &#39; I used a Session variable to store the page number
Placeholder1.Controls.Add(gvExample)
.DataBind()
End With
&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;color: #333333;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 21px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 21px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Separate routines that handle the Sorting and PageIndexChanging events must be manually created if you want these functions to be included with your GridView.&amp;nbsp; In these modules, you can use Session variables to store the page numbers and sort direction.&amp;nbsp; It might be possible to use ViewState variables instead, though I did not try that here.&amp;nbsp; Also, a module that handles RowCommand events must be created if any buttons that are added to the GridView do something that is row-specific.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; line-height: 21px; margin-bottom: 1.429em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;It is certain that creating a GridView programmatically is much more difficult than dragging and dropping from the Toolbar onto the Design page.&amp;nbsp; However, that may not always be the best way if you are creating a highly dynamic application, such as one where even the fundamental design of a page is database-driven.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/7998010576736708246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/7998010576736708246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/7998010576736708246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/7998010576736708246'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2012/11/programmatically-creating-aspnet_3.html' title='Programmatically Creating an ASP.NET GridView Control'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-9148963784905975665</id><published>2012-11-03T12:38:00.005-07:00</published><updated>2021-03-11T01:00:54.476-08:00</updated><title type='text'>Add Normal Column and Template Column Dynamically in Asp.net GridView</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial; font-size: 16px;&quot;&gt;in most of case we build GridView statically or let asp.net do it it self but what if we want to add Columns to GridView Dynamically.like you may want to add TemplateField &amp;nbsp;with Several controls within it with code too.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial; font-size: 16px;&quot;&gt;Fist we will see how to add Normal column to GridView at runtime.&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #e0eaf1; border: none; color: #222222; font-family: Consolas; font-size: 11pt; margin-bottom: 10px; margin-top: 10px; max-height: 500px; overflow: auto; padding: 7px 12px; width: auto;&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;BoundField&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;FirstName&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;BoundField&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;FirstName&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;DataField&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #008800;&quot;&gt;&quot;Some Database Field&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;FirstName&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;HeaderText&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #008800;&quot;&gt;&quot;First Name&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;

GridView1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;Columns&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;Add&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;FirstName&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial; font-size: 16px;&quot;&gt;Next , How to add Field With Custom template.to add Column with custom template you need to First Define Template using code for that you need to implement ITemplate interface. here is sample code about doing it .&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial; font-size: 16px;&quot; /&gt;&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #e0eaf1; border: none; color: #222222; font-family: Consolas; font-size: 11pt; margin-bottom: 10px; margin-top: 10px; max-height: 500px; overflow: auto; padding: 7px 12px; width: auto;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #880000;&quot;&gt;/* Create Template Field by Implementing ITemplate */&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;MyCustomTemplate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;ITemplate&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue;&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;InstantiateIn&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;System&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;Web&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;UI&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;Control&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; container&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;CheckBox&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; cb &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;CheckBox&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cb&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;ID &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #008800;&quot;&gt;&quot;testCheckBox&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cb&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;Text&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #008800;&quot;&gt;&quot;Test&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; container&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;Controls&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;Add&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;cb&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #880000;&quot;&gt;/* Adding Field With Template */&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;TemplateField&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; tf &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;TemplateField&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
tf&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;HeaderText&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #008800;&quot;&gt;&quot;Custom Template Field Column&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
tf&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;ItemTemplate&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;MyCustomTemplate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;

GridView1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;Columns&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af;&quot;&gt;Add&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;tf&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial; font-size: 16px;&quot;&gt;above example We Created Template of Item within the column with one check box by Implementing ITemplate Interface which we can set as Item Template while we Add TemplateField in GridView.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/9148963784905975665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/9148963784905975665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/9148963784905975665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/9148963784905975665'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2012/11/add-normal-column-and-template-column.html' title='Add Normal Column and Template Column Dynamically in Asp.net GridView'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-1119672969652450388</id><published>2012-11-03T12:38:00.001-07:00</published><updated>2012-11-03T12:38:17.648-07:00</updated><title type='text'>How to create template columns dynamically in a grid view</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;Sample Program:&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;Imports System.Data&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;Imports System.Web.UI.WebControls&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;Public Class MyCustomTemplate&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; Implements ITemplate&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim cb As New CheckBox()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cb.ID = &quot;PageID&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AddHandler cb.DataBinding, AddressOf CheckBox_DataBining&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; container.Controls.Add(cb)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; End Sub&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; Public Sub CheckBox_DataBining(ByVal sender As Object, ByVal e As EventArgs)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim button As CheckBox = TryCast(sender, CheckBox)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim container As GridViewRow = CType(button.NamingContainer, GridViewRow)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim dataValue As Object = DataBinder.Eval(container.DataItem, &quot;id&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If Not IsDBNull(dataValue) Then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; button.Text = dataValue.ToString()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; End Sub&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;End Class&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;Partial Class _Default&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; Inherits System.Web.UI.Page&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; Protected Sub _Default_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim tf As New TemplateField()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tf.HeaderText = &quot;Custom Template Field Column&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tf.ItemTemplate = New MyCustomTemplate()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gvoutput.Columns.Add(tf)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; End Sub&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If Not Page.IsPostBack Then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim dt As New DataTable&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Columns.Add(&quot;id&quot;, GetType(Long))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Rows.Add(1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Rows.Add(2)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Rows.Add(3)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Rows.Add(4)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gvoutput.DataSource = dt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gvoutput.DataBind()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; End Sub&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; Protected Sub btnsubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsubmit.Click&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Try&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim a As Long = 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For i As Integer = 0 To gvoutput.Rows.Count - 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim row As GridViewRow = gvoutput.Rows(i)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim isChecked As Boolean = CType(row.FindControl(&quot;PageID&quot;), CheckBox).Checked&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If isChecked Then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a = a + 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Next&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Response.Write(a)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Catch ex As Exception&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End Try&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; End Sub&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;End Class&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/1119672969652450388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/1119672969652450388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/1119672969652450388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/1119672969652450388'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2012/11/how-to-create-template-columns.html' title='How to create template columns dynamically in a grid view'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7004123387151996883.post-16981794863574407</id><published>2012-11-03T12:21:00.003-07:00</published><updated>2012-11-03T12:21:52.068-07:00</updated><title type='text'>Display a certain number of rows to columns on crystal report</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;For example&lt;/b&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; height: 8pt; line-height: 18px; min-height: 8pt; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
SQL Rows&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; height: 8pt; line-height: 18px; min-height: 8pt; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Name&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Fred&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Jack&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Dan&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Bryan&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Chris&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Paul&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
William&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; height: 8pt; line-height: 18px; min-height: 8pt; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
This is what i need on the Crystal report&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; height: 8pt; line-height: 18px; min-height: 8pt; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
___Fred ___Jack ___Dan ___Bryan&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; height: 8pt; line-height: 18px; min-height: 8pt; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
___Chris ___Paul ___ William&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Solution:&lt;/b&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Here&#39;s what you need to do:&lt;/div&gt;
&lt;div style=&quot;border: 0px; height: 8pt; min-height: 8pt; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
1) Place the fields on the details section&lt;/div&gt;
&lt;div style=&quot;border: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
2) Go the Section Expert &amp;gt; select Details section &amp;gt; check &quot;Format with multiple columns&quot;&lt;/div&gt;
&lt;div style=&quot;border: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
3) Then go to the Layout tab in the same window, set the width to 2.00 inches (you would need to play with this depending on the size of field)&lt;/div&gt;
&lt;div style=&quot;border: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
4) Then check the option &quot;Across then Down&quot;&lt;/div&gt;
&lt;div style=&quot;border: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
5) To draw the line, simply use the Line Object before the field&lt;/div&gt;
&lt;div style=&quot;border: 0px; height: 8pt; min-height: 8pt; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nanthakumar2012.blogspot.com/feeds/16981794863574407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7004123387151996883/16981794863574407' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/16981794863574407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7004123387151996883/posts/default/16981794863574407'/><link rel='alternate' type='text/html' href='http://nanthakumar2012.blogspot.com/2012/11/display-certain-number-of-rows-to.html' title='Display a certain number of rows to columns on crystal report'/><author><name>Nanthakumar.T</name><uri>http://www.blogger.com/profile/07002701524654391264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3smbsoIb5KOh4tAoWeYVL_5Vkeyvs5puXGYx6eptleDPjVELQwTeR3Ip6V9zhaJrkBP0glbH3WqhJgPyyiKXstdlQpTlnQu83S1TkeoXwMJng-DszsdZ5Q7myc96Ovtg/s220/Photo1122.jpg'/></author><thr:total>0</thr:total></entry></feed>