<?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-3134229932700174553</id><updated>2024-08-27T22:12:27.949-07:00</updated><category term="jQuery"/><title type='text'>Dot Net Guide</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default?start-index=26&amp;max-results=25'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-990214004679860906</id><published>2011-01-15T09:20:00.000-08:00</published><updated>2011-01-15T09:20:01.308-08:00</updated><title type='text'>Beginning SQL Server 2005 Reporting Services Part 3: The Chart Control</title><content type='html'>&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;This is Part 3 of a four-part article series on SQL Server Reporting Services 2005 (SSRS).&amp;nbsp;&lt;a href=&quot;http://www.simple-talk.com/sql/learn-sql-server/beginning-sql-server-2005-reporting-services-part-1/&quot; style=&quot;color: #cc6633; text-decoration: none;&quot;&gt;Part 1&lt;/a&gt;&amp;nbsp;provided a step-by-step guide to basic report creation and&amp;nbsp;&lt;a href=&quot;http://www.simple-talk.com/sql/learn-sql-server/beginning-sql-server-2005-reporting-services-part-2/&quot; style=&quot;color: #cc6633; text-decoration: none;&quot;&gt;Part 2&lt;/a&gt;&amp;nbsp;took a tour of some of the core SSRS features and functions that you&#39;ll need to develop dynamic reports. Here, we turn our attention to the&amp;nbsp;&lt;b&gt;chart control&lt;/b&gt;&amp;nbsp;that ships with SSRS.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Microsoft&#39;s chart control is, in fact, a scaled-down version of the&amp;nbsp;&lt;a href=&quot;http://www.dundas.com/&quot; style=&quot;color: #cc6633; text-decoration: none;&quot;&gt;Dundas Chart Control&lt;/a&gt;. Scaled down or not, as far as built-in controls go, I have to say that this one is pretty impressive and feature-rich. For many people, this feature alone constitutes a pretty good reason to adopt SSRS.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;In this article we will set the chart control on a report and populate it. We will also cover the different charting display options and I&#39;ll demonstrate some rather cool formatting techniques.&lt;/div&gt;&lt;h3 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Getting Started&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Now that we have reached Part 3, I&#39;m going to assume that you&#39;ve installed all the software you need to follow through the examples, that you have created the&amp;nbsp;&lt;b&gt;ReportingDemo&lt;/b&gt;&amp;nbsp;database in SQL Server and have also mastered the basics of creating basic reports, data sources and datasets. If any of these assumptions make you feel nervous, please work your way through&amp;nbsp;&lt;a href=&quot;http://www.simple-talk.com/sql/learn-sql-server/beginning-sql-server-2005-reporting-services-part-1/&quot; style=&quot;color: #cc6633; text-decoration: none;&quot;&gt;Part 1&lt;/a&gt;&amp;nbsp;(at least) and then come back.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;b&gt;&lt;i&gt;NOTE:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;You can download the code file for this article from the&amp;nbsp;&lt;b&gt;Code Download&lt;/b&gt;&amp;nbsp;link in the speech bubble to the right of the article title. The code file contains a sample Visual Studio project with all the reports from this article, along with a&amp;nbsp;&lt;b&gt;.bak&lt;/b&gt;&amp;nbsp;file (or, alternatively, a SQL Script) for creating the&amp;nbsp;&lt;b&gt;ReportingDemo&lt;/b&gt;&amp;nbsp;database.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;b&gt;&lt;u&gt;Ed.Note:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;i&gt;The BAK file provided with part 1 of this series accidentally omitted the&amp;nbsp;&lt;b&gt;Purchase&lt;/b&gt;&amp;nbsp;table. If you created the&lt;b&gt;ReportingDemo&lt;/b&gt;&amp;nbsp;database from that BAK file (as I did) then you will need to run the provided ReportingDemo_Update script to create and populate the&amp;nbsp;&lt;b&gt;Purchase&lt;/b&gt;&amp;nbsp;table.&lt;/i&gt;&lt;/div&gt;&lt;h3 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Creating a basic chart&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Start by creating a new report server project (called&amp;nbsp;&lt;b&gt;ChartProject&lt;/b&gt;, or similar) and add a shared data source that points to your&amp;nbsp;&lt;b&gt;ReportingDemo&lt;/b&gt;&amp;nbsp;database. Add a new report called&amp;nbsp;&lt;b&gt;MyChart.rdl&lt;/b&gt;&amp;nbsp;to the project. Set up a data set for the report using the following query, which fetches various bits of information pertaining to customer purchases:&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;pre style=&quot;background-color: #e8e4ea; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px;&quot;&gt;SELECT
Purchase.PurchaseID,
Purchase.CustomerID,
Purchase.PurchaseDate,
Purchase.PurchaseType,
Purchase.PurchaseAmount, 
Customer.FirstName + &#39; &#39; + Customer.LastName AS CustomerName

FROM Purchase INNER JOIN
Customer
ON Purchase.CustomerID = Customer.CustomerID&lt;/pre&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;On your new report, drag the open content area out so that we have room to work and then drag a chart control onto the content area. It should look like this:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;i&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/297-gif1.gif&quot; title=&quot;&quot; /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;From the&amp;nbsp;&lt;b&gt;Dataset&lt;/b&gt;&amp;nbsp;fly-out window expand the dataset you created. Drag the&amp;nbsp;&lt;b&gt;PurchaseAmount&lt;/b&gt;&amp;nbsp;field into the area above the chart labeled&amp;nbsp;&lt;b&gt;Drop data fields here&lt;/b&gt;. Drag the&amp;nbsp;&lt;b&gt;PurchaseDate&lt;/b&gt;&amp;nbsp;field into the area below the chart labeled&amp;nbsp;&lt;b&gt;Drop category fields here&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;i&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/297-gif2.gif&quot; title=&quot;&quot; /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;We have now designed a report that will display the total value of customer purchases on a given date. Save the report and navigate to the&amp;nbsp;&lt;strong&gt;Preview&amp;nbsp;&lt;/strong&gt;tab to run the report. It should look like this:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;i&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/297-gif3.gif&quot; title=&quot;&quot; /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;If your requirements are fairly basic, then charting can be this easy.&lt;/div&gt;&lt;h3 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Chart types&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Before we delve deeper into the chart control, it&#39;s worth noting that this control can produce a variety of the different chart types. Simply right-click on the chart (in the&amp;nbsp;&lt;strong&gt;Layout&amp;nbsp;&lt;/strong&gt;tab) and use the&amp;nbsp;&lt;b&gt;Chart Type&lt;/b&gt;&amp;nbsp;option to select a new chart type. For the time being, switch to a&amp;nbsp;&lt;b&gt;Smooth Line&lt;/b&gt;&amp;nbsp;chart.&lt;/div&gt;&lt;h3 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Add a series&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;The&amp;nbsp;&lt;b&gt;Data fields&lt;/b&gt;&amp;nbsp;and the&amp;nbsp;&lt;b&gt;Category fields&lt;/b&gt;&amp;nbsp;make up the horizontal and vertical settings on the chart. The chart control can also layer multiple sets of data onto the same chart. Each layer is called a&amp;nbsp;&lt;b&gt;series&lt;/b&gt;. In this case the purchase data we are looking at pertains to two different customers. Drag the&amp;nbsp;&lt;b&gt;CustomerName&lt;/b&gt;&amp;nbsp;field into the area to the right of the grid called&amp;nbsp;&lt;b&gt;Drop series fields here&lt;/b&gt;. Switch to the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab and view the report, which displays each customer&#39;s spending patterns over the various dates:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;i&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/297-gif4.gif&quot; title=&quot;&quot; /&gt;&lt;/i&gt;&lt;/div&gt;&lt;h3 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Setting report properties&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Before we get started, change the chart type back to&amp;nbsp;&lt;b&gt;Simple&amp;nbsp;&lt;/b&gt;&lt;b&gt;Bar&lt;/b&gt;. Then, right-click on the chart again and select&amp;nbsp;&lt;b&gt;Properties&lt;/b&gt;. Here you can set all of the properties of the grid and you can also control nearly every aspect of how your data is displayed. Note that you can also manually set up&amp;nbsp;&lt;b&gt;Data&lt;/b&gt;,&amp;nbsp;&lt;b&gt;Categories&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;Series&lt;/b&gt;data, which we did via drag and drop previously. We are going to look at each tab of the&amp;nbsp;&lt;b&gt;Properties&lt;/b&gt;&amp;nbsp;dialog.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Please notice that as we look through the various options, you will see the &#39;&lt;b&gt;&lt;i&gt;fx&#39;&lt;/i&gt;&lt;/b&gt;&amp;nbsp;button nearly everywhere. This is used to set a property value with an expression rather than with a hard-coded value, as described in&amp;nbsp;&lt;a href=&quot;http://www.simple-talk.com/sql/learn-sql-server/beginning-sql-server-2005-reporting-services-part-2/&quot; style=&quot;color: #cc6633; text-decoration: none;&quot;&gt;Part 2&lt;/a&gt;.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;General tab&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/297-ScreenShot62.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;On this tab you can give your chart a&amp;nbsp;&lt;b&gt;Name&lt;/b&gt;. You can also set the chart type. When you click on&amp;nbsp;&lt;b&gt;Chart Area Style&lt;/b&gt;&amp;nbsp;you can set the properties for the background of the chart. The&amp;nbsp;&lt;b&gt;Plot Area Style&lt;/b&gt;&amp;nbsp;button allows you to modify basic properties for the chart itself. You can also add a&amp;nbsp;&lt;b&gt;Title&lt;/b&gt;&amp;nbsp;to your chart. You can set the title properties such as&amp;nbsp;&lt;b&gt;Font&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;Color,&lt;/b&gt;&amp;nbsp;using the button just to the right of the&amp;nbsp;&lt;b&gt;Title field&lt;/b&gt;. Another neat option is that you can apply a palette to the chart. Let&#39;s set the palette to&amp;nbsp;&lt;b&gt;Pastel&lt;/b&gt;. Click on&amp;nbsp;&lt;b&gt;Chart Area Style&lt;/b&gt;&amp;nbsp;and select the&amp;nbsp;&lt;b&gt;Fill&lt;/b&gt;&amp;nbsp;tab. Set the color to&amp;nbsp;&lt;b&gt;Thistle&lt;/b&gt;&amp;nbsp;and the&amp;nbsp;&lt;b&gt;Gradient&lt;/b&gt;&amp;nbsp;to&amp;nbsp;&lt;b&gt;TopBottom&lt;/b&gt;. The chart is easier on the eye already!&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Data tab&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/297-ScreenShot63.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;The&amp;nbsp;&lt;b&gt;Data&lt;/b&gt;&amp;nbsp;tab allows you to manually set up which data is displayed in the grid and how it is displayed. Just like on the chart, there are three areas for data:&amp;nbsp;&lt;b&gt;Values&lt;/b&gt;&amp;nbsp;(called&amp;nbsp;&lt;b&gt;Data Fields&amp;nbsp;&lt;/b&gt;in the drag and drop),&amp;nbsp;&lt;b&gt;Categories&lt;/b&gt;&amp;nbsp;and&lt;b&gt;Series&lt;/b&gt;. You can add and remove items in the different areas. Click on the&amp;nbsp;&lt;b&gt;Edit&lt;/b&gt;&amp;nbsp;buttons to set the specific property for each group you created.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Now we are going to take a closer look at the&amp;nbsp;&lt;b&gt;Values&lt;/b&gt;&amp;nbsp;properties in the&amp;nbsp;&lt;b&gt;Data&lt;/b&gt;&amp;nbsp;tab. Click the&amp;nbsp;&lt;b&gt;Edit&lt;/b&gt;&amp;nbsp;button next to the&amp;nbsp;&lt;b&gt;Values&lt;/b&gt;&amp;nbsp;field. The dialog will open to the&amp;nbsp;&lt;b&gt;Edit Chart Value&lt;/b&gt;&amp;nbsp;tab. On this tab you can set the field from the dataset the values of which will be displayed on the chart, and you can also give the series a name. The&lt;b&gt;Appearance&lt;/b&gt;&amp;nbsp;tab allows you to set point markers on your chart and control the style for the series. The&amp;nbsp;&lt;b&gt;Point Labels&lt;/b&gt;&amp;nbsp;give you the ability to set a data field or other expression to label the points on your grid. The&amp;nbsp;&lt;b&gt;Action&lt;/b&gt;&amp;nbsp;tab turns values into a hyperlink. You can jump to different places in the report or indeed to any valid URL. The URL can be hard-coded or set with an expression.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Let&#39;s open up the&amp;nbsp;&lt;b&gt;Point Labels&lt;/b&gt;&amp;nbsp;tab so that we can display the values of the purchases being charted right on the bars in the chart. Set the Data Label to the expression&amp;nbsp;&lt;b&gt;=Fields!PurchaseAmount.Value&lt;/b&gt;&amp;nbsp;and set the Format Code to C for currency. This will display the purchase amount directly on the grid bars in the $X.00 format. You can use the&amp;nbsp;&lt;strong&gt;Label Style&lt;/strong&gt;&amp;nbsp;to manipulate the font and the color of the label.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;X and Y axis tabs&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/297-ScreenShot64.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;These tabs allow you to set the values for the X and Y display. You can add a title which appears outside the chart area. You can also control the gridlines and the label formatting. Our X Axis is the purchase date. Let&#39;s get rid of the time in the purchase date by placing a &#39;d&#39; into the&amp;nbsp;&lt;b&gt;Format code&lt;/b&gt;&amp;nbsp;textbox. This tells the chart to format the date time value as mm/dd/yyyy. Let&#39;s check the&amp;nbsp;&lt;b&gt;Side Margins&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;Reversed&lt;/b&gt;&amp;nbsp;checkboxes. This will add some margin space to the chart and place the values on the top. On the&amp;nbsp;&lt;b&gt;Y Axis&lt;/b&gt;&amp;nbsp;tab check the&amp;nbsp;&lt;b&gt;Interlaced strips&lt;/b&gt;&amp;nbsp;option to break up the chart&#39;s background.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Legend tab&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/297-ScreenShot65.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;This tab allows you to control the legend on the chart. The first option you have is whether or not to show the legend at all. The layout option allows you to display the legend in either a single column, single row, or in a table of columns and rows. The position you use for your legend will likely determine which layout is best. For example, if you move the legend to the bottom position, you might want to use the&amp;nbsp;&lt;b&gt;Row&lt;/b&gt;&amp;nbsp;layout. Give it a go. The&amp;nbsp;&lt;b&gt;Legend Style&lt;/b&gt;&amp;nbsp;button opens a dialog that allows you to control the style of the legend itself.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;3D effect tab&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/297-ScreenShot66.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;This tab allows you to turn your flat chart into an exciting 3D experience.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;I love this tab! I could play around with these settings for hours. For the most part the default settings for each chart type look great. The four values that control the 3-D aspects of the chart are Horizontal Rotation, Perspective, Wall Thickness and Vertical Rotation. While it is fun to work with these to see what you can do, I suggest that you start with the defaults and use the slider for each value to see if you make the values on the chart readable. They work particularly well when you are working with a multi-layered 3-D chart like the one in this example.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;For this example set the following values:&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;295&quot;&gt;Horizontal Rotation&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;295&quot;&gt;65º&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;295&quot;&gt;Perspective&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;295&quot;&gt;0%&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;295&quot;&gt;Wall Thickness&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;295&quot;&gt;5%&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;295&quot;&gt;Vertical Rotation&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;295&quot;&gt;-5º&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Set the&amp;nbsp;&lt;b&gt;Shading&lt;/b&gt;&amp;nbsp;to&amp;nbsp;&lt;b&gt;Realistic&lt;/b&gt;. Check the&amp;nbsp;&lt;b&gt;Clustered&lt;/b&gt;&amp;nbsp;option to display each series on a different plane. Check the&amp;nbsp;&lt;b&gt;Cylinder&lt;/b&gt;&amp;nbsp;option to change the square bar on the chart into cylinders.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;After you&#39;ve had a chance to preview these settings, come back and play with the various settings. Believe me, you can make some incredible looking charts with the 3D settings.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Filter tab&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/297-ScreenShot67.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;This screen allows you to use the columns in your datasets, or expressions, to filter the data that is displayed on the grid. This could be applicable if you were displaying multiple charts on a single report. The important thing about the filter is that it allows you to show a subset of data from an existing dataset. For example, you could have multiple charts report off the same dataset, but each shows the purchases of a different purchase type.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Let’s display two charts in our report. One will report on Internet Sales and the other on In Store Sales. First copy the chart and paste the copy below the existing chart.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;For the top chart, open the properties tab and on the&amp;nbsp;&lt;strong&gt;General&amp;nbsp;&lt;/strong&gt;tab set the Title to &#39;Internet Sales&#39;. Now go to the&lt;strong&gt;Filters&amp;nbsp;&lt;/strong&gt;tab and set the filter:&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;&lt;b&gt;Expression&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;&lt;b&gt;Operator&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;&lt;b&gt;Value&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;=Fields!PurchaseType.Value&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;=&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;Internet&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Click Ok and close the properties window.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;For the bottom chart, open the properties tab and on the&amp;nbsp;&lt;strong&gt;General&amp;nbsp;&lt;/strong&gt;tab set the Title to &#39;In Store Sales&#39;. Now go to the&amp;nbsp;&lt;strong&gt;Filters&amp;nbsp;&lt;/strong&gt;tab and set the filter:&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;&lt;b&gt;Expression&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;&lt;b&gt;Operator&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;&lt;b&gt;Value&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;=Fields!PurchaseType.Value&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;=&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;In Store&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;h3 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;The Report&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Navigate to the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab and let&#39;s take a look at the final reports. As you can see, we create a report with two 3-D Charts displaying subsets of data from a single dataset. While the data for this article was kept necessarily simple to allow us to focus on the chart control itself, imagine what you can accomplish in your own reporting system.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/297-ScreenShot69.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;h3 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Wrap up&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;I hope this article has given you some insight into the chart control. Between the control&#39;s rich features and SSRS&#39;s ability to set nearly every property with an expression, you can now see that Microsoft has delivered an extremely powerful and user-friendly charting component in their reporting tool.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/990214004679860906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2011/01/beginning-sql-server-2005-reporting_2811.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/990214004679860906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/990214004679860906'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2011/01/beginning-sql-server-2005-reporting_2811.html' title='Beginning SQL Server 2005 Reporting Services Part 3: The Chart Control'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-2915470650369509772</id><published>2011-01-15T09:18:00.000-08:00</published><updated>2011-01-15T09:18:27.693-08:00</updated><title type='text'>Beginning SQL Server 2005 Reporting Services Part 2</title><content type='html'>&lt;div class=&quot;START&quot; style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;We will investigate:&lt;/div&gt;&lt;ul style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;li style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;&quot;&gt;Use of&amp;nbsp;&lt;b&gt;expressions&amp;nbsp;&lt;/b&gt;that allow you to dynamically control nearly every aspect of reporting from control properties to data binding&lt;/li&gt;
&lt;li style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;b&gt;Common functions&amp;nbsp;&lt;/b&gt;that allow run calculations and manipulate data within the report itself&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;strong&gt;Custom code,&amp;nbsp;&lt;/strong&gt;used to build your own library of functions within the report.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;We&#39;ll also set up a&amp;nbsp;&lt;b&gt;Matrix control&lt;/b&gt;&amp;nbsp;and create a&amp;nbsp;&lt;strong&gt;sub-report.&amp;nbsp;&lt;/strong&gt;Lastly, we will add some flair to the report by adding dynamic drills and sorting.&lt;/div&gt;&lt;h2 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 17px; line-height: 17px; margin-left: 0px;&quot;&gt;&lt;span style=&quot;color: #515151; font-size: 14pt;&quot;&gt;Getting started&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;In order to follow my examples, you will need to have SQL Server 2005, SQL Server 2005 Reporting Services, and Visual Studio 2005 correctly installed and configured. If you need some help with this, please refer back to the links in Part 1 of this series. Next, download the code file for this article (see the&amp;nbsp;&lt;strong&gt;Code Download&amp;nbsp;&lt;/strong&gt;link in the speech bubble to the right of the article title). The code file contains a sample Visual Studio project and a SQL Script for creating the&amp;nbsp;&lt;b&gt;ReportDemo&lt;/b&gt;&amp;nbsp;database. If you&#39;ve not done so already, go ahead and create the database using the&lt;strong&gt;ReportingDemoDatabaseScript.sql&lt;/strong&gt;&amp;nbsp;script or, alternatively, by restoring the provided&amp;nbsp;&lt;b&gt;ReportingDemo.bak&lt;/b&gt;&amp;nbsp;file.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Now start a new Business Intelligence project in Visual Studio 2005 (or using BIDS, which installs with SQL Server 2005). Select&amp;nbsp;&lt;strong&gt;Project&amp;nbsp;&lt;/strong&gt;|&amp;nbsp;&lt;strong&gt;Add Existing Item&amp;nbsp;&lt;/strong&gt;function to add to the project the shared datasource (&lt;b&gt;ReportDb.rds&lt;/b&gt;) and the sample report,&amp;nbsp;&lt;b&gt;FirstReportMan.rdl&lt;/b&gt;. Next, open up the shared datasource and set the server, database, login and password to point to your copy of the database. We will start with the&amp;nbsp;&lt;b&gt;FirstReportMan.rdl&lt;/b&gt;&amp;nbsp;report, so double-click on it in the solution explorer to load it into the designer.&lt;/div&gt;&lt;h3 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 15px; line-height: 17px; margin-left: 20px;&quot;&gt;&lt;span style=&quot;color: #515151; font-size: 14pt;&quot;&gt;Expressions&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;An expression is a short statement, written in code, which sets the value of a property. An expression can set the value of a property based on just about any data available in the report: parameters, report global values, fields in a dataset, and built-in functions.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;SSRS 2005 has made some drastic improvements in how expressions are created. It now supplies an intuitive expression editor. If you scroll through the&amp;nbsp;&lt;strong&gt;Properties&amp;nbsp;&lt;/strong&gt;window, you will notice that most of the properties of controls on the report can be hard-coded or can be set through expressions. (That&#39;s the&amp;nbsp;&lt;b&gt;&lt;expression&gt;&lt;/expression&gt;&lt;/b&gt;&amp;nbsp;option you see everywhere.) You will also see buttons labeled&amp;nbsp;&lt;b&gt;&lt;i&gt;fx&lt;/i&gt;&lt;/b&gt;&amp;nbsp;in the pop-up Properties dialog. These buttons will access the expression editor.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_01.gif&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;The expression feature makes SSRS 2005 into an incredibly versatile tool, because it allows most aspects of the report, from the data it shows to how it shows it, to behave dynamically. Rather than using a hard-coded value for a particular property, the SSRS resolves the expression to set the value for the property.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Looking at our report, let&#39;s say we want it to highlight all the customers from a particular State. We could use the expression:&lt;/div&gt;&lt;div class=&quot;LISTING&quot; style=&quot;background-color: #f2f2f2; border-bottom-color: rgb(202, 202, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(202, 202, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(202, 202, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(202, 202, 202); border-top-style: solid; border-top-width: 1px; color: #333333; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; font-weight: normal; line-height: 17px; margin-left: 20px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: left;&quot;&gt;=iif(Fields!State.Value = &quot;CA&quot;, &quot;Bold&quot;, &quot;Normal&quot;)&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;If we apply this expression to the detail row in the table and run the report it will bold the text for each row where the value of the State field is California. That&#39;s great if the data from California is all that you are interested in. However, it would be ridiculous to have one report for each state, so let&#39;s make this expression even more dynamic by adding a report parameter that will determine which State is highlighted when the report is run.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;First, let&#39;s add the new parameter to the report. Open the&amp;nbsp;&lt;b&gt;FirstReportMan.rdl&lt;/b&gt;&amp;nbsp;report and navigate to the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab. From the&amp;nbsp;&lt;b&gt;Report&lt;/b&gt;&amp;nbsp;menu select&amp;nbsp;&lt;b&gt;Report Parameters&lt;/b&gt;. When the dialog window opens, click the&amp;nbsp;&lt;b&gt;Add&lt;/b&gt;&amp;nbsp;button at the bottom of the screen. Call the new parameter &#39;HighlightState&#39; and set the available values as follows:&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; color: #333333; font-family: arial; font-size: 13px; line-height: 17px; margin-left: 20px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;&lt;b&gt;California&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;60&quot;&gt;&lt;b&gt;CA&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;&lt;b&gt;Florida&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;60&quot;&gt;&lt;b&gt;FL&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;&lt;b&gt;Louisiana&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;60&quot;&gt;&lt;b&gt;LA&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;&lt;b&gt;Illinois&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;60&quot;&gt;&lt;b&gt;IL&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;&lt;b&gt;Texas&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;60&quot;&gt;&lt;b&gt;TX&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Now click on&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;em&gt;&lt;strong&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;Note:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
You&#39;ll see that when setting up a list of pre-defined values for a parameter that there is a &#39;From Query&#39; option. You can use this option by defining a dataset on the data tab of the report designer. For example, if we had a State table in the database we could define a dataset to retrieve the data for the parameter dropdown from that table. Once you choose the &#39;From Query&#39; option, you select the dataset, the value field (this is the field from the dataset that contains the value passed to the report) and the label field (the field from the dataset that contains the value displayed to the user when they are prompted for parameters).&lt;/em&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;The next step is to set up the expression. Click on the table control on the report. When the table control is selected, an extra control tab appears at the top and left of the table. Click on the little &#39;row maker&#39; icon, just to the left of the detail row. This allows you to set properties for the entire row. In the properties window select&lt;b&gt;&amp;nbsp;FontWeight&lt;/b&gt;&amp;nbsp;and choose&amp;nbsp;&lt;b&gt;&lt;expression&gt;&lt;/expression&gt;&lt;/b&gt;&amp;nbsp;from the drop-down list to open the expression editor. Typing&amp;nbsp;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;=iif(&lt;/span&gt;&amp;nbsp;should give you Intellisense. You can use the expression builder to create the following line of code:&lt;/div&gt;&lt;div class=&quot;LISTING&quot; style=&quot;background-color: #f2f2f2; border-bottom-color: rgb(202, 202, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(202, 202, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(202, 202, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(202, 202, 202); border-top-style: solid; border-top-width: 1px; color: #333333; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; font-weight: normal; line-height: 17px; margin-left: 20px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: left;&quot;&gt;=iif(Fields!State.Value = Parameters!HighlightState.Value, &quot;Bold&quot;, &quot;Normal&quot;)&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_02.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;The&amp;nbsp;&lt;b&gt;iif&amp;nbsp;&lt;/b&gt;is a flow control statement commonly used in SSRS expressions. Its format is:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;i&gt;iif&lt;b&gt;&amp;nbsp;&lt;/b&gt;(boolean statement, true result, false result)&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;If the boolean statement is true, then the true result is returned, and if not, the false result is returned. In this case, the boolean statement is asking: &#39;Does the state code equal the state code that was passed to the report? If it does, return the word &#39;bold&#39;. If it does not, return the word &#39;normal&#39;&#39;. The value returned is then used to set the property for that instance of the row.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Now switch to the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab and select a State to highlight. When the report runs, all the rows with customers from the selected State should be displayed in bold.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #515151; font-size: 14pt;&quot;&gt;Common functions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Let&#39;s navigate back to the expression editor. In the bottom half of the screen there are three columns. The first column lists different categories for building expressions. The last option is&amp;nbsp;&lt;b&gt;Common Functions&lt;/b&gt;. Expand the&lt;b&gt;Common Functions&lt;/b&gt;&amp;nbsp;node. Click on the&amp;nbsp;&lt;b&gt;Date &amp;amp; Time&lt;/b&gt;&amp;nbsp;category. In the next column, double-click on one of the functions. You will see that it is added to the expression box at the top of the dialog box. Next, simply put the cursor in the expression box after the function. If you then type&amp;nbsp;in the opening left bracket&amp;nbsp;you should instantly see Intellisense for the function you selected.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_03.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Let&#39;s use the&amp;nbsp;&lt;b&gt;Year&lt;/b&gt;&amp;nbsp;function in the report to display only the year in which someone was born, instead of their full birth date. Right-click on the field that displays the date of birth and select&amp;nbsp;&lt;b&gt;Properties.&amp;nbsp;&lt;/b&gt;On the&amp;nbsp;&lt;b&gt;General tab,&lt;/b&gt;&amp;nbsp;find the&lt;b&gt;Value&lt;/b&gt;&amp;nbsp;field and click the&amp;nbsp;&lt;b&gt;&lt;i&gt;fx&lt;/i&gt;&lt;/b&gt;&amp;nbsp;button to bring up the expression editor. Change expression to read.&lt;/div&gt;&lt;div class=&quot;LISTING&quot; style=&quot;background-color: #f2f2f2; border-bottom-color: rgb(202, 202, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(202, 202, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(202, 202, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(202, 202, 202); border-top-style: solid; border-top-width: 1px; color: #333333; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; font-weight: normal; line-height: 17px; margin-left: 20px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: left;&quot;&gt;=Year(Fields!DateOfBirth.Value)&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;There we have it. It&#39;s a good idea to preview the report now.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Also of note here are the aggregate functions. These functions assist you in working with all of the data in a dataset. For example, let&#39;s say your report is an order form with a list of items and their prices. You can use the&lt;b&gt;Sum&lt;/b&gt;&amp;nbsp;function on the&amp;nbsp;&lt;b&gt;Price&lt;/b&gt;&amp;nbsp;field to create a total price on the report. In a different example, if you had a report that listed all the purchase dates and the total amount of each purchase, you could use the&amp;nbsp;&lt;b&gt;AVG&lt;/b&gt;&amp;nbsp;function to get the average purchase price for that customer.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #515151; font-size: 14pt;&quot;&gt;Global variables&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Let&#39;s go back again to the expression editor. This time, click on&amp;nbsp;&lt;b&gt;Globals&lt;/b&gt;&amp;nbsp;in the first column of the expression editor. In the second column, you will see the list of the global variables that are provided to the report.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;In this example, we are going to use the global variables to create a page-numbering scheme for our report. First, add a footer to the&amp;nbsp;&lt;b&gt;FirstReportMan.rdl&lt;/b&gt;&amp;nbsp;report. You enable this by going to the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab and selecting the&amp;nbsp;&lt;b&gt;Report Footer&lt;/b&gt;&amp;nbsp;option from the&amp;nbsp;&lt;b&gt;Report&lt;/b&gt;&amp;nbsp;main menu. Now that you have a footer, drag four text boxes into the footer section. Set their font properties to 8 pt, bold. Set the text for each text box as follows:&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; color: #333333; font-family: arial; font-size: 13px; line-height: 17px; margin-left: 20px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;&lt;b&gt;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;Page&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;&lt;b&gt;=Globals!PageNumber&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;&lt;b&gt;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;of&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot;&gt;&lt;td style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;&lt;b&gt;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;=Globals!TotalPages&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Switch to the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab and run the report. You will now have a footer on each page that looks something like &#39;Page 1 of 5&#39;.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Some other globals worth noting are:&lt;/div&gt;&lt;ul style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot; type=&quot;disc&quot;&gt;&lt;li style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;b&gt;ExecutionTime&lt;/b&gt;&amp;nbsp;– this tells you how long it took to run the report&lt;/li&gt;
&lt;li style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;b&gt;ReportServerUrl&lt;/b&gt;&amp;nbsp;– this allows you to verify that you are getting your report from the correct source&lt;/li&gt;
&lt;li style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;b&gt;UserID&lt;/b&gt;&amp;nbsp;- this shows under which User ID the report was run&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;You can use these global variables to build some basic diagnostics into your reporting. You could also add these variables to the report footer and use a parameter to hide or show them. That way, even in production, your users can see a tidy, clean report, but you can see the same report with all the extra information on it.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #515151; font-size: 14pt;&quot;&gt;Custom functions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;There are about 100 common functions in SSRS 2005, and they can handle most of what you will need to do. Occasionally, however, you will still need to set an expression with more control than the common functions can manage. So, to make SSRS even more flexible, you can write custom VB.NET or C# functions and use them in expressions.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Now we are going to add a custom function to the&amp;nbsp;&lt;b&gt;FirstReportMan.rdl&lt;/b&gt;&amp;nbsp;report.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Open the report and navigate to the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab. From the&amp;nbsp;&lt;b&gt;Report&lt;/b&gt;&amp;nbsp;menu select&amp;nbsp;&lt;b&gt;Report Properties&lt;/b&gt;&amp;nbsp;and then jump to the&amp;nbsp;&lt;b&gt;Code&lt;/b&gt;&amp;nbsp;tab. We are going to write a custom function that returns a different color, depending on the value that is passed to it. We will then use that function to set the background color for the status field in the report detail table.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Copy the following code into the code window:&lt;/div&gt;&lt;div class=&quot;LISTING&quot; style=&quot;background-color: #f2f2f2; border-bottom-color: rgb(202, 202, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(202, 202, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(202, 202, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(202, 202, 202); border-top-style: solid; border-top-width: 1px; color: #333333; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; font-weight: normal; line-height: 17px; margin-left: 20px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: left;&quot;&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;Public Function GetColor(ByVal status as String) as String&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;IF status = &quot;100&quot; Then&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;Return &quot;White&quot;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;End IF&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;IF status = &quot;101&quot; Then&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;Return &quot;Yellow&quot;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;End IF&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;IF status = &quot;102&quot; Then&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;Return &quot;Tomato&quot;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;End IF&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;End Function&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Click&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;&amp;nbsp;and close the window.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;em&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/span&gt;The full list of available colors is found in the&amp;nbsp;&lt;b&gt;Color&lt;/b&gt;&amp;nbsp;dropdown list in the properties window.&lt;/em&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Now that we have a function that returns color names we need to wire up that function to an expression. Click on the&amp;nbsp;&lt;b&gt;Customer Status&lt;/b&gt;&amp;nbsp;cell and open the&amp;nbsp;&lt;b&gt;Properties&lt;/b&gt;&amp;nbsp;window. Find the&amp;nbsp;&lt;b&gt;Background Color&lt;/b&gt;&amp;nbsp;property and choose&lt;b&gt;Expression&lt;/b&gt;&amp;nbsp;from the dropdown. Add the following line of code to create an expression:&lt;/div&gt;&lt;div class=&quot;LISTING&quot; style=&quot;background-color: #f2f2f2; border-bottom-color: rgb(202, 202, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(202, 202, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(202, 202, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(202, 202, 202); border-top-style: solid; border-top-width: 1px; color: #333333; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; font-weight: normal; line-height: 17px; margin-left: 20px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: left;&quot;&gt;=code.GetColor(Fields!CustomerStatus.Value)&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;When the report runs and this expression is resolved, SSRS will call your&amp;nbsp;&lt;b&gt;GetColor&lt;/b&gt;&amp;nbsp;function and pass the value of the customer status for that instance of the row to the function. The function takes over and decides which color should be returned. SSRS then uses that value as the value for the background property for that cell.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_04.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Please note that custom functions must be called using&amp;nbsp;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;=code.&lt;myfunction&gt;&lt;/myfunction&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Now navigate to the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab and run the report..&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #515151; font-size: 14pt;&quot;&gt;Subreports&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;A subreport is a report that is embedded into another report. Subreports can take parameters and execute their own datasets. A key aspect to note is that a subreport in SSRS is actually just another report (unlike some reporting tools, where a subreport is a special construct). In fact, in SSRS you can execute a subreport on its own.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;To add a subreport to a report, you simply drag a subreport control onto the report and tell it which report to display. If the subreport requires parameters, you have to tell the main report which value to pass to the subreport. It&#39;s actually very simple.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Let&#39;s add a new report to the project and call it&amp;nbsp;&lt;b&gt;MainReport.rdl&lt;/b&gt;. Create a new dataset using the shared datasource and the query:&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;LISTING&quot; style=&quot;background-color: #f2f2f2; border-bottom-color: rgb(202, 202, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(202, 202, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(202, 202, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(202, 202, 202); border-top-style: solid; border-top-width: 1px; color: #333333; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; font-weight: normal; line-height: 17px; margin-left: 20px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: left;&quot;&gt;SELECT CustomerID, FirstName, LastName FROM Customer&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Switch to the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab. Drag a table on the report detail area. Set up the first column to display the customer&#39;s first name (by dragging that column from the Datasets tab into the Detail row) and set up the second column to display the customer&#39;s last name. Label the third column &#39;Address&#39;. Preview the report, just to be sure it works.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Create another report, and call this one&amp;nbsp;&lt;b&gt;MySubReport.rdl&lt;/b&gt;. This time, create a dataset that uses the shared data source, and use the following query text:&lt;/div&gt;&lt;div class=&quot;LISTING&quot; style=&quot;background-color: #f2f2f2; border-bottom-color: rgb(202, 202, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(202, 202, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(202, 202, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(202, 202, 202); border-top-style: solid; border-top-width: 1px; color: #333333; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; font-weight: normal; line-height: 17px; margin-left: 20px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: left;&quot;&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;SELECT Address, City, State, ZipCode&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;FROM Customer&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 20px; margin-top: 0px; text-align: left;&quot;&gt;WHERE (CustomerID = @CustomerID)&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;In the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab, use text boxes to create the address layout, as shown in figure 5. You can simply drag the text boxes onto the screen by clicking on the field in datasets tab and dragging it onto design surface. You will also note that when you do this, the expression used to set the value property for the textbox uses the&amp;nbsp;&lt;b&gt;First()&lt;/b&gt;&amp;nbsp;function. This function will use the value from the first row returned by the dataset. All other rows returned are ignored.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_05.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Now preview the report and use &#39;100&#39; for the&amp;nbsp;&lt;b&gt;CustomerID&lt;/b&gt;&amp;nbsp;parameter.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Let&#39;s jump back to the&amp;nbsp;&lt;b&gt;MainReport.rdl&lt;/b&gt;. To embed the subreport, drag a&amp;nbsp;&lt;b&gt;SubReport&lt;/b&gt;&amp;nbsp;control into the detail cell for the column you labeled &#39;Address&#39;. Right-click on the&amp;nbsp;&lt;b&gt;SubReport&lt;/b&gt;&amp;nbsp;control and select&amp;nbsp;&lt;b&gt;Properties&lt;/b&gt;. In the&amp;nbsp;&lt;b&gt;Properties&lt;/b&gt;&amp;nbsp;dialog choose&amp;nbsp;&lt;b&gt;MySubReport&lt;/b&gt;&amp;nbsp;from the subreport dropdown.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_06.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Next, switch to the&amp;nbsp;&lt;b&gt;Parameters&lt;/b&gt;&amp;nbsp;tab. This is where you connect your subreport to the main report. You do this by indicating which value from the main report is to be passed to the subreport to fulfill its parameter requirements.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;In the&amp;nbsp;&lt;b&gt;Parameter Name&lt;/b&gt;&amp;nbsp;column choose&amp;nbsp;&lt;b&gt;CustomerID&lt;/b&gt;&amp;nbsp;and in the&amp;nbsp;&lt;b&gt;Parameter Value&lt;/b&gt;&amp;nbsp;column choose&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;=Fields!CustomerID.Value&lt;/span&gt;. This will wire up the subreport to whichever customer is being displayed in the row of the table.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_07.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Click&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;&amp;nbsp;to close the dialog, and then preview the main report.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #515151; font-size: 14pt;&quot;&gt;The Matrix&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;It&#39;s this question that drives us, Neo.&amp;nbsp;What is the Matrix? OK, I&#39;ll stop right here. You can insert your own slam to the second two movies. However, there is a really cool control in SSRS called the&amp;nbsp;&lt;b&gt;Matrix control&lt;/b&gt;. The Matrix is used to create pivot table style reports. We are going to set up a simple&amp;nbsp;&lt;b&gt;Matrix control&lt;/b&gt;&amp;nbsp;to show us which customers, in which State, have which status.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;First, start a new report called&amp;nbsp;&lt;b&gt;MatrixReport.rdl&lt;/b&gt;. Add our standard dataset where you use the shared data source, and then add the&amp;nbsp;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;Select&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;*&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;Customer&lt;/span&gt;&amp;nbsp;query.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Navigate to the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab and drag a new Matrix control onto the page. Where it says&amp;nbsp;&lt;b&gt;Rows&lt;/b&gt;, drag the&amp;nbsp;&lt;b&gt;State&lt;/b&gt;&amp;nbsp;field from the dataset. Where it says&amp;nbsp;&lt;b&gt;Columns&lt;/b&gt;, drag the&amp;nbsp;&lt;b&gt;CustomerStatus&lt;/b&gt;&amp;nbsp;field from the dataset. Drag first name and last name into the data area on the Matrix control. After a little formatting, it should resemble this:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_08.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;When the report runs, it looks like this:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_09.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #515151; font-size: 14pt;&quot;&gt;Adding drill downs&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;The drill down functionality in SSRS allows you to have areas of your report that can expand and collapse, much like a tree view.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;First, start a new report called&amp;nbsp;&lt;b&gt;AdvancedTable.rdl&lt;/b&gt;. Add our standard dataset, where you use the shared data source and the&amp;nbsp;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;Select&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;*&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;Customer&lt;/span&gt;&amp;nbsp;query.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Navigate to the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab and drag a new table control onto the page. The first thing we need to do is to add a group to the table. Click the table to highlight it, then right-click on the little box with three horizontal lines in it that appear at the left side of the table at the beginning of detail row. Select&amp;nbsp;&lt;b&gt;Insert Group&lt;/b&gt;. When the Group Dialog appears use =Fields!State.Value as the expression, so that the report now groups on State. Now drag the State field into the first column on the Group row. Next, drag the&amp;nbsp;&lt;b&gt;First Name&lt;/b&gt;,&amp;nbsp;&lt;b&gt;Last Name&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;City&lt;/b&gt;&amp;nbsp;fields into the detail row. Add some formatting, and preview the report.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_10.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;We&#39;ve now performed a grouping, but we still have to enable the drilldown. Click on the table to highlight it. Right-click on the nub that appears, just to the left of the detail row. Select&amp;nbsp;&lt;b&gt;Properties&lt;/b&gt;. When the Properties window opens, expand the visibility section. Set the&amp;nbsp;&lt;b&gt;Hidden&amp;nbsp;&lt;/b&gt;property to&amp;nbsp;&lt;b&gt;True&lt;/b&gt;&amp;nbsp;and set the&amp;nbsp;&lt;b&gt;ToggleItem&lt;/b&gt;&amp;nbsp;property to&amp;nbsp;&lt;b&gt;State&lt;/b&gt;. The&lt;b&gt;Hidden&lt;/b&gt;&amp;nbsp;property determines the state of the row when the report is first run. If we set it to&amp;nbsp;&lt;b&gt;True&lt;/b&gt;&amp;nbsp;then the data is collapsed and hidden. By setting the&amp;nbsp;&lt;b&gt;ToggleItem&lt;/b&gt;&amp;nbsp;property to&amp;nbsp;&lt;b&gt;Statee&lt;/b&gt;, when the report is run a little + sign appears next to it when the report is run and it works like a tree view.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Switch to the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab and run the report. Now only the States appear, but you can see the customer in each State by using the tree-style +/- controls.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_11.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #515151; font-size: 14pt;&quot;&gt;Adding dynamic sorting&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;It is incredibly easy to add sorting to your table. Let&#39;s re-open the&amp;nbsp;&lt;b&gt;FirstReportMan.rdl&lt;/b&gt;&amp;nbsp;report. Navigate to the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;tab of the report designer. Click in the cell labeled&amp;nbsp;&lt;b&gt;First Name&lt;/b&gt;&amp;nbsp;in the header of the table. Right-click and select&lt;b&gt;Properties&lt;/b&gt;. Switch to the&amp;nbsp;&lt;b&gt;Interactive Sort&lt;/b&gt;&amp;nbsp;tab. Check the checkbox for &#39;Add an interactive sort action to this textbox&#39;. Next, set the&amp;nbsp;&lt;b&gt;Sort&lt;/b&gt;&amp;nbsp;expression to the value that is displayed in the column – in this case&lt;span class=&quot;CodeInText&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospaced; font-weight: bold;&quot;&gt;=Fields!FirstName.Value&lt;/span&gt;. Now repeat this process for the rest of the report.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_12.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Preview the report, and you should have interactive sorting on each column.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/278-SSRSPt2_13.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #515151; font-size: 14pt;&quot;&gt;Wrap up&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;I hope this look into some of the more advanced features of SQL Server Reporting Services 2005 will help you make your reports more interactive and better adapted for your users. In Part 3, we will take an in-depth look at the chart control and its diverse set-up functionality.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/2915470650369509772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2011/01/beginning-sql-server-2005-reporting_15.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/2915470650369509772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/2915470650369509772'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2011/01/beginning-sql-server-2005-reporting_15.html' title='Beginning SQL Server 2005 Reporting Services Part 2'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-7161308550144538402</id><published>2011-01-15T09:16:00.000-08:00</published><updated>2011-01-15T09:16:12.721-08:00</updated><title type='text'>Beginning SQL Server 2005 Reporting Services Part 1</title><content type='html'>&lt;div class=&quot;START&quot; style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style=&quot;font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 17px; margin-left: 0px;&quot;&gt;Building and deploying basic reports&lt;/h2&gt;&lt;br /&gt;
&lt;div class=&quot;START&quot; style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;If ever there was job for &quot;real&quot; developers to shuffle to their juniors, it is building reports. It&#39;s not real development anyway; it&#39;s more like glorified formatting. Besides, the esoteric tools that you use to build reports try to provide an abstraction layer, which often prevents you from having any real control over the report. I&#39;ve heard all these arguments before. If this sounds like a conversation you&#39;ve had by the water cooler, then I invite you to take a closer look at SQL Server 2005 Reporting Services (SSRS).&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;SSRS 2005 is the latest version of SQL Reporting Services, and ships with all versions of SQL Server 2005. SSRS allows you to quickly and easily create reports from multiple database sources. The finished reports can be presented directly from the reporting services website, or they can be displayed in your web- or Windows-based applications. Reports can be exported to multiple formats, including comma delimited text, XML, portable document format (pdf) and Microsoft Excel.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;This article is the first of four parts, which will provide in-depth coverage of SQL Server 2005 Reporting Services:&lt;/div&gt;&lt;ul style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot; type=&quot;disc&quot;&gt;&lt;li style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;b&gt;Part 1&lt;/b&gt;&amp;nbsp;covers the basics of the SSRS. It demonstrates how to build quick, simple reports and will familiarize you with the basic Report Designer environment&lt;/li&gt;
&lt;li style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;b&gt;Part 2&lt;/b&gt;&amp;nbsp;will cover use of custom functions, aggregate functions, sub-reporting, the matrix control, drill-downs, and sorting.&lt;/li&gt;
&lt;li style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;b&gt;Part 3&lt;/b&gt;&amp;nbsp;will take an in-depth look at the charting control&lt;/li&gt;
&lt;li style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;&quot;&gt;&lt;b&gt;Part 4&lt;/b&gt;&amp;nbsp;digs into the actual Report Definition Language (RDL) and the new Report Builder tool.&lt;/li&gt;
&lt;/ul&gt;&lt;h3 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 15px; line-height: 17px; margin-left: 20px;&quot;&gt;Installing and configuring Reporting Services&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;After much debate, we decided that full installation and configuration details were outside the scope of an article focused on how to build basic reports using SSRS, especially as there are already several online resources that treat this area in detail. See, for example:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms143736.aspx&quot; style=&quot;color: #cc6633; text-decoration: none;&quot;&gt;http://msdn2.microsoft.com/en-us/library/ms143736.aspx&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;and&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;a href=&quot;http://www.awprofessional.com/articles/article.asp?p=357694&amp;amp;seqNum=1&amp;amp;rl=1&quot; style=&quot;color: #cc6633; text-decoration: none;&quot;&gt;http://www.awprofessional.com/articles/article.asp?p=357694&amp;amp;seqNum=1&amp;amp;rl=1&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Well worth reviewing are the details in the latter on the need to install SSL on any machine hosting SSRS.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;i&gt;---&lt;strong&gt;Editor&#39;s installation notes&lt;/strong&gt;---&lt;/i&gt;In order to test the reports in this article, I went through a single-machine installation on Windows XP (meaning that SQL Server 2005, Reporting Services, and much more, are all installed on my poor laptop). Since I didn&#39;t install SSRS when I installed SQL Server 2005 (I didn&#39;t have IIS installed at the time), I had to first install IIS 5.1, and then Reporting Services (from the SS2005 disks). I then jumped immediately into Reporting Services Configuration Manager tool (All Programs ¬ SQL Server 2005 ¬ Configuration tools). The left panel acts as a sort of checklist of items to configure:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot1.gif&quot; title=&quot;Figure 1&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;All went well until the&amp;nbsp;&lt;b&gt;Database Setup&lt;/b&gt;. Because I had not installed SSRS at the same time that I installed SQL Server, the&amp;nbsp;&lt;b&gt;ReportServer&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;ReportServerTempDB&lt;/b&gt;&amp;nbsp;were not created by default. These databases hold all the report definitions and reporting server configuration information. Connecting to SQL Server using&amp;nbsp;&lt;b&gt;Service Credentials&lt;/b&gt;, the databases appeared to be created, but I received an error suggesting that I didn&#39;t have permissions to perform the requested task, and a red cross remained next to the&amp;nbsp;&lt;b&gt;Database Setup&lt;/b&gt;&amp;nbsp;icon. This had me stumped for a while – eventually I appeared to solve it by hopping to the&amp;nbsp;&lt;b&gt;Server Status&lt;/b&gt;&amp;nbsp;section, stopping the Report Server, opening SSMS and deleting both the&amp;nbsp;&lt;b&gt;ReportServer&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;ReportServerTempDB&lt;/b&gt;&amp;nbsp;databases, and then restarting the Report Server and trying again! Even though I swear this didn&#39;t work the first time I tried it, it seemed to do the trick the second time (while I was on the phone moaning to Steve that I couldn&#39;t get it to work!). However, I&#39;m still not clear why I had the problem in the first place – or why it suddenly went away.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;This wasn&#39;t quite the end of my problems. Installing SSRS creates two new virtual directories under the default website on IIS. By default, they are named&amp;nbsp;&lt;b&gt;Reports&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;ReportServer&lt;/b&gt;. The&amp;nbsp;&lt;b&gt;ReportServer&lt;/b&gt;&amp;nbsp;site hosts a web service for running and managing reports. The&amp;nbsp;&lt;b&gt;Reports&lt;/b&gt;&amp;nbsp;site allows you upload reports from a browser and run reports over the web. When I tried to navigate to&amp;nbsp;&lt;span class=&quot;ScreenText&quot; style=&quot;color: #888888; font-family: &#39;Century Gothic&#39;, Tahoma, &#39;Lucida Sans&#39;, sans-serif; font-weight: bold;&quot;&gt;http://localhost/ReportServer&lt;/span&gt;&amp;nbsp;I received the following error: &quot;Failed to access IIS metabase&quot;. Fortunately, the information on the error page is quite useful (for a change) and this, coupled with a quick Google search, led me to grant access to the metabase to the ASPNET user account by executing the following from the directory housing the&amp;nbsp;&lt;b&gt;aspnet_regiis&amp;nbsp;&lt;/b&gt;executable (WINDOWS\Microsoft.NET\Framework\v2.0.50727, in my case):&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;&lt;pre style=&quot;background-color: #f2f2f2; border-bottom-color: silver; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: silver; border-left-style: solid; border-left-width: 1px; border-right-color: silver; border-right-style: solid; border-right-width: 1px; border-top-color: silver; border-top-style: solid; border-top-width: 1px; font-size: 12px; font-weight: normal; margin-left: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;spnet_regiis -ga ASPNET&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;
&lt;/div&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;This did the trick, and I was up and running. I received some raised eyebrows here when I proposed to install SSRS. It made my long-suffering sys admin team particularly nervous. The 2000 version of SSRS seems to have a very bad reputation among the Red Gate team, both as a performance nightmare, and in one case for &quot;completely annihilating&quot; a developer&#39;s machine. However, the above slight quirks aside, the SSRS 2005 experience seems pretty smooth and I&#39;ve had no real performance, or other, issues. So far.&lt;br /&gt;
&lt;i&gt;-----&lt;strong&gt;End of Editor&#39;s note&lt;/strong&gt;----&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Once you&#39;ve completed the installation and configuration process, the first thing to do is download the code file for this article (see the Code Download link in the speech bubble to the right of the article title). The code file contains a sample Visual Studio project and a SQL Script for creating the&amp;nbsp;&lt;b&gt;ReportDemo&lt;/b&gt;&amp;nbsp;database. You will need this database if you want to follow the examples in this series of articles so go ahead and create the database using the&amp;nbsp;&lt;strong&gt;ReportingDemoDatabaseScript.sql&lt;/strong&gt;&amp;nbsp;script or, alternatively, by restoring the provided ReportingDemo.bak file.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;If you are using SQL Server Authentication on your SQL Server you will also need to set up a login with permissions to the&amp;nbsp;&lt;b&gt;ReportDemo&lt;/b&gt;&amp;nbsp;database (for the examples, I set up a login called&amp;nbsp;&lt;b&gt;DemoUser&lt;/b&gt;&amp;nbsp;as a DBO on my ReportDemo database).&lt;/div&gt;&lt;h3 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 15px; line-height: 17px; margin-left: 20px;&quot;&gt;Using the Report Wizard&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;There are two ways to create SSRS Reports. You can build the report manually, or you can use the Report Wizard to give yourself a head start. For this first report, we are going to take advantage of the wizard. Start a new Business Intelligence project in Visual Studio 2005. Then, from the menu, select&amp;nbsp;&lt;b&gt;Project &amp;gt; Add New Item&lt;/b&gt;. Select the&amp;nbsp;&lt;b&gt;Report Wizard&lt;/b&gt;&amp;nbsp;option and call the file &quot;FirstReportWZ.rdl&quot;. Click&amp;nbsp;&lt;b&gt;Add&lt;/b&gt;. Click&amp;nbsp;&lt;b&gt;Next&lt;/b&gt;&amp;nbsp;on the Welcome screen and this will bring you to the&amp;nbsp;&lt;b&gt;Select the Data Source&lt;/b&gt;&amp;nbsp;screen:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot2.gif&quot; title=&quot;Figure 2&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Select the&amp;nbsp;&lt;b&gt;New data source&lt;/b&gt;&amp;nbsp;radio button and give the data source a name. Select&amp;nbsp;&lt;b&gt;Microsoft SQL Server&lt;/b&gt;&amp;nbsp;as the type.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Note:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;i&gt;Use of the&amp;nbsp;&lt;b&gt;Shared data source&lt;/b&gt;&amp;nbsp;option is actually a better option in most cases but, for the sake of this example, we will just create a new data source. We&#39;re going to set up a shared data source later in this article.&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Click the&amp;nbsp;&lt;b&gt;Edit&lt;/b&gt;&amp;nbsp;button to bring up the Connection Properties dialog:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot3.gif&quot; title=&quot;Figure 3&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Enter or select a server name. The default is to log on using&amp;nbsp;&lt;b&gt;Windows Authentication&lt;/b&gt;. If you are using&amp;nbsp;&lt;b&gt;SQL Server Authentication&lt;/b&gt;, choose that setting, and enter the username and password. Finally, select a database, in this case&lt;b&gt;ReportingDemo&lt;/b&gt;. Make sure you test the connection before you click&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Next up is the Design the Query screen. You can use the Query Builder by clicking the button at the top left, but in this case simply enter &quot;Select * From Customer&quot; into the&amp;nbsp;&lt;b&gt;Query string&lt;/b&gt;&amp;nbsp;text box and click Next. On the&amp;nbsp;&lt;b&gt;Select the Report Type&lt;/b&gt;&amp;nbsp;simply select the type you prefer (tabular or matrix) and hit&amp;nbsp;&lt;b&gt;Next&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;This brings up the&amp;nbsp;&lt;b&gt;Design the Table&lt;/b&gt;&amp;nbsp;screen:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot4.gif&quot; title=&quot;Figure 4&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Select&amp;nbsp;&lt;b&gt;State&lt;/b&gt;&amp;nbsp;in the&amp;nbsp;&lt;b&gt;Available fields&lt;/b&gt;&amp;nbsp;box and click the&amp;nbsp;&lt;b&gt;Group&lt;/b&gt;&amp;nbsp;button. This will group the data in the result set by&amp;nbsp;&lt;b&gt;State&lt;/b&gt;. Select&amp;nbsp;&lt;b&gt;Next&lt;/b&gt;. On the&amp;nbsp;&lt;b&gt;Choose the Table Layout&lt;/b&gt;&amp;nbsp;page, select the&amp;nbsp;&lt;b&gt;Stepped&lt;/b&gt;&amp;nbsp;option and check the&amp;nbsp;&lt;b&gt;Enable Drilldown&lt;/b&gt;checkbox. On the next screen, choose a style for your report (I chose&amp;nbsp;&lt;b&gt;Ocean&lt;/b&gt;) and click&amp;nbsp;&lt;b&gt;Next&lt;/b&gt;.&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;This brings up the final screen,&amp;nbsp;&lt;b&gt;Completing the Wizard&lt;/b&gt;:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot5.gif&quot; title=&quot;Figure 5&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;It shows a summary of your report options, and gives you an opportunity to rename the report and to preview it. Click&amp;nbsp;&lt;b&gt;Finish&lt;/b&gt;&amp;nbsp;to end the wizard.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;You should be shown the report in the standard&amp;nbsp;&lt;b&gt;Report Designer&lt;/b&gt;:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot6.gif&quot; title=&quot;Figure 6&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;There are three tabs:&amp;nbsp;&lt;b&gt;Data&lt;/b&gt;,&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;. You should be on the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab. Click on the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab to view the report. Since this report doesn&#39;t take any arguments, it will run as soon as you click on the tab.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot7.gif&quot; title=&quot;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Use the&amp;nbsp;&lt;b&gt;+/-&lt;/b&gt;&amp;nbsp;symbols next to the&amp;nbsp;&lt;b&gt;State&lt;/b&gt;&amp;nbsp;abbreviations to expand and collapse the grouping of the report.&lt;/div&gt;&lt;h3 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 15px; line-height: 17px; margin-left: 20px;&quot;&gt;Manual report creation&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;The previous section, while perhaps overly simplistic, does show you how to get a report up and running with zero code and zero property setting. Obviously, such reports will not meet most development requirements, but do not discount this option as a starting point for more complicated reports. Once you&#39;ve created a report with the&amp;nbsp;&lt;b&gt;Report Wizard&lt;/b&gt;, you are free to make any modifications to it.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;In this section, we are going to create a more realistic report from scratch, including how to create and use a shared data source object, stored procedures, and how to format your report, set report properties and use report parameters.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 13px; line-height: 17px; margin-left: 40px;&quot;&gt;Creating a shared data source&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Before we start the report, we are going to build a shared data source i.e. a data source that is common to, and can be used by, all of the reports on a reporting server. While each report can contain its own connection information, it is good practice to use shared data sources, as it will save you a lot time and headaches. This way, you only have to set the connection information once. For example, let&#39;s say your company has Development, Test and Production environments. If you put the connection information into each report, you will have to change it each time when you publish to Development, Test and Production. If you use a shared data source, you still have to set up a data source object for each of three environments, but you can simply publish the report to each environment, and they will automatically use the connection information associated with that environment.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;From the menu select&amp;nbsp;&lt;b&gt;Project &amp;gt; Add New Item &amp;gt; Select Data Source&lt;/b&gt;. On the&amp;nbsp;&lt;b&gt;General&lt;/b&gt;&amp;nbsp;tab, call the data source &quot;ReportsDB&quot;. Leave the Type as&amp;nbsp;&lt;b&gt;Microsoft SQL Server&lt;/b&gt;. Click the&amp;nbsp;&lt;b&gt;Edit&lt;/b&gt;&amp;nbsp;button on the right, and enter the connection information for Reporting Demo, as before. Click&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;&amp;nbsp;on the&amp;nbsp;&lt;b&gt;Shared Data Source&lt;/b&gt;&amp;nbsp;screen and the data source is done.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 13px; line-height: 17px; margin-left: 40px;&quot;&gt;Add a new report&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;From the menu select&amp;nbsp;&lt;b&gt;Project &amp;gt; Add New Item&lt;/b&gt;. Select&amp;nbsp;&lt;b&gt;Report&lt;/b&gt;&amp;nbsp;and name it &quot;FirstReportMan.rdl&quot;. A new report will be added to the project, and the&amp;nbsp;&lt;b&gt;Report Designer&lt;/b&gt;&amp;nbsp;will open at the&amp;nbsp;&lt;b&gt;Data&lt;/b&gt;&amp;nbsp;tab. At this point, let&#39;s take a closer look at the&amp;nbsp;&lt;b&gt;Report Designer&lt;/b&gt;&amp;nbsp;tool. At the top of the Report Designer window are three tabs:&amp;nbsp;&lt;b&gt;Data&lt;/b&gt;,&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;. The&lt;b&gt;Data&lt;/b&gt;&amp;nbsp;tab is used to build data sources for your report. The&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab is the physical report designer where you set up the header, the footer and the data presentation of the report. The&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab allows you to actually run the report from Visual Studio 2005, without having to publish it to a report server first. If your report takes parameters, the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab will ask you to fill them out before it runs the report.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;The first thing we need to do is get data into our report. At the top of the&amp;nbsp;&lt;b&gt;Data&lt;/b&gt;&amp;nbsp;tab choose&amp;nbsp;&lt;b&gt;&lt;new dataset…=&quot;&quot;&gt;&lt;/new&gt;&lt;/b&gt;&amp;nbsp;from the dropdown list:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot8.gif&quot; title=&quot;Figure 8&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;The&amp;nbsp;&lt;b&gt;Dataset&lt;/b&gt;&amp;nbsp;dialog opens:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot9.gif&quot; title=&quot;Figure 9&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Name the dataset &quot;ReportData&quot;, and select the&amp;nbsp;&lt;b&gt;ReportsDB&lt;/b&gt;&amp;nbsp;data source from the dropdown. Select&lt;b&gt;StoredProcedure&lt;/b&gt;&amp;nbsp;as the command type, and enter &quot;spr_CustomerSelectAll&quot; in the query string box. Click&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;&amp;nbsp;to close the dialog.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Note:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;i&gt;spr_CustomerSelectAll is a very simple, parameter-less stored procedure that selects all of the columns from the Customer table. The source code is included in the ReportingDemoDatabaseScript.sql script with the code download.&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Test the dataset by clicking on the big red exclamation point at the top of the report designer. This executes the query and displays the results. You can repeat these steps if you wish to add multiple datasets to your report.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 13px; line-height: 17px; margin-left: 40px;&quot;&gt;Setting up the report display&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Next, switch to the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab. This is where you actually build the report display. Start by dragging a table from the Toolbox, onto the Body section of the report. By default, the table shows a header row at the top, a detail row in the middle and a footer row at the bottom. You can add additional columns to the table by right-clicking on one of the columns and selecting one of the two&amp;nbsp;&lt;b&gt;Insert Column&lt;/b&gt;&amp;nbsp;options.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Click on the&amp;nbsp;&lt;b&gt;Datasets&lt;/b&gt;&amp;nbsp;tab under Toolbox on the left-hand side of the Visual Studio environment. You should see the&lt;b&gt;ReportData&lt;/b&gt;&amp;nbsp;dataset. Expand it, select&amp;nbsp;&lt;b&gt;FirstName&lt;/b&gt;&amp;nbsp;and drag it to the first cell of the body row of the table. This will display the First Name field in the first column. Now put the&amp;nbsp;&lt;b&gt;LastName&lt;/b&gt;&amp;nbsp;in the second column, and the&lt;b&gt;CustomerStatus&lt;/b&gt;&amp;nbsp;in the third:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot10.gif&quot; title=&quot;Figure 10&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Note that, when you drag the column&amp;nbsp;&lt;b&gt;FirstName&lt;/b&gt;&amp;nbsp;into the body row of the table, SSRS make a guess as to what to call the row. It calls it &quot;First Name&quot;. You can click on the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab to view the report.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 13px; line-height: 17px; margin-left: 40px;&quot;&gt;Adding formatting&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;OK, so we have a basic, very plain, report. Let&#39;s add some formatting to make it look good. Let&#39;s add the&lt;b&gt;DateOfBirth&lt;/b&gt;&amp;nbsp;column to the table. You can expand and shrink the size of the columns by highlighting and dragging:&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot11.gif&quot; title=&quot;Figure 11&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;If you wish to get rid of the footer row of the table and then click on any field in the table. You will see a grey box surround the table. Right-click on the icon at the beginning of the body row and then click the&amp;nbsp;&lt;b&gt;Table Footer&lt;/b&gt;&amp;nbsp;option to deselect it.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;The table header is next. To format all the cells in the header in the same way, click and drag over all the cells to select them. Open the&amp;nbsp;&lt;b&gt;Properties&lt;/b&gt;&amp;nbsp;window and set background color, font, and so on.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot12.gif&quot; title=&quot;Figure 12&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Note, however, that if you wish to change the justification of the text or the size, then you do so using the main menu at the top, not via the properties window. Again, you can click on the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab to view the report.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 13px; line-height: 17px; margin-left: 40px;&quot;&gt;Add a report header&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;The table already has a header, but the report can also have a header and footer. Report headers and footers appear on every page of the report. Put the&amp;nbsp;&lt;b&gt;Report Designer&lt;/b&gt;&amp;nbsp;in&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;mode and select&amp;nbsp;&lt;b&gt;Report &amp;gt; Page Header&lt;/b&gt;from the menu. A new band labeled&amp;nbsp;&lt;b&gt;Page Header&lt;/b&gt;&amp;nbsp;appears on the report above the body. Drag a text box onto the header and click directly on it. Type &quot;My First Report&quot;, not in the&amp;nbsp;&lt;b&gt;Properties&lt;/b&gt;&amp;nbsp;window, but right on the control.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-Screenshot13.gif&quot; title=&quot;Figure 13&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;To adjust the text style and size of your heading, highlight the text box and use the option from the top menu.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 13px; line-height: 17px; margin-left: 40px;&quot;&gt;Formatting&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Each field can have formatting. Let&#39;s deal with that ugly&amp;nbsp;&lt;b&gt;Date of Birth&lt;/b&gt;&amp;nbsp;field. The time information is superfluous, so let&#39;s format the date properly. Right-click on the cell that contains the date of birth, and choose&amp;nbsp;&lt;b&gt;Properties&lt;/b&gt;. Next, select the&amp;nbsp;&lt;b&gt;Format&lt;/b&gt;&amp;nbsp;tab.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot14.gif&quot; title=&quot;Figure 14&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Click on the second button (labeled&amp;nbsp;&lt;b&gt;&quot;…&quot;&lt;/b&gt;) to the right of the&amp;nbsp;&lt;b&gt;Format code&lt;/b&gt;&amp;nbsp;field. When the dialog opens, use the standard options. Select&amp;nbsp;&lt;b&gt;Date&lt;/b&gt;&amp;nbsp;in the list on the left, then choose the sample date format you want on the right. Click&lt;b&gt;OK&lt;/b&gt;&amp;nbsp;to close the dialog.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot15.gif&quot; title=&quot;Figure 15&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Click&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;&amp;nbsp;to close the&amp;nbsp;&lt;b&gt;Properties&lt;/b&gt;&amp;nbsp;window and then click on the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab to view the report.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 13px; line-height: 17px; margin-left: 40px;&quot;&gt;Setting report properties&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;To access the report properties, you need to be on the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab of the&amp;nbsp;&lt;b&gt;Report Designer&lt;/b&gt;. When you click on this tab, a new menu item,&amp;nbsp;&lt;b&gt;Report&lt;/b&gt;, activates. This menu gives you options for turning on and off the report header and footer sections (as we have seen), adding embedded images, setting report properties, and setting report parameters.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Setting up the report print settings is not intuitive, compared to other products. In the report&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab you see your report with a ruler across the top. That ruler is set up in inches. A standard sheet of paper is 8.5 x 11 inches. The default setting in SSRS is to have a 1-inch margin all the way around the content area. So, at 8.5 inches wide with a 1-inch margin on the left and another on the right, you have 6.5 inches for content. Any more, and the content beyond the 6.5 inches will spill over onto a second sheet of paper when printed. It will&amp;nbsp;&lt;b&gt;not&lt;/b&gt;&amp;nbsp;automatically shift to Landscape.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;To get Landscape reports, you have to make the proper report settings. Navigate to the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab of the&amp;nbsp;&lt;b&gt;Report Designer&lt;/b&gt;. From the&amp;nbsp;&lt;b&gt;Report&lt;/b&gt;&amp;nbsp;menu select&amp;nbsp;&lt;b&gt;Report Properties&lt;/b&gt;. Switch to the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab of the dialog box. To switch to Landscape printing, you need to change&amp;nbsp;&lt;b&gt;Page width&lt;/b&gt;&amp;nbsp;to 11in and the&amp;nbsp;&lt;b&gt;Page height&lt;/b&gt;&amp;nbsp;to 8.5in.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot16.gif&quot; title=&quot;Figure 16&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;On the same&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab, you can also get up your report to display the data in multiple columns, and you can control the margins. By default, all the margins are set at 1 inch. Remember, if your report width, plus the right and left margins, is greater than the width of the printer, you will get spill-over when you print out your report.&lt;/div&gt;&lt;h4 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 13px; line-height: 17px; margin-left: 40px;&quot;&gt;Using parameters&lt;/h4&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;There are two ways to add parameters to your reports. The first is to use parameters in the queries in your data sources. The second is to set up parameters through the&amp;nbsp;&lt;b&gt;Report Parameters&lt;/b&gt;&amp;nbsp;dialog box. We will do both.&lt;/div&gt;&lt;h5 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Query parameters&lt;/h5&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;First, we will set up parameters using a data source query. Navigate to the&amp;nbsp;&lt;b&gt;Data&lt;/b&gt;&amp;nbsp;tab, and click the&amp;nbsp;&lt;b&gt;&quot;…&quot;&lt;/b&gt;&amp;nbsp;button right next the&amp;nbsp;&lt;b&gt;Dataset&lt;/b&gt;&amp;nbsp;dropdown box. The&amp;nbsp;&lt;b&gt;Dataset&lt;/b&gt;&amp;nbsp;dialog box opens and allows you to edit the query for the dataset. Change the Query string from &quot;spr_CustomerSelectAll&quot; to &quot;spr_CustomerSelectByState&quot;.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Note:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;i&gt;spr_CustomerSelectByState accepts a parameter called StateCD that allows us to filter the data from the Customer table by State. Again, the source code is included in the ReportingDemoDatabaseScript.sql script with the code download.&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Click&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;&amp;nbsp;and then run the query by clicking the red exclamation point (!) on the&amp;nbsp;&lt;b&gt;Data&lt;/b&gt;&amp;nbsp;tab toolbar. You will be prompted to enter a parameter value for StateCD (the State code). Enter &quot;CA&quot; and click&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;. The query should return all the customers that live in California.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Switch to the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab. Instead of the report just running, there should be a place for you to enter a value for the &quot;StateCD&quot; and run the report. Enter &quot;CA&quot; and click the&amp;nbsp;&lt;b&gt;View Report&lt;/b&gt;&amp;nbsp;button. You should see your report filtered by state.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;To edit the parameters, or to add new ones, switch to the&amp;nbsp;&lt;b&gt;Layout&lt;/b&gt;&amp;nbsp;tab of the&amp;nbsp;&lt;b&gt;Report Designer&lt;/b&gt;&amp;nbsp;and open the&amp;nbsp;&lt;b&gt;Report Parameters&lt;/b&gt;&amp;nbsp;dialog from the&amp;nbsp;&lt;b&gt;Report&lt;/b&gt;&amp;nbsp;menu. First, we are going to make the &quot;State code&quot; prompt a little more friendly. Select&amp;nbsp;&lt;b&gt;StateCD&lt;/b&gt;&amp;nbsp;in the Parameters list box then, in the Parameters Properties box, change the prompt to read &quot;State&quot;. In the&amp;nbsp;&lt;b&gt;Available values&lt;/b&gt;&amp;nbsp;section enter &quot;California&quot; and &quot;CA&quot; on the first line. Enter &quot;Louisiana&quot; and &quot;LA&quot; on the second line.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot17.gif&quot; title=&quot;Figure 17&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;This will make the prompt for &quot;State value&quot; into a dropdown. You can also build additional datasets into your report, and use the values in those datasets as criteria for dropdowns.&lt;/div&gt;&lt;h5 style=&quot;color: #333333; font-family: arial; font-size: 13px; line-height: 17px;&quot;&gt;Report parameters&lt;/h5&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Now let&#39;s add a parameter that is not used in a query. Click the&amp;nbsp;&lt;b&gt;Add&lt;/b&gt;&amp;nbsp;button in the&amp;nbsp;&lt;b&gt;Report Parameters&lt;/b&gt;&amp;nbsp;dialog from the&amp;nbsp;&lt;b&gt;Report&lt;/b&gt;&amp;nbsp;menu. Give the new parameter the name &quot;ReportTitle&quot;. Its Data type should be&amp;nbsp;&lt;b&gt;String&lt;/b&gt;. Set the&amp;nbsp;&lt;b&gt;Prompt&lt;/b&gt;&amp;nbsp;to &quot;Report Title&quot;. Click&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;&amp;nbsp;and close the dialog box.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Drag a new text box onto the report header area. Right-click on it and choose the&amp;nbsp;&lt;b&gt;Expression&lt;/b&gt;&amp;nbsp;option. In the&amp;nbsp;&lt;b&gt;Edit Expression&lt;/b&gt;&amp;nbsp;dialog select&amp;nbsp;&lt;b&gt;Parameters&lt;/b&gt;. Double-click on the&amp;nbsp;&lt;b&gt;ReportTitle&lt;/b&gt;&amp;nbsp;parameter. This text box will now display the value you pass to the&amp;nbsp;&lt;b&gt;Report Title&lt;/b&gt;&amp;nbsp;parameter.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot18.gif&quot; title=&quot;Figure 18&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Switch to the&amp;nbsp;&lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;tab and try it out.&lt;/div&gt;&lt;h3 style=&quot;color: #333333; font-family: &#39;Times New Roman&#39;, Times, serif; font-size: 15px; line-height: 17px; margin-left: 20px;&quot;&gt;Publishing your reports&lt;/h3&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Up to now, you have been running your reports in the Visual Studio 2005 environment but, to make them useful, you must publish them to a report server. The easiest way to do this is to have Visual Studio publish your reports.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Start by right-clicking on&amp;nbsp;&lt;b&gt;Project&lt;/b&gt;&amp;nbsp;in the&amp;nbsp;&lt;b&gt;Project Explorer&lt;/b&gt;&amp;nbsp;and choose&amp;nbsp;&lt;b&gt;Properties&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.simple-talk.com/iwritefor/articlefiles/268-ScreenShot19.gif&quot; title=&quot;Figure 19&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Set&amp;nbsp;&lt;b&gt;TargetServerURL&lt;/b&gt;&amp;nbsp;to the URL of your report server. Use the&amp;nbsp;&lt;b&gt;TargetReportFolder&lt;/b&gt;&amp;nbsp;property to set up a folder for your reports. If the folder does not exist, the Publisher will create it for you. The other key thing to pay attention to here is the&amp;nbsp;&lt;b&gt;OverwriteDataSources&lt;/b&gt;&amp;nbsp;property. When this property is set to &quot;True&quot;, it will automatically copy over all your data source objects when you publish. When set to &quot;False&quot;, it will copy any new data source objects, but it will not overwrite existing ones. This is important when dealing with development, test and production servers. You can publish a set of data source objects to each server, pointed at the correct database, and never have to worry about what database your reports are hitting in each environment.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;From the&amp;nbsp;&lt;b&gt;Build&lt;/b&gt;&amp;nbsp;menu select&amp;nbsp;&lt;b&gt;Deploy Solution&lt;/b&gt;. This will publish the project to the selected folder on your report server. You can also deploy individual reports by right-clicking on the file in the&amp;nbsp;&lt;b&gt;Solution explorer&lt;/b&gt;&amp;nbsp;and selecting&lt;b&gt;Deploy&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-left: 20px; text-align: justify;&quot;&gt;Once your report has been published, you can access and run it on your server through the browser at&lt;b&gt;http://&lt;servername&gt;/&lt;reportservername&gt;&lt;/reportservername&gt;&lt;/servername&gt;&lt;/b&gt;. From the&amp;nbsp;&lt;b&gt;Home&lt;/b&gt;&amp;nbsp;page, you should be able to find the folder you published to, with the reports in it. Select a report to run. At the top of the page you can enter any values for report parameters, and then run the report. From here, you can also print or export the report.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/7161308550144538402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2011/01/beginning-sql-server-2005-reporting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/7161308550144538402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/7161308550144538402'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2011/01/beginning-sql-server-2005-reporting.html' title='Beginning SQL Server 2005 Reporting Services Part 1'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-391643270095252770</id><published>2010-12-05T06:27:00.000-08:00</published><updated>2010-12-05T06:27:53.781-08:00</updated><title type='text'>Using jQuery UI Datepicker in a Web Page</title><content type='html'>&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://jqueryui.com/&quot; style=&quot;color: #4292c6;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;jQuery UI library&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&amp;nbsp;includes a rich set of widgets and effects that you can use in your HTML applications. One such widget is the jQuery Datepicker widget. The jQueryUI Datepicker is a highly configurable widget to quickly add datepickers to your web pages.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Let us see how to use the jQueryUI Datepicker widget in your web pages using Expression Web. This article assumes you are familiar with jQuery. If not, take a&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery&quot; style=&quot;color: #4292c6;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;quick jQuery course here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Launch Expression Web and create a new HTML Page (File &amp;gt; New or click on the New Document icon on Standard toolbar and choose HTML). Add the following links in the  element of the page.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;jQuery CDN Links&quot; src=&quot;http://www.dotnetcurry.com/images/ExpressionWeb/jQueryCDNLinks0412.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
We have added the following three files above:&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;li&gt;&lt;div align=&quot;justify&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;jQuery UI theme (jquery-ui.css) - A link to a CSS file to import the Smoothness theme. The jQuery UI supports different themes and the smoothness theme is just one amongst them.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;justify&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The jQuery library (jquery.min.js) — The jQuery library which handles DOM manipulations, CSS, AJAX, Events and Animations on your page. The jQuery UI library depends on the jQuery library.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;justify&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&amp;nbsp;The jQuery UI library (jquery-ui.min.js) — The jQuery UI library which contains all the jQuery UI effects and widgets such as the Datepicker widget.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt;&amp;nbsp;The CSS and jQuery script links shown above are taken from the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.asp.net/ajaxlibrary/cdn.ashx&quot; style=&quot;color: #4292c6;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Microsoft Ajax Content Delivery Network (CDN)&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;. These links from CDN enables you to easily add popular JavaScript libraries such as jQuery to your Web applications, without having to download the jQuery scripts and manually referencing them in your pages.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Now add a textbox control (call it txtDate) to the page and write the following code in the  element&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;Datepicker Text Box&quot; src=&quot;http://www.dotnetcurry.com/images/ExpressionWeb/DatePickerTextBox0412.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
Do you know that if you view the webpage in a browser and focus the cursor (click or tab) inside the textbox, you will see a fully functional Datepicker control? See below;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;DatePicker UI&quot; src=&quot;http://www.dotnetcurry.com/images/ExpressionWeb/DatePickerUI0412.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
But there’s a lot more to the Datepicker control. The Datepicker control is highly configurable. So let us say if we want to display multiple months at the same time, use the&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://jqueryui.com/demos/datepicker/#option-numberOfMonths&quot; style=&quot;color: #4292c6;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;numberOfMonths&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&amp;nbsp;option as shown below, which displays two months instead of one:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;numberOfMonths Datepicker&quot; src=&quot;http://www.dotnetcurry.com/images/ExpressionWeb/numberOfMonthsDatePicker.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;Multiple Month DatePicker&quot; src=&quot;http://www.dotnetcurry.com/images/ExpressionWeb/MultipleMonthDatePicker.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Similarly, to show the year as a dropdown and limit the years from 2008 to 2012 only, use the&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://jqueryui.com/demos/datepicker/#option-changeYear&quot; style=&quot;color: #4292c6;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;changeYear&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://jqueryui.com/demos/datepicker/#option-yearRange&quot; style=&quot;color: #4292c6;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;yearRange&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&amp;nbsp;option as shown below:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;change Year Range DatePicker&quot; src=&quot;http://www.dotnetcurry.com/images/ExpressionWeb/changeYearRangeDatePicker.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img alt=&quot;Year DropDown DatePicker&quot; src=&quot;http://www.dotnetcurry.com/images/ExpressionWeb/YearDropDownDatePicker.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;I hope you now see how highly configurable the Datepicker widget it. You can see a bunch of other Datepicker options over here. So play around with them and let me know your experience!&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;You can download the HTML&amp;nbsp;&lt;strong&gt;source code&lt;/strong&gt;&amp;nbsp;over&amp;nbsp;&lt;strong&gt;&lt;a href=&quot;http://www.dotnetcurry.com/Uploads/ExpressionWeb/jQueryDatePickerExpressionWeb.html&quot; style=&quot;color: #4292c6;&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/strong&gt;.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/391643270095252770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2010/12/using-jquery-ui-datepicker-in-web-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/391643270095252770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/391643270095252770'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2010/12/using-jquery-ui-datepicker-in-web-page.html' title='Using jQuery UI Datepicker in a Web Page'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-4273867987797074143</id><published>2010-08-29T08:11:00.000-07:00</published><updated>2010-08-29T08:11:26.540-07:00</updated><title type='text'>LINQ To XML Tutorials with Examples</title><content type='html'>&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 24pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #365f91;&quot;&gt;&lt;span style=&quot;font-family: Cambria;&quot;&gt;LINQ To XML Tutorials with Examples&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;For this article, we will be using a sample file called ‘Employees.xml’ for all our samples which is available with the&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://cid-2c5f5b0560e374cb.office.live.com/self.aspx/.Public/Uploads/LINQ%20To%20XML%20Tutorial.zip&quot; style=&quot;color: #4292c6;&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: x-small;&quot;&gt;source code&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;. So make sure you keep it handy with you while are practicing these examples. The mark up for Employees.xml is as follows:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;xml&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;1.0&lt;/span&gt;&quot;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;utf-8&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Employees&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Employee&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;EmpId&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;1&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;EmpId&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Sam&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Sex&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Male&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Sex&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Phone&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Home&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;423-555-0124&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Phone&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Phone&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Work&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;424-555-0545&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Phone&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Address&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Street&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;7A Cox Street&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Street&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;City&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Acampo&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;City&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;State&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;CA&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;State&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Zip&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;95220&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Zip&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Country&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;USA&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Country&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Address&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Employee&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Employee&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;EmpId&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;2&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;EmpId&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Lucy&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Sex&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Female&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Sex&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Phone&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Home&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;143-555-0763&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Phone&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Phone&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Work&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;434-555-0567&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Phone&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Address&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Street&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Jess Bay&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Street&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;City&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Alta&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;City&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;State&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;CA&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;State&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Zip&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;95701&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Zip&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Country&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;USA&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Country&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Address&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Employee&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Employee&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;EmpId&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;3&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;EmpId&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Kate&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Sex&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Female&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Sex&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Phone&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Home&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;166-555-0231&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Phone&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Phone&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Work&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;233-555-0442&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Phone&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Address&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Street&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;23 Boxen Street&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Street&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;City&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Milford&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;City&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;State&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;CA&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;State&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Zip&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;96121&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Zip&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Country&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;USA&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Country&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Address&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Employee&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Employee&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;EmpId&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;4&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;EmpId&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Chris&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Sex&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Male&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Sex&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Phone&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Home&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;564-555-0122&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Phone&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Phone&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Work&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;442-555-0154&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Phone&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Address&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Street&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;124 Kutbay&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Street&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;City&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Montara&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;City&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;State&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;CA&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;State&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Zip&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;94037&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Zip&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Country&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;USA&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Country&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Address&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Employee&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;Employees&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;The application is a console application targeting .NET 3.5 framework, although you can use the latest .NET 4.0 framework too. I have also used ‘query expressions’, instead of Lambda expression in these samples. It is just a matter of preference and you are free to use any of these.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;This tutorial has been divided into 2 sections:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Section 1: Read XML and Traverse the Document using LINQ To XML&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Section 2: Manipulate XML content and Persist the changes using LINQ To XML&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;The following namespaces are needed while testing the samples: System;&amp;nbsp;System.Collections.Generic; System.Linq; System.Text; System.Xml; System.Xml.Linq;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Go grab a hot cup of coffee, put on your developer cap and let us get started:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 10pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #4f81bd;&quot;&gt;&lt;span style=&quot;font-family: Cambria;&quot;&gt;Section 1: Read XML and Traverse the XML Document using LINQ To XML&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;1. How Do I Read XML using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;There are two ways to do so: Using the XElement class or the XDocument class. Both the classes contain the ‘Load()’ method which accepts a file, a URL or XMLReader and allows XML to be loaded. The primary difference between both the classes is that an XDocument can contain XML declaration, XML Document Type (DTD) and processing instructions. Moreover an XDocument contains one root XElement.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Using XElement&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;XElement xelement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;IEnumerable&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;gt; employees = xelement.Elements();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;// Read the entire XML&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;employee&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;employees)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(employee);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;employees&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;IEnumerable(&lt;span style=&quot;color: blue;&quot;&gt;Of&lt;/span&gt;&amp;nbsp;XElement) = xelement.Elements()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&#39; Read the entire XML&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;employee&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;employees&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(employee)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;employee&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Output:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_1&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_1.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Using XDocument&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XDocument&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xdocument = XDocument.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;IEnumerable&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;gt; employees = xdocument.Elements();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;employee&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;employees)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(employee);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xdocument&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XDocument = XDocument.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;employees&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;IEnumerable(&lt;span style=&quot;color: blue;&quot;&gt;Of&lt;/span&gt;&amp;nbsp;XElement) = xdocument.Elements()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;employee&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;employees&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(employee)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;employee&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Output:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_11&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_11.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Note 1: As you can observe, XDocument contains a single root element (Employee&lt;b&gt;s&lt;/b&gt;).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Note 2: In order to generate an output similar to the one using XElement, use &amp;nbsp;“xdocument.Root.Elements()” instead of &amp;nbsp;“xdocument.Elements()”&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Note 3: VB.NET users can use a new feature called XML Literal.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;2. How Do I Access a Single Element using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Let us see how to access the name of all the Employees and list them over here&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;IEnumerable&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;gt; employees = xelement.Elements();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;List of all Employee Names :&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;employee&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;employees)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(employee.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;).Value);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;employees&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;IEnumerable(&lt;span style=&quot;color: blue;&quot;&gt;Of&lt;/span&gt;&amp;nbsp;XElement) = xelement.Elements()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(&quot;List of all Employee Names :&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;employee&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;employees&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(employee.Element(&quot;Name&quot;).Value)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;employee&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Output:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_2&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_2.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;3. How Do I Access Multiple Elements using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Let us see how to access the name of all Employees and also list the ID along with it&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;IEnumerable&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;gt; employees = xelement.Elements();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;List of all Employee Names along with their ID:&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;employee&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;employees)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;{0} has Employee ID {1}&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; employee.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;).Value,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; employee.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;).Value);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;employees&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;IEnumerable(&lt;span style=&quot;color: blue;&quot;&gt;Of&lt;/span&gt;&amp;nbsp;XElement) = xelement.Elements()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(&quot;List of all Employee Names along with their ID:&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;employee&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;employees&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&quot;{0} has Employee ID {1}&quot;, employee.Element(&quot;Name&quot;).Value, employee.Element(&quot;EmpId&quot;).Value)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;employee&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Output:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_3&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_3.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;4. How Do I Access all Elements having a Specific Attribute using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Let us see how to access details of all Female Employees&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;name =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt;&amp;nbsp;nm&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;xelement.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;where&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;)nm.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sex&quot;&lt;/span&gt;) ==&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Female&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;select&lt;/span&gt;&amp;nbsp;nm;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Details of Female Employees:&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;name)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;name = _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From nm&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;xelement.Elements(&quot;Employee&quot;) _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;CStr&lt;/span&gt;(nm.Element(&quot;Sex&quot;)) = &quot;Female&quot; _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Select&lt;/span&gt;&amp;nbsp;nm&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(&quot;Details of Female Employees:&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;name&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(xEle)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Output:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_4&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_4.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;5. How Do I access Specific Element having a Specific Attribute using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Let us see how to list all the Home Phone Nos.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;homePhone =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt;&amp;nbsp;phoneno&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;xelement.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;where&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;)phoneno.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Phone&quot;&lt;/span&gt;).Attribute(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Type&quot;&lt;/span&gt;) ==&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Home&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;select&lt;/span&gt;&amp;nbsp;phoneno;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;List HomePhone Nos.&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;homePhone)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(xEle.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Phone&quot;&lt;/span&gt;).Value);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;homePhone = _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From phoneno&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;xelement.Elements(&quot;Employee&quot;) _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;CStr&lt;/span&gt;(phoneno.Element(&quot;Phone&quot;).Attribute(&quot;Type&quot;)) = &quot;Home&quot; _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Select&lt;/span&gt;&amp;nbsp;phoneno&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(&quot;List HomePhone Nos.&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;homePhone&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(xEle.Element(&quot;Phone&quot;).Value)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Output:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_5&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_5.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;6. How Do I Find an Element within another Element using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Let us see how to find the details of Employees living in &#39;Alta&#39; City&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;addresses =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt;&amp;nbsp;address&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;xelement.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;where&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;)address.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Address&quot;&lt;/span&gt;).Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;City&quot;&lt;/span&gt;) ==&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Alta&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;select&lt;/span&gt;&amp;nbsp;address;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Details of Employees living in Alta City&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;addresses)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;addresses = _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From address&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;xelement.Elements(&quot;Employee&quot;) _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;CStr&lt;/span&gt;(address.Element(&quot;Address&quot;).Element(&quot;City&quot;)) = &quot;Alta&quot; _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Select&lt;/span&gt;&amp;nbsp;address&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(&quot;Details of Employees living in Alta City&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;addresses&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(xEle)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Output:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_26&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_26.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;7. How Do I Find Nested Elements (using Descendants Axis) using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Let us see how to list all the zip codes in the XML file&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;List of all Zip Codes&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;xelement.Descendants(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Zip&quot;&lt;/span&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine((&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;)xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(&quot;List of all Zip Codes&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;xelement.Descendants(&quot;Zip&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: blue;&quot;&gt;CStr&lt;/span&gt;(xEle))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Output:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_37&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_37.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;8. How do I apply Sorting on Elements using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Let us see how to List and Sort all Zip Codes in ascending order&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;IEnumerable&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;lt;&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;&amp;gt; codes =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt;&amp;nbsp;code&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;xelement.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;let&lt;/span&gt;&amp;nbsp;zip = (&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;)code.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Address&quot;&lt;/span&gt;).Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Zip&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;orderby&lt;/span&gt;&amp;nbsp;zip&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;select&lt;/span&gt;&amp;nbsp;zip;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;List and Sort all Zip Codes&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;&amp;nbsp;zp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;codes)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(zp);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;codes&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;IEnumerable(&lt;span style=&quot;color: blue;&quot;&gt;Of&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;) = _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From code&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;xelement.Elements(&quot;Employee&quot;) _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Let&lt;/span&gt;&amp;nbsp;zip =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;CStr&lt;/span&gt;(code.Element(&quot;Address&quot;).Element(&quot;Zip&quot;)) _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Order By zip _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Select&lt;/span&gt;&amp;nbsp;zip&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(&quot;List and Sort all Zip Codes&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;zp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;codes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(zp)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;zp&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Output:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;img alt=&quot;image_48&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_48.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 10pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #4f81bd;&quot;&gt;&lt;span style=&quot;font-family: Cambria;&quot;&gt;Section 2: Manipulate XML content and Persist the changes using LINQ To XML&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;9. Create an XML Document with Xml Declaration/Namespace/Comments using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;When you need to create an XML document containing XML declaration, XML Document Type (DTD) and processing instructions, Comments, Namespaces, you should go in for the XDocument class.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XNamespace&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;empNM =&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;urn:lst-emp:emp&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XDocument&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xDoc =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XDocument&lt;/span&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XDeclaration&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;UTF-16&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(empNM +&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employees&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XComment&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Only 3 elements for demo purposes&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;5&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Kimmy&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sex&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Female&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; )));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;StringWriter&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;sw =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;StringWriter&lt;/span&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;xDoc.Save(sw);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(sw);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;empNM&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XNamespace =&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;urn:lst-emp:emp&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;xDoc&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XDocument(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XDeclaration(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;UTF-16&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Nothing&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(empNM +&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employees&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XComment(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Only 3 elements for demo purposes&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;5&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Kimmy&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sex&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Female&quot;&lt;/span&gt;))))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;sw&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;StringWriter()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xDoc.Save(sw)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(sw)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_59&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_59.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;10. Save the XML Document to a XMLWriter or to the disk&amp;nbsp;using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Use the following code to save the XML to a XMLWriter or to your physical disk&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XNamespace&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;empNM =&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;urn:lst-emp:emp&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XDocument&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xDoc =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XDocument&lt;/span&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XDeclaration&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;UTF-16&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(empNM +&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employees&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XComment&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Only 3 elements for demo purposes&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;5&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Kimmy&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sex&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Female&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; )));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;StringWriter&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;sw =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;StringWriter&lt;/span&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XmlWriter&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xWrite =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XmlWriter&lt;/span&gt;.Create(sw);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;xDoc.Save(xWrite);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;xWrite.Close();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;// Save to Disk&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;xDoc.Save(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;C:\\Something.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Saved&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;empNM&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XNamespace =&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;urn:lst-emp:emp&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-indent: 11.25pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xDoc&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XDocument(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XDeclaration(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;UTF-16&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Nothing&lt;/span&gt;),_&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(empNM +&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employees&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XComment(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Only 3 elements for demo purposes&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;5&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Kimmy&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sex&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Female&quot;&lt;/span&gt;))))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;sw&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;StringWriter()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;xWrite&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XmlWriter = XmlWriter.Create(sw)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xDoc.Save(xWrite)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xWrite.Close()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: green;&quot;&gt;&#39; Save to Disk&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xDoc.Save(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;C:\Something.xml&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Saved&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 10pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;11. Load an XML Document using XML Reader using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Use the following code to load the XML Document into an XML Reader&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XmlReader&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xRead =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XmlReader&lt;/span&gt;.Create(&lt;span style=&quot;color: #a31515;&quot;&gt;@&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(xRead);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;xRead.Close();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xRead&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XmlReader = XmlReader.Create(&quot;..\\..\\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(xRead)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(xEle)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;xRead.Close()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_110&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_110.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;12. Find Element at a Specific Position using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Find the 2&lt;sup&gt;nd&lt;/sup&gt;&amp;nbsp;Employee Element&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;// Using XElement&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Using XElement&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emp1 = xEle.Descendants(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).ElementAt(1);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(emp);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;------------&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;//// Using XDocument&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Using XDocument&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XDocument&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xDoc =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XDocument&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emp1 = xDoc.Descendants(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).ElementAt(1);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(emp);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&#39; Using XElement&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(&quot;Using XElement&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emp1 = xEle.Descendants(&quot;Employee&quot;).ElementAt(1)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(emp)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(&quot;------------&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&#39;// Using XDocument&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.WriteLine(&quot;Using XDocument&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xDoc&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XDocument = XDocument.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emp1 = xDoc.Descendants(&quot;Employee&quot;).ElementAt(1)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Console.WriteLine(emp)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_211&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_211.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;13. List the First 2 Elements using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;List the details of the first 2 Employees&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emps = xEle.Descendants(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).Take(2);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;emp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;emps)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(emp);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emps = xEle.Descendants(&quot;Employee&quot;).Take(2)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;emp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;emps&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(emp)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emp&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_312&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_312.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;14. List the 2nd and 3rd Element using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;List the 2nd and 3rd Employees&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emps = xEle.Descendants(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).Skip(1).Take(2);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;emp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;emps)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(emp);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emps = xEle.Descendants(&quot;Employee&quot;).Skip(1).Take(2)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;emp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;emps&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(emp)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emp&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_413&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_413.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;15. List the Last 2 Elements using LINQ To XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;We have been posting the entire elements as output in our previous examples. Let us say that you want to display only the Employee Name, use this query:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emps = xEle.Descendants(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).Reverse().Take(2);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;emp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;emps)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(emp.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;) +&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;&amp;nbsp;+ emp.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emps = xEle.Descendants(&quot;Employee&quot;).Reverse().Take(2)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;emp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;emps&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(emp.Element(&quot;EmpId&quot;) + emp.Element(&quot;Name&quot;))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emp&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_514&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_514.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;To display only the values without the XML tags, use the ‘Value’ property&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emps = xEle.Descendants(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).Reverse().Take(2);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;emp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;emps)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(emp.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;).Value +&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;. &quot;&lt;/span&gt;&amp;nbsp;+ emp.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;).Value);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emps = xEle.Descendants(&quot;Employee&quot;).Reverse().Take(2)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;emp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;emps&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(emp.Element(&quot;EmpId&quot;).Value &amp;amp; &quot;. &quot; &amp;amp; emp.Element(&quot;Name&quot;).Value)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emp&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_115&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_115.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;If you notice, the results are not ordered i.e. the Employee 4 is printed before 3. To order the results, just add call Reverse() again while filtering as shown below:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emps = xEle.Descendants(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).Reverse().Take(2&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 12pt;&quot;&gt;).Reverse();&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;emp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;emps)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(emp.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;).Value +&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;. &quot;&lt;/span&gt;&amp;nbsp;+ emp.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;).Value);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&quot;..\..\Employees.xml&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emps = xEle.Descendants(&quot;Employee&quot;).Reverse().Take(2&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 12pt;&quot;&gt;).Reverse()&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;emp&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;emps&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(emp.Element(&quot;EmpId&quot;).Value &amp;amp; &quot;. &quot; &amp;amp; emp.Element(&quot;Name&quot;).Value)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;emp&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_216&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_216.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;16. Find the Element Count based on a condition using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Count the number of Employees living in the state CA&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;stCnt =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt;&amp;nbsp;address&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;xelement.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;where&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;)address.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Address&quot;&lt;/span&gt;).Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;State&quot;&lt;/span&gt;) ==&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;CA&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;select&lt;/span&gt;&amp;nbsp;address;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;No of Employees living in CA State are {0}&quot;&lt;/span&gt;, stCnt.Count());&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xelement =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;stCnt =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt;&amp;nbsp;address&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;xelement.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;where&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;)address.Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Address&quot;&lt;/span&gt;).Element(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;State&quot;&lt;/span&gt;) ==&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;CA&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;select&lt;/span&gt;&amp;nbsp;address;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;No of Employees living in CA State are {0}&quot;&lt;/span&gt;, stCnt.Count());&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_317&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_317.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;17. Add a new Element at runtime using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;You can add a new Element to an XML document at runtime by using the Add() method of XElement. The new Element gets added as the last element of the XML document.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;xEle.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;, 5),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;George&quot;&lt;/span&gt;)));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.Write(xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\..\Employees.xml&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xEle.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;, 5), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&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;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;George&quot;&lt;/span&gt;)))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Console.Write(xEle)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_418&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_418.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;18. Add a new Element as the First Child using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;In the previous example, by default the new Element gets added to the end of the XML document. If you want to add the Element as the First Child, use the ‘AddFirst()’ method&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xEle.AddFirst(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;, 5),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;George&quot;&lt;/span&gt;)));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.Write(xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\..\Employees.xml&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; xEle.AddFirst(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;, 5), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;George&quot;&lt;/span&gt;)))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.Write(xEle)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_518&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_518.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;19. Add an attribute to an Element using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;To add an attribute to an Element, use the following code:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xEle.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;, 5),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Phone&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;423-555-4224&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XAttribute&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Type&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Home&quot;&lt;/span&gt;))));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.Write(xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\..\Employees.xml&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xEle.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&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;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;, 5), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&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;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Phone&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;423-555-4224&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XAttribute(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Type&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Home&quot;&lt;/span&gt;))))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.Write(xEle)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_119&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_119.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;20. Replace Contents of an Element/Elements using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Let us say that in the XML file, you want to change the Country from “USA” to “United States of America” for all the Elements. Here’s how to do so:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;countries = xEle.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Address&quot;&lt;/span&gt;).Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Country&quot;&lt;/span&gt;).ToList();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;foreach&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;nbsp;cEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;countries)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cEle.ReplaceNodes(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;United States Of America&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.Write(xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\..\Employees.xml&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;countries = xEle.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Address&quot;&lt;/span&gt;).Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Country&quot;&lt;/span&gt;).ToList()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;For&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;cEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;countries&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cEle.ReplaceNodes(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;United States Of America&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&amp;nbsp;cEle&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.Write(xEle)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;div style=&quot;margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;img alt=&quot;image_220&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_220.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;21. Remove an attribute from all the Elements using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Let us say if you want to remove the Type attribute ( &lt;phone type=&quot;”Home”&quot;&gt;) attribute for all the elements, then here’s how to do it.&lt;/phone&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;phone = xEle.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Phone&quot;&lt;/span&gt;).ToList();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;foreach&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;nbsp;pEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;phone)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pEle.RemoveAttributes();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.Write(xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\..\Employees.xml&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;phone = xEle.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Phone&quot;&lt;/span&gt;).ToList()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;For&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;pEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;phone&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pEle.RemoveAttributes()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&amp;nbsp;pEle&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Console.Write(xEle)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_321&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_321.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;To remove attribute of one Element based on a condition, traverse to that Element and&amp;nbsp;SetAttributeValue(&quot;Type&quot;, null); You can also use SetAttributeValue(XName,object) to update an attribute value.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;22. Delete an Element based on a condition using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;If you want to delete an entire element based on a condition, here’s how to do it. We are deleting the entire Address Element&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;addr = xEle.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).ToList();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;foreach&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;nbsp;addEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;addr)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addEle.SetElementValue(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Address&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.Write(xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\..\Employees.xml&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;addr = xEle.Elements(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;).ToList()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;For&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt;&amp;nbsp;addEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;&amp;nbsp;addr&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addEle.SetElementValue(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Address&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Nothing&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&amp;nbsp;addEle&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Console.Write(xEle)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_422&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_422.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;SetElementValue() can also be used to Update the content of an Element.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;23. Remove ‘n’ number of Elements using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;If you have a requirement where you have to remove ‘n’ number of Elements; For E.g. To remove the last 2 Elements, then here’s how to do it&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;;&quot;&gt;XElement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;emps = xEle.Descendants(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; emps.Reverse().Take(2).Remove();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.Write(xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\..\Employees.xml&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;emps = xEle.Descendants(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emps.Reverse().Take(2).Remove()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.Write(xEle)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;img alt=&quot;image_523&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/image_523.jpg&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;24. Save/Persists Changes to the XML using LINQ to XML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;All the manipulations we have done so far were in the memory and were not persisted in the XML file. If you have been wondering how to persist changes to the XML, once it is modified, then here’s how to do so. It’s quite simple. You just need to call the Save() method. It’s also worth observing that the structure of the code shown below is similar to the structure of the end result (XML document). That’s one of the benefits of LINQ to XML, that it makes life easier for developers by making it so easy to create and structure XML documents.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;&amp;nbsp;xEle =&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xEle.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;, 5),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;George&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sex&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Male&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Phone&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;423-555-4224&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XAttribute&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Type&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Home&quot;&lt;/span&gt;)),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Phone&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;424-555-0545&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XAttribute&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Type&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Work&quot;&lt;/span&gt;)),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Address&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Street&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Fred Park, East Bay&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;City&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Acampo&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;State&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;CA&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Zip&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;95220&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;XElement&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Country&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;USA&quot;&lt;/span&gt;))));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xEle.Save(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\\..\\Employees.xml&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(xEle);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.ReadLine();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;VB.NET (Converted Code)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;xEle&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;XElement = XElement.Load(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\..\Employees.xml&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xEle.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;EmpId&quot;&lt;/span&gt;, 5), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Name&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;George&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sex&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Male&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Phone&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;423-555-4224&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XAttribute(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Type&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Home&quot;&lt;/span&gt;)), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Phone&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;424-555-0545&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XAttribute(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Type&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Work&quot;&lt;/span&gt;)), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Address&quot;&lt;/span&gt;, _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Street&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Fred Park, East Bay&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;City&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Acampo&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;State&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;CA&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Zip&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;95220&quot;&lt;/span&gt;), _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&amp;nbsp;XElement(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Country&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;USA&quot;&lt;/span&gt;))))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xEle.Save(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;..\..\Employees.xml&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(xEle)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadLine()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 14px;&quot;&gt;Well with that, we conclude this long article of some &#39;How Do I&#39; operations while using LINQ to XML. Through this article, we have only attempted to scratch the surface of what can be done using LINQ to XML. LINQ to XML is an amazing API and I hope this set of examples has demonstrated that. The&amp;nbsp;&lt;b&gt;entire source&lt;/b&gt;&amp;nbsp;of the article in C# and VB.NET can be downloaded over&amp;nbsp;&lt;a href=&quot;http://cid-2c5f5b0560e374cb.office.live.com/self.aspx/.Public/Uploads/LINQ%20To%20XML%20Tutorial.zip&quot; style=&quot;color: #4292c6;&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;here&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;. The VB.NET code has been translated using a&amp;nbsp;&lt;a href=&quot;http://tangiblesoftwaresolutions.com/Product_Details/Instant_VB.html&quot; style=&quot;color: #4292c6;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;C# to VB.NET Converting tool&lt;/span&gt;&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 14px;&quot;&gt;Ref: .Net Curry&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/4273867987797074143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2010/08/linq-to-xml-tutorials-with-examples.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/4273867987797074143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/4273867987797074143'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2010/08/linq-to-xml-tutorials-with-examples.html' title='LINQ To XML Tutorials with Examples'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/th_image_1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-2267148726188323806</id><published>2010-07-13T19:42:00.000-07:00</published><updated>2010-07-13T19:42:03.448-07:00</updated><title type='text'>How to call other external applications from your .Net application?</title><content type='html'>&lt;h1 align=&quot;center&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal;&quot;&gt;Calling an external application from your .Net application is frequently done if you are developing a product. During the installation of a product you might require to redirect the users who are installing your product to some web pages of your web site where they may get some information regarding your product. This web page might be a user manual in html format. You may sometimes be required to open a readme file in text format. This file is usually opened using a Notepad application. So there are many such requirements which require you to call an external application from your .Net application.&lt;/span&gt;&lt;/h1&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;We will see some simple examples on how to call and execute an external application. For this we will create a console application with the following code:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #666666;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f3f3f3;&quot;&gt;Module Module1&lt;br /&gt;
Sub Main()&lt;br /&gt;
System.Diagnostics.Process.Start(“winword.exe”)&lt;br /&gt;
End Sub&lt;br /&gt;
End Module&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;The above code is written in VB.Net to call the Microsoft Word application from your .Net console application. Once your application is run, it opens the Word external application and your application terminates. Suppose you want to open an existing word document using your .Net console application you can pass the filename of the work document as an argument to the Start method of the Process class. This can be achieved as given below:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f3f3f3;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #666666;&quot;&gt;Module Module1&lt;br /&gt;
Sub Main()&lt;br /&gt;
System.Diagnostics.Process.Start(“winword.exe”, _ “first.doc”)&lt;br /&gt;
End Sub&lt;br /&gt;
End Module&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;For the above document to be opened properly you should have the document “first.doc” in the folder which contains the exe file of your application. Or else you have to specify the path of the document properly. You can also specify the path to avoid such problems in locating the file as,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;System.Diagnostics.Process.Start(“winword.exe”, “c:\first.doc”)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Your application terminates after opening the document. Suppose you want to make your application wait for sometime while you work in the document, you can make it wait by using the WaitForExit() method of the process. A small change in your code would make your application wait indefinitely.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #666666;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f3f3f3;&quot;&gt;Dim p As New System.Diagnostics.Process()&lt;br /&gt;
p.Start(&quot;winword.exe&quot;, &quot;c:\first.doc&quot;)&lt;br /&gt;
p.WaitForExit(10000)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;The above code should make your application wait for 10 secs before it terminates. If you don’t pass any arguments to the WaitForExit() method, it will make your application wait indefinitely.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;It is possible to set many other process information for the process that opens the external application. For example for the above process which opens the MS Word application you can also set other process information as given in the code below:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #666666;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f3f3f3;&quot;&gt;Module Module1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #666666;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f3f3f3;&quot;&gt;Sub Main()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #666666;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f3f3f3;&quot;&gt;Dim pi As New System.Diagnostics.ProcessStartInfo()&lt;br /&gt;
pi.FileName = &quot;winword.exe&quot;&lt;br /&gt;
pi.Arguments = &quot;c:\first.doc&quot;&lt;br /&gt;
pi.WorkingDirectory = &quot;c:\&quot;&lt;br /&gt;
pi.WindowStyle = ProcessWindowStyle.Maximized&lt;br /&gt;
Dim p As New System.Diagnostics.Process()&lt;br /&gt;
p.Start(pi)&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #666666;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f3f3f3;&quot;&gt;End Module&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;You can set the process start information properties such as Arguments, WorkingDirectory, and WindowStyle using the above code. There are other properties that might be useful to you. The Arguments property takes the filename that is to be opened, and the FileName properties takes the application name that is to be opened. You can set the working directory using the WorkingDirectory property. The window style can also be set using the WindowStyle property.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;In some case you might be required to redirect the users to some web page in the internet. To achieve this you can just pass the URL of the web page to the Start method of the process as given below:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #666666;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f3f3f3;&quot;&gt;System.Diagnostics.Process.Start(“www.yoursite.com”)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;The above code opens the default browser in your system to open the website given in the URL that is passed to the Start method. Thus you find it is easy to call an external application from your .Net application.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/2267148726188323806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2010/07/how-to-call-other-external-applications.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/2267148726188323806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/2267148726188323806'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2010/07/how-to-call-other-external-applications.html' title='How to call other external applications from your .Net application?'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-6410599777161463037</id><published>2010-03-22T23:28:00.001-07:00</published><updated>2010-03-22T23:28:54.622-07:00</updated><title type='text'>Web Service - Understanding WSDL and UDDI</title><content type='html'>&lt;h1 align=&quot;center&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal;&quot;&gt;Web Services Description Language (WSDL) is one of the prime specifications in web services, the other two being SOAP and UDDI. WSDL is the description language for web services that describes a set of SOAP messages and how these messages are exchanged across network. WSDL will be in XML format; therefore it can be easily understood and edited by humans and machines.&lt;/span&gt;&lt;/h1&gt;&lt;table align=&quot;left&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 34px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td valign=&quot;center&quot;&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Another advantage of WSDL being in XML format is that it is programming language independent and also platform independent. In addition, WSDL defines where the web service is available from and what communications protocol has been used to talk to the web service. As a result the WSDL file describes everything that is required to write a program for an XML Web service. There are tools available in Microsoft Visual Studio .NET to read a WSDL file and generate the code required to communicate with an XML Web service.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Universal Discovery Description Language (UDDI) is a directory where you can expose your web services for other users to easily access it. You can also consume the web service that is already posted in UDDI. However, you can also post a web service without registering it in UDDI. DISCO is another directory where you can post your web service. But if you want to reach to maximum of customers, you can place it in UDDI. The UDDI directory offers three parts for you to register:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;• White Pages&lt;br /&gt;
• Yellow Pages&lt;br /&gt;
• Green Pages&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;The white pages consist of the description such as name and address of the company offering the service. The yellow pages consist of industrial categories based on standard taxonomies such as North American Industry Classification System and Standard Industrial Classification. The green pages describe the interface to the web service in detail so that anyone can write an application after using the web service. Web services are described in UDDI directory through a document called Type Model or tmodel. Normally, this tModel contains a WSDL file that describes a SOAP interface to an XML Web service, but the tModel is flexible enough to describe almost any kind of web service.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Apart from using the web services from UDDI, you can also search a particular web service in UDDI. In addition, you can search for companies’ information that posted web services. In certain times, you might know the names of the companies that offer web services but you may not be aware of the web services that they offer. The WS Inspection is a specification in UDDI that allows you to search for a collection of web services that are located in a particular company name. You can evaluate these web services according to your requirements.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/6410599777161463037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2010/03/web-service-understanding-wsdl-and-uddi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/6410599777161463037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/6410599777161463037'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2010/03/web-service-understanding-wsdl-and-uddi.html' title='Web Service - Understanding WSDL and UDDI'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-1819751547694294671</id><published>2010-03-20T08:37:00.000-07:00</published><updated>2010-03-20T08:37:31.080-07:00</updated><title type='text'>What is Global.asax ? How to use it in .Net web projects ?</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; color: darkblue; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;The Global.asx file is an optional file that contains code for responding to application level events raised by ASP.NET. This file is also called as ASP.NET application file. This file resides in the root directory of an application. If we are not defining this file in application, the ASP.NET page framework assumes that you have not defined any applicationa/Session events in the application.&lt;br /&gt;
&lt;br /&gt;
Followign are the list of events handled in the global.asax file.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Event: Application_Start&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
When an application starts. This event occurs only one time in an application’s life cycle. It occurs again when you restart the application. It’s the best place to count number of visitors.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Event: Application_End&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
This event occurs when application ends.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Event: Session_Start&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
This event occurs whenever a new session starts. This is the best place to count user sessions for an application&lt;br /&gt;
&lt;br /&gt;
Practical Usage: Setting user specific values, caching items based upon user context.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Event: Session_End&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
This event Opposite of the previous event.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Event: Application_Error&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
This event occurs when an unhandled error or exception occurs in an application.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Event: Application_BeginRequest&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
This event occurs every time when server makes a request. This event may occur multiple times in an applications life cycle.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Event: Application_End&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
This event occurs when an application closes&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/1819751547694294671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2010/03/what-is-globalasax-how-to-use-it-in-net.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/1819751547694294671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/1819751547694294671'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2010/03/what-is-globalasax-how-to-use-it-in-net.html' title='What is Global.asax ? How to use it in .Net web projects ?'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-4999634025679123801</id><published>2010-03-01T22:54:00.000-08:00</published><updated>2010-03-01T22:54:10.589-08:00</updated><title type='text'>Tracking Emails - Know Whether the Recipient Opens it</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;It is very easy to track whether the user has read the email. The concept is very simple. You insert a link to a small transparent image in the mail sent, the mail being sent in HTML format, and when the user opens the email the image is loaded sending you a querystring to the web page that tracks the email. The web page requests the querystring or the parameter that is passed. This ensures that the email is read by the user.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;&lt;div style=&quot;text-align: auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;When the page that is tracking is requested by the email sent you can get the value of the date and time when the request comes and you can store them in a database or send you an alert indicating the time and date at which the email was read by the user. This is the simple way that is used to track whether the emails sent are read or not.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;To send emails you may be importing the namespace System.Web.Mail. You would be creating a MailMessage object as given below.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Imports System.Web.Mail&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;string sBody;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;MailMessage mailMsg = new MailMessage();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;mailMsg.BodyFormat = MailFormat.Html;&lt;br /&gt;
SmtpMail.SmtpServer = “your Server name”;&lt;br /&gt;
mailMsg.From = &quot;your email address&quot;;&lt;br /&gt;
mailMsg.To = “to email address”;&lt;br /&gt;
mailMsg.Subject = “subject line of the mesg”;&lt;br /&gt;
mailMsg.Body = sBody;&lt;br /&gt;
SmtpMail.Send(mailMsg);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;The above code sends an email to an email address as given in the mailMsg.To property. For tracking an email, all you have to do is to add an image tag to the body of the message i.e. sBody. This can be done by&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;sBody = sBody + &quot;&lt;img +=&quot;&quot; \&quot;=&quot;&quot; height=&quot;1&quot; src=&quot;\&amp;quot;http://www.&amp;quot;&quot; syourdomain=&quot;&quot; trackemail.aspx?sentto=&quot; + sParam + &quot; width=&quot;1&quot; /&gt;&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;In the above line sParam is the parameter that is passed to the url and sYourDomain is your domain name where you create this page to track the email. If you send an email with the body of the message as given above, when the user reads the email, the image tag will try to load the url given in the tag. This will send the parameter “sentto” that is given by you to the page requested. In the trackemail.aspx page you can write code to retrieve the value of the parameter “sentto”. Once you receive the parameter you can do anything on that page to indicate that the user has read the email.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;The code given below can be used in the trackemail.aspx page to retrieve the parameter.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;private void Page_Load(object sender, System.EventArgs e)&lt;br /&gt;
{&lt;br /&gt;
if ( Page.IsPostBack == false )&lt;br /&gt;
{&lt;br /&gt;
if ( Request.Params[&quot;sentto&quot;] != null )&lt;br /&gt;
&lt;br /&gt;
//here you can send a mail to yourself&lt;br /&gt;
...&lt;br /&gt;
mailMsg.Body = Request.Params[&quot;sentto&quot;].ToString()&lt;br /&gt;
+ “ has read your email”;&lt;br /&gt;
...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Response.Redirect(&quot;transparent.gif&quot;);&lt;br /&gt;
}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Once you have retrieved the parameter that is passed to the page you can redirect the request to a transparent image so that this transparent image, “transparent.gif” loads in the email message of the user who is reading the mail. Make this “transparent.gif” as small as possible, usually of 1 pixel by 1 pixel height and width, so that it does not take time to load. Since it is transparent the user who reads your mail may not know that an image has been loaded in the email message and the email that he reads is being tracked.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;This way of tracking the email is so easy. Once you get the parameter in your trackemail.aspx page you can add a time stamp to the body of the email message that is sent to you in the Page_Load event of that page. This enables you to know the time and date at which the email was read by the user.&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/4999634025679123801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2010/03/tracking-emails-know-whether-recipient.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/4999634025679123801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/4999634025679123801'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2010/03/tracking-emails-know-whether-recipient.html' title='Tracking Emails - Know Whether the Recipient Opens it'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-4079380820539890697</id><published>2010-02-12T08:18:00.000-08:00</published><updated>2010-02-12T08:18:47.719-08:00</updated><title type='text'>Software Development Life cycle(SDLC)</title><content type='html'>&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/AVvXsEjY1axUF9XUmGMr3N0uBBKMIOXMoCW1msVntDzccBLwe7_1MyhAKU15hfomzXPME-1WUyCNuidvxsLcYjj52LSLPe0cAJ9ESX3l-4c-Ilv0sBddUeqYCNExxKEu3BC60-6z1wPOzsmywAc/s1600-h/800px-Systems_Development_Life_Cycle.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY1axUF9XUmGMr3N0uBBKMIOXMoCW1msVntDzccBLwe7_1MyhAKU15hfomzXPME-1WUyCNuidvxsLcYjj52LSLPe0cAJ9ESX3l-4c-Ilv0sBddUeqYCNExxKEu3BC60-6z1wPOzsmywAc/s640/800px-Systems_Development_Life_Cycle.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/4079380820539890697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2010/02/software-development-life-cyclesdlc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/4079380820539890697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/4079380820539890697'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2010/02/software-development-life-cyclesdlc.html' title='Software Development Life cycle(SDLC)'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY1axUF9XUmGMr3N0uBBKMIOXMoCW1msVntDzccBLwe7_1MyhAKU15hfomzXPME-1WUyCNuidvxsLcYjj52LSLPe0cAJ9ESX3l-4c-Ilv0sBddUeqYCNExxKEu3BC60-6z1wPOzsmywAc/s72-c/800px-Systems_Development_Life_Cycle.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-3245729208865137514</id><published>2010-02-06T00:33:00.001-08:00</published><updated>2010-02-06T00:33:49.157-08:00</updated><title type='text'>Using Data Transformation Services (DTS)</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #434343; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
This procedure details the recommended method for transferring a database from a development server to one of our shared servers. The first half of the article covers how to generate an SQL script for all database objects. The second half of the article covers how to transfer the database to the destination server using the DTS Import/Export Wizard.&lt;br /&gt;
Unfortunately, the transfer functionality is limited (due to the non-DBO privileges of the user). Using the DTS Import/Export Wizard, it is not possible to transfer user-defined data types. Also, indexes, keys, and constraints may not transfer correctly. It might be possible to use a custom DTS script to accomplish a full transfer of all objects, however, that would be beyond the scope of our support.&lt;br /&gt;
This procedure is applicable to DTS transfers using the following SQL Server combinations:&lt;br /&gt;
&lt;ul class=&quot;UL&quot;&gt;&lt;li style=&quot;color: #005596; list-style-image: url(http://support.verio.com/images/global/bullet.gif); list-style-position: initial; list-style-type: none; margin-bottom: 6px; margin-left: 0px; margin-right: 0px; margin-top: 6px;&quot;&gt;SQL 7 to SQL 7&lt;/li&gt;


&lt;li style=&quot;color: #005596; list-style-image: url(http://support.verio.com/images/global/bullet.gif); list-style-position: initial; list-style-type: none; margin-bottom: 6px; margin-left: 0px; margin-right: 0px; margin-top: 6px;&quot;&gt;SQL 7 to SQL 2000&lt;/li&gt;


&lt;li style=&quot;color: #005596; list-style-image: url(http://support.verio.com/images/global/bullet.gif); list-style-position: initial; list-style-type: none; margin-bottom: 6px; margin-left: 0px; margin-right: 0px; margin-top: 6px;&quot;&gt;SQL 2000 to SQL 2000&lt;/li&gt;
&lt;/ul&gt;&lt;img alt=&quot;Note:&quot; height=&quot;33&quot; name=&quot;note&quot; src=&quot;http://support.verio.com/documents/images/shared/00note.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;31&quot; /&gt;&amp;nbsp;In this procedure, SQL 2000 is used as an example. If you are using SQL 7, the images might appear slightly different, but the steps will remain the same.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Generating SQL Scripts Using Enterprise Manager:&lt;/span&gt;&lt;br /&gt;
&lt;img alt=&quot;Step one:&quot; height=&quot;37&quot; name=&quot;small01&quot; src=&quot;http://support.verio.com/documents/images/shared/01.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;With the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Enterprise Manager&lt;/span&gt;&amp;nbsp;open, right-click the source database, select&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;All Tasks&lt;/span&gt;, and click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Generate SQL Script&lt;/span&gt;.&lt;br /&gt;
&lt;img alt=&quot;Image of step one&quot; height=&quot;445&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_script_01.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;494&quot; /&gt;&lt;br /&gt;
&lt;img alt=&quot;Step two:&quot; height=&quot;37&quot; name=&quot;small02&quot; src=&quot;http://support.verio.com/documents/images/shared/02.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;Within the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Generate SQL Scripts&lt;/span&gt;&amp;nbsp;dialog box, from the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;General&lt;/span&gt;&amp;nbsp;tab, first click the&amp;nbsp;&lt;strong&gt;Show All&lt;/strong&gt;&amp;nbsp;button and then click to select&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Script all objects&lt;/span&gt;.&lt;br /&gt;
&lt;img alt=&quot;step 2 for 3846&quot; border=&quot;0&quot; height=&quot;259&quot; src=&quot;http://support.verio.com/imgtemp/1317.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; /&gt;&lt;br /&gt;
&lt;img alt=&quot;Step three:&quot; height=&quot;37&quot; name=&quot;small03&quot; src=&quot;http://support.verio.com/documents/images/shared/03.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Formatting&lt;/span&gt;&amp;nbsp;tab, click to select&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Generate the CREATE &lt;object&gt; command for each object.
&lt;img alt=&quot;Image of step three&quot; height=&quot;273&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_script_03.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;509&quot; /&gt;
&lt;img alt=&quot;Step four:&quot; height=&quot;37&quot; name=&quot;small04&quot; src=&quot;http://support.verio.com/documents/images/shared/04.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Options&lt;/span&gt;&amp;nbsp;tab, click to clear all&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Security Scripting Options&lt;/span&gt;. Click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;OK&lt;/span&gt;.
&lt;img alt=&quot;Image of step four&quot; height=&quot;366&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_script_04.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;509&quot; /&gt;
&lt;img alt=&quot;Step five:&quot; height=&quot;37&quot; name=&quot;small05&quot; src=&quot;http://support.verio.com/documents/images/shared/05.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;Once complete, open the script using a text editor, and replace all instances of&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;dbo&lt;/span&gt;&amp;nbsp;(or whichever userID owned the objects on the source server) with your userID. Also, remove any calls to the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;setuser&lt;/span&gt;&amp;nbsp;function, as these will fail.
&lt;img alt=&quot;Warning:&quot; height=&quot;30&quot; name=&quot;warning&quot; src=&quot;http://support.verio.com/documents/images/shared/00warning.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;34&quot; /&gt;&amp;nbsp;If you chose the option&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Generate the DROP &lt;object&gt; command for each object&amp;nbsp;in&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Step 3&lt;/span&gt;, you will need to leave the reference to&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;dbo&lt;/span&gt;&amp;nbsp;in the parts of the script where system tables such as sysobjects, systypes, and so on. are being qualified.
&lt;img alt=&quot;Warning:&quot; height=&quot;30&quot; name=&quot;warning&quot; src=&quot;http://support.verio.com/documents/images/shared/00warning.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;34&quot; /&gt;&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Enterprise Manager&lt;/span&gt;&amp;nbsp;does not always generate the statements in the correct order, so it may be necessary to move things around in the script. For example, it might generate a statement for a stored-procedure or a user-defined function that references a table that was created further down in the script.
&lt;img alt=&quot;Step six:&quot; height=&quot;37&quot; name=&quot;small06&quot; src=&quot;http://support.verio.com/documents/images/shared/06.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;Execute the script on the destination server.

&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;a href=&quot;&quot; id=&quot;wizard&quot; name=&quot;wizard&quot; style=&quot;color: #008b00; text-decoration: underline;&quot;&gt;&lt;/a&gt;Transferring Databases Using the DTS Import/Export Wizard:&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;img alt=&quot;Note:&quot; height=&quot;33&quot; name=&quot;note&quot; src=&quot;http://support.verio.com/documents/images/shared/00note.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;31&quot; /&gt;&amp;nbsp;If your tables have foreign key constraints and relationships defined, you might have to transfer your data in separate batches so that you dont violate referential integrity.&lt;/div&gt;&lt;img alt=&quot;Step one:&quot; height=&quot;37&quot; name=&quot;small01&quot; src=&quot;http://support.verio.com/documents/images/shared/01.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;With the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Enterprise Manager&lt;/span&gt;&amp;nbsp;open, right-click the source database, select&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;All Tasks&lt;/span&gt;, and click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Export Data&lt;/span&gt;.
&lt;img alt=&quot;Image of step one&quot; height=&quot;440&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_01.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;494&quot; /&gt;
&lt;img alt=&quot;Step two:&quot; height=&quot;37&quot; name=&quot;small02&quot; src=&quot;http://support.verio.com/documents/images/shared/02.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Data Transformation Services Import/Export Wizard&lt;/span&gt;&amp;nbsp;dialog box, click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Next&lt;/span&gt;.
&lt;img alt=&quot;Image of step two&quot; height=&quot;315&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_02.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;503&quot; /&gt;
&lt;img alt=&quot;Step three:&quot; height=&quot;37&quot; name=&quot;small03&quot; src=&quot;http://support.verio.com/documents/images/shared/03.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;In the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Choose a Data Source&lt;/span&gt;&amp;nbsp;dialog box, from the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Data Source&lt;/span&gt;&amp;nbsp;drop-down menu, click to select your data source type.
&lt;img alt=&quot;Image of step three and four&quot; height=&quot;418&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_034.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;501&quot; /&gt;
&lt;img alt=&quot;Step four:&quot; height=&quot;37&quot; name=&quot;small04&quot; src=&quot;http://support.verio.com/documents/images/shared/04.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Server&lt;/span&gt;&amp;nbsp;drop-down menu, click to select the source server.
&lt;img alt=&quot;Step five:&quot; height=&quot;37&quot; name=&quot;small05&quot; src=&quot;http://support.verio.com/documents/images/shared/05.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;Click to choose the preferred method of authentication.
&lt;img alt=&quot;Note:&quot; height=&quot;33&quot; name=&quot;note&quot; src=&quot;http://support.verio.com/documents/images/shared/00note.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;31&quot; /&gt;&amp;nbsp;If you choose&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Use SQL Server Authentication&lt;/span&gt;, you will need to provide a&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Username&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Password&lt;/span&gt;.
&lt;img alt=&quot;Image of step five, six, and note&quot; height=&quot;418&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_056note.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;502&quot; /&gt;
&lt;img alt=&quot;Step six:&quot; height=&quot;37&quot; name=&quot;small06&quot; src=&quot;http://support.verio.com/documents/images/shared/06.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Database&lt;/span&gt;&amp;nbsp;drop-down menu, click to select the database you want to copy, and click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Next&lt;/span&gt;.
&lt;img alt=&quot;Step seven:&quot; height=&quot;37&quot; name=&quot;small07&quot; src=&quot;http://support.verio.com/documents/images/shared/07.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;In the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Choose a destination&lt;/span&gt;&amp;nbsp;dialog box, from the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Destination&lt;/span&gt;&amp;nbsp;drop-down menu, click to select your destination data source type.
&lt;img alt=&quot;Image of step seven and eight&quot; height=&quot;405&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_078.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;501&quot; /&gt;
&lt;img alt=&quot;Step eight:&quot; height=&quot;36&quot; name=&quot;small08&quot; src=&quot;http://support.verio.com/documents/images/shared/08.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Server&lt;/span&gt;&amp;nbsp;drop-down menu, click to select the destination server.
&lt;img alt=&quot;Step nine:&quot; height=&quot;37&quot; name=&quot;small09&quot; src=&quot;http://support.verio.com/documents/images/shared/09.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;Click to choose the preferred method of authentication.
&lt;img alt=&quot;Note:&quot; height=&quot;33&quot; name=&quot;note&quot; src=&quot;http://support.verio.com/documents/images/shared/00note.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;31&quot; /&gt;&amp;nbsp;If you choose&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Use SQL Server Authentication&lt;/span&gt;, you will need to provide a&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Username&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Password&lt;/span&gt;.
&lt;img alt=&quot;Image of step nine, ten, and note&quot; height=&quot;410&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_0910note.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;505&quot; /&gt;
&lt;img alt=&quot;Step ten:&quot; height=&quot;37&quot; name=&quot;small10&quot; src=&quot;http://support.verio.com/documents/images/shared/10.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Database&lt;/span&gt;&amp;nbsp;drop-down menu, click to select the database you will be copying to, and click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Next&lt;/span&gt;.
&lt;img alt=&quot;Step eleven:&quot; height=&quot;37&quot; name=&quot;small11&quot; src=&quot;http://support.verio.com/documents/images/shared/11.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Specify Table Copy or Query&lt;/span&gt;&amp;nbsp;dialog box, click to choose whether you want to copy one or more tables or the results of a query from the source database. Click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Next&lt;/span&gt;.
&lt;img alt=&quot;Image of step eleven&quot; height=&quot;405&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_11.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;505&quot; /&gt;
&lt;img alt=&quot;Step twelve:&quot; height=&quot;37&quot; name=&quot;small12&quot; src=&quot;http://support.verio.com/documents/images/shared/12.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Select Source Tables and Views&lt;/span&gt;&amp;nbsp;dialog box, click to select all available tables, and then click to clear all views. Click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Next&lt;/span&gt;.
&lt;img alt=&quot;Image of step twelve&quot; height=&quot;405&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_12.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;505&quot; /&gt;
&lt;img alt=&quot;Step thirteen:&quot; height=&quot;37&quot; name=&quot;small13&quot; src=&quot;http://support.verio.com/documents/images/shared/13.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Save, schedule, and replicate package&lt;/span&gt;&amp;nbsp;dialog box, click to select&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Run Immediately&lt;/span&gt;. Click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Next&lt;/span&gt;.
&lt;img alt=&quot;Image of step thirteen&quot; height=&quot;297&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_13.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;503&quot; /&gt;
&lt;img alt=&quot;Step fourteen:&quot; height=&quot;37&quot; name=&quot;small14&quot; src=&quot;http://support.verio.com/documents/images/shared/14.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Completing the DTS Import/Export Wizard&lt;/span&gt;&amp;nbsp;dialog box, review the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Summary&lt;/span&gt;&amp;nbsp;and click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Finish&lt;/span&gt;.
&lt;img alt=&quot;Image of step fourteen&quot; height=&quot;405&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_14.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;505&quot; /&gt;
&lt;img alt=&quot;Step fifteen:&quot; height=&quot;37&quot; name=&quot;small15&quot; src=&quot;http://support.verio.com/documents/images/shared/15.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;DTS Import/Export Wizard&lt;/span&gt;&amp;nbsp;confirmation dialog box, click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;OK&lt;/span&gt;.
&lt;img alt=&quot;Image of step fifteen&quot; height=&quot;192&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_15.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;485&quot; /&gt;
&lt;img height=&quot;37&quot; src=&quot;http://support.verio.com/documents/images/shared/16.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Executing Package&lt;/span&gt;&amp;nbsp;dialog box, wait for the process to complete and click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Done&lt;/span&gt;.
&lt;img alt=&quot;Image of step sixteen&quot; height=&quot;310&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_16.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;470&quot; /&gt;
&lt;img alt=&quot;Note:&quot; height=&quot;33&quot; name=&quot;note&quot; src=&quot;http://support.verio.com/documents/images/shared/00note.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;31&quot; /&gt;&amp;nbsp;All data and tables should be copied. Now it is time to copy over the other SQL Server objects.
&lt;img height=&quot;37&quot; src=&quot;http://support.verio.com/documents/images/shared/17.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;Repeat&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Step 1&lt;/span&gt;&amp;nbsp;through&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;10&lt;/span&gt;&amp;nbsp;of the&amp;nbsp;&lt;a href=&quot;http://support.verio.com/documents/view_article.cfm?doc_id=3846#wizard&quot; style=&quot;color: #008b00; text-decoration: underline;&quot;&gt;DTS Import\Export Wizard&lt;/a&gt;&amp;nbsp;section.
&lt;img height=&quot;37&quot; src=&quot;http://support.verio.com/documents/images/shared/18.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Specify Table Copy or Query&lt;/span&gt;&amp;nbsp;dialog box, click to select&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Copy objects and data between SQL Server databases&lt;/span&gt;. Click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Next&lt;/span&gt;.
&lt;img alt=&quot;Image of step eighteen&quot; height=&quot;285&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_18.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;505&quot; /&gt;
&lt;img height=&quot;37&quot; src=&quot;http://support.verio.com/documents/images/shared/19.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Select Objects to Copy&lt;/span&gt;&amp;nbsp;dialog box, click to select&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Create destination objects (tables, views, stored procedures, constraints, etc.)&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Drop destination objects first&lt;/span&gt;.
&lt;img alt=&quot;Image of step nineteen and twenty&quot; height=&quot;405&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_1920.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;505&quot; /&gt;
&lt;img height=&quot;37&quot; src=&quot;http://support.verio.com/documents/images/shared/20.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;38&quot; /&gt;&amp;nbsp;Click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Next&lt;/span&gt;.
&lt;img height=&quot;33&quot; src=&quot;http://support.verio.com/documents/images/shared/21.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;35&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Select Objects&lt;/span&gt;&amp;nbsp;dialog box, click to clear&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Show all tables&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Show user-defined data types&lt;/span&gt;.&quot;
&lt;img alt=&quot;Image of step twenty-one and twenty-two&quot; height=&quot;423&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_2122.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;469&quot; /&gt;
&lt;img height=&quot;33&quot; src=&quot;http://support.verio.com/documents/images/shared/22.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;35&quot; /&gt;&amp;nbsp;Click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;OK&lt;/span&gt;.
&lt;img height=&quot;33&quot; src=&quot;http://support.verio.com/documents/images/shared/23.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;35&quot; /&gt;&amp;nbsp;In the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Advanced Copy Options&lt;/span&gt;&amp;nbsp;dialog box, from the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Security options&lt;/span&gt;&amp;nbsp;section, click to clear all three security options. Click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;OK&lt;/span&gt;.
&lt;img alt=&quot;Image of step twenty-three&quot; height=&quot;326&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_23.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;469&quot; /&gt;
&lt;img height=&quot;33&quot; src=&quot;http://support.verio.com/documents/images/shared/24.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;35&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Save, schedule, and replicate package&lt;/span&gt;&amp;nbsp;dialog box, click to select&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Run immediately&lt;/span&gt;. Click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Next&lt;/span&gt;.
&lt;img alt=&quot;Image of step twenty-four&quot; height=&quot;345&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_24.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;503&quot; /&gt;
&lt;img height=&quot;33&quot; src=&quot;http://support.verio.com/documents/images/shared/25.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;35&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;DTS Import/Export Wizard&lt;/span&gt;&amp;nbsp;confirmation dialog box, click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;OK&lt;/span&gt;.
&lt;img alt=&quot;Image of step twenty-five&quot; height=&quot;191&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_25.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;467&quot; /&gt;
&lt;img height=&quot;33&quot; src=&quot;http://support.verio.com/documents/images/shared/26.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;35&quot; /&gt;&amp;nbsp;From the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Executing Package&lt;/span&gt;&amp;nbsp;dialog box, wait for the process to complete and click&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Done&lt;/span&gt;.
&lt;img alt=&quot;Image of step twenty-six&quot; height=&quot;281&quot; src=&quot;http://support.verio.com/documents/images/ves30066/ves30066_wizard_26.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;470&quot; /&gt;
&lt;/object&gt;&lt;/span&gt;&lt;/object&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/3245729208865137514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2010/02/using-data-transformation-services-dts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/3245729208865137514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/3245729208865137514'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2010/02/using-data-transformation-services-dts.html' title='Using Data Transformation Services (DTS)'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-5668962088908620504</id><published>2010-01-21T20:32:00.000-08:00</published><updated>2010-01-21T20:32:02.867-08:00</updated><title type='text'>Click and Retrieve the Value of a GridView Cell using jQuery</title><content type='html'>&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;This article demonstrates how to click and retrieve data from a GridView cell.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Head1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;Click and retrieve Cell Value&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;style&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/css&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #a31515;&quot;&gt;.highlite&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;background-color&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;Gray&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.gv &amp;gt; tbody &amp;gt; tr:not(:has(table, th))&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; .css(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;cursor&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;pointer&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; .click(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(e) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.gv td&quot;&lt;/span&gt;).removeClass(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;highlite&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; $cell = $(e.target).closest(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;td&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; $cell.addClass(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;highlite&#39;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; $currentCellText = $cell.text();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; $leftCellText = $cell.prev().text();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; $rightCellText = $cell.next().text();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; $colIndex = $cell.parent().children().index($cell);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; $colName = $cell.closest(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;table&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .find(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;th:eq(&#39;&lt;/span&gt; + $colIndex + &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;)&#39;&lt;/span&gt;).text();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;#para&quot;&lt;/span&gt;).empty()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; .append(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;b&gt;Current Cell Text: &lt;/b&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + $currentCellText + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;br /&gt;
&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; .append(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;b&gt;Text to Left of Clicked Cell: &lt;/b&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + $leftCellText + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;br /&gt;
&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; .append(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;b&gt;Text to Right of Clicked Cell: &lt;/b&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + $rightCellText + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;br /&gt;
&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; .append(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;b&gt;Column Name of Clicked Cell: &lt;/b&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + $colName)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;form1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;tableDiv&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;Click on any of the table cells to retrieve information&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; about the cell and its surrounding elements&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;GridView&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;grdEmployees&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: red;&quot;&gt;AllowPaging&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;True&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;PageSize&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;5&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;AutoGenerateColumns&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;False&quot;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;DataSourceID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;ObjectDataSource1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;gv&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Columns&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;BoundField&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;DataField&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;ID&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;HeaderText&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;ID&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;BoundField&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;DataField&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;FName&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;HeaderText&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;FName&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;BoundField&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;DataField&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;MName&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;HeaderText&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;MName&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;BoundField&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;DataField&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;LName&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;HeaderText&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;LName&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;BoundField&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;DataField&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;DOB&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;HeaderText&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;DOB&quot;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;DataFormatString&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;{0:MM/dd/yyyy}&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;BoundField&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;DataField&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Sex&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;HeaderText&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Sex&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Columns&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;GridView&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;ObjectDataSource&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;ObjectDataSource1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;SelectMethod&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;GetEmployeeList&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;TypeName&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Employee&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;ObjectDataSource&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;para&quot;&amp;gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The ObjectDataSource uses the Employee.cs or Employee.vb class whose definition is as follows:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; System;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; System.Collections.Generic;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; ID { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; FName { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; MName { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; LName { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt; DOB { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt; Sex { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;&amp;gt; GetEmployeeList()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;&amp;gt; empList = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;&amp;gt;();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 1, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;John&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Shields&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;12/11/1971&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 2, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Mary&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Matthew&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Jacobs&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;01/17/1961&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;F&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 3, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Amber&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Carl&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Agar&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;12/23/1971&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 4, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Kathy&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Berry&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;11/15/1976&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;F&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 5, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Lena&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Ashco&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Bilton&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;05/11/1978&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;F&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 6, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Susanne&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Buck&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;03/7/1965&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;F&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 7, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Jim&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Brown&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;09/11/1972&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 8, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Jane&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;G&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Hooks&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;12/11/1972&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;F&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 9, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Robert&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;06/28/1964&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 10, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Krishna&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Murali&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sunkam&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;04/18/1969&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 11, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Cindy&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Preston&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Fox&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;06/15/1978&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 12, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Nicole&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;G&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Holiday&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;08/21/1974&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;F&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 13, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sandra&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;T&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Feng&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;04/15/1976&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;F&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 14, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Roberto&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Tamburello&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;01/06/1982&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 15, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Cynthia&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;O&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Lugo&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;01/21/1968&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 16, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Yuhong&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;R&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Li&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;08/22/1979&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 17, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Alex&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Shoop&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;03/01/1972&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 18, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Jack&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;K&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Brown&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;04/11/1978&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 19, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Andrew&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;U&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Gibson&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;08/21/1977&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 20, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;George&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;K&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Wood&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;07/15/1972&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 21, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Eugene&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Miller&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;09/13/1974&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 22, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Russell&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Gorgi&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;08/19/1978&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 23, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Katie&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sylar&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;08/21/1978&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 24, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Michael&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;M&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Bentler&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;11/26/1977&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 25, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Barbara&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;L&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Duffy&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;05/29/1972&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 26, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Stefen&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;J&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Northup&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;01/26/1972&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 27, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Shane&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Nay&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;02/21/1978&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 28, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Brenda&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Lugo&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;08/18/1981&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;F&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 29, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Shammi&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;I&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Rai&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;03/13/1968&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 30, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Rajesh&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;H&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Vyas&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;04/19/1969&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Employee&lt;/span&gt;() { ID = 31, FName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Gabe&quot;&lt;/span&gt;, MName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;P&quot;&lt;/span&gt;, LName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Lloyd&quot;&lt;/span&gt;, DOB = &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Parse(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;08/21/1971&quot;&lt;/span&gt;), Sex = &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;M&#39;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; empList;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Imports&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; System&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Imports&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; System.Collections.Generic&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Class&lt;/span&gt; Employee&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt; privateID &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt; ID() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; privateID&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; value &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; privateID = value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt; privateFName &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt; FName() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; privateFName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; value &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; privateFName = value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt; privateMName &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt; MName() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; privateMName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; value &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; privateMName = value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt; privateLName &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt; LName() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; privateLName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; value &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; privateLName = value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt; privateDOB &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; DateTime&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt; DOB() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; DateTime&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; privateDOB&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; value &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; DateTime)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; privateDOB = value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt; privateSex &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Char&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt; Sex() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Char&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; privateSex&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; value &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Char&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; privateSex = value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt; GetEmployeeList() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; List(&lt;span style=&quot;color: blue;&quot;&gt;Of&lt;/span&gt; Employee)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; empList &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; List(&lt;span style=&quot;color: blue;&quot;&gt;Of&lt;/span&gt; Employee)()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 1, .FName = &quot;John&quot;, .MName = &quot;&quot;, .LName = &quot;Shields&quot;, .DOB = DateTime.Parse(&quot;12/11/1971&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 2, .FName = &quot;Mary&quot;, .MName = &quot;Matthew&quot;, .LName = &quot;Jacobs&quot;, .DOB = DateTime.Parse(&quot;01/17/1961&quot;), .Sex = &quot;F&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 3, .FName = &quot;Amber&quot;, .MName = &quot;Carl&quot;, .LName = &quot;Agar&quot;, .DOB = DateTime.Parse(&quot;12/23/1971&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 4, .FName = &quot;Kathy&quot;, .MName = &quot;&quot;, .LName = &quot;Berry&quot;, .DOB = DateTime.Parse(&quot;11/15/1976&quot;), .Sex = &quot;F&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 5, .FName = &quot;Lena&quot;, .MName = &quot;Ashco&quot;, .LName = &quot;Bilton&quot;, .DOB = DateTime.Parse(&quot;05/11/1978&quot;), .Sex = &quot;F&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 6, .FName = &quot;Susanne&quot;, .MName = &quot;&quot;, .LName = &quot;Buck&quot;, .DOB = DateTime.Parse(&quot;03/7/1965&quot;), .Sex = &quot;F&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 7, .FName = &quot;Jim&quot;, .MName = &quot;&quot;, .LName = &quot;Brown&quot;, .DOB = DateTime.Parse(&quot;09/11/1972&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 8, .FName = &quot;Jane&quot;, .MName = &quot;G&quot;, .LName = &quot;Hooks&quot;, .DOB = DateTime.Parse(&quot;12/11/1972&quot;), .Sex = &quot;F&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 9, .FName = &quot;Robert&quot;, .MName = &quot;&quot;, .LName = &quot;&quot;, .DOB = DateTime.Parse(&quot;06/28/1964&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 10, .FName = &quot;Krishna&quot;, .MName = &quot;Murali&quot;, .LName = &quot;Sunkam&quot;, .DOB = DateTime.Parse(&quot;04/18/1969&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 11, .FName = &quot;Cindy&quot;, .MName = &quot;Preston&quot;, .LName = &quot;Fox&quot;, .DOB = DateTime.Parse(&quot;06/15/1978&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 12, .FName = &quot;Nicole&quot;, .MName = &quot;G&quot;, .LName = &quot;Holiday&quot;, .DOB = DateTime.Parse(&quot;08/21/1974&quot;), .Sex = &quot;F&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 13, .FName = &quot;Sandra&quot;, .MName = &quot;T&quot;, .LName = &quot;Feng&quot;, .DOB = DateTime.Parse(&quot;04/15/1976&quot;), .Sex = &quot;F&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 14, .FName = &quot;Roberto&quot;, .MName = &quot;&quot;, .LName = &quot;Tamburello&quot;, .DOB = DateTime.Parse(&quot;01/06/1982&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 15, .FName = &quot;Cynthia&quot;, .MName = &quot;O&quot;, .LName = &quot;Lugo&quot;, .DOB = DateTime.Parse(&quot;01/21/1968&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 16, .FName = &quot;Yuhong&quot;, .MName = &quot;R&quot;, .LName = &quot;Li&quot;, .DOB = DateTime.Parse(&quot;08/22/1979&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 17, .FName = &quot;Alex&quot;, .MName = &quot;&quot;, .LName = &quot;Shoop&quot;, .DOB = DateTime.Parse(&quot;03/01/1972&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 18, .FName = &quot;Jack&quot;, .MName = &quot;K&quot;, .LName = &quot;Brown&quot;, .DOB = DateTime.Parse(&quot;04/11/1978&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 19, .FName = &quot;Andrew&quot;, .MName = &quot;U&quot;, .LName = &quot;Gibson&quot;, .DOB = DateTime.Parse(&quot;08/21/1977&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 20, .FName = &quot;George&quot;, .MName = &quot;K&quot;, .LName = &quot;Wood&quot;, .DOB = DateTime.Parse(&quot;07/15/1972&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 21, .FName = &quot;Eugene&quot;, .MName = &quot;&quot;, .LName = &quot;Miller&quot;, .DOB = DateTime.Parse(&quot;09/13/1974&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 22, .FName = &quot;Russell&quot;, .MName = &quot;&quot;, .LName = &quot;Gorgi&quot;, .DOB = DateTime.Parse(&quot;08/19/1978&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 23, .FName = &quot;Katie&quot;, .MName = &quot;&quot;, .LName = &quot;Sylar&quot;, .DOB = DateTime.Parse(&quot;08/21/1978&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 24, .FName = &quot;Michael&quot;, .MName = &quot;M&quot;, .LName = &quot;Bentler&quot;, .DOB = DateTime.Parse(&quot;11/26/1977&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 25, .FName = &quot;Barbara&quot;, .MName = &quot;L&quot;, .LName = &quot;Duffy&quot;, .DOB = DateTime.Parse(&quot;05/29/1972&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 26, .FName = &quot;Stefen&quot;, .MName = &quot;J&quot;, .LName = &quot;Northup&quot;, .DOB = DateTime.Parse(&quot;01/26/1972&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 27, .FName = &quot;Shane&quot;, .MName = &quot;&quot;, .LName = &quot;Nay&quot;, .DOB = DateTime.Parse(&quot;02/21/1978&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 28, .FName = &quot;Brenda&quot;, .MName = &quot;&quot;, .LName = &quot;Lugo&quot;, .DOB = DateTime.Parse(&quot;08/18/1981&quot;), .Sex = &quot;F&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 29, .FName = &quot;Shammi&quot;, .MName = &quot;I&quot;, .LName = &quot;Rai&quot;, .DOB = DateTime.Parse(&quot;03/13/1968&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 30, .FName = &quot;Rajesh&quot;, .MName = &quot;H&quot;, .LName = &quot;Vyas&quot;, .DOB = DateTime.Parse(&quot;04/19/1969&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; empList.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Employee() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 31, .FName = &quot;Gabe&quot;, .MName = &quot;P&quot;, .LName = &quot;Lloyd&quot;, .DOB = DateTime.Parse(&quot;08/21/1971&quot;), .Sex = &quot;M&quot;c})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; empList&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The example starts with a filter applied on the GridView rows&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.gv &amp;gt; tbody &amp;gt; tr:not(:has(table, th))&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;This filter is required since a GridView does not render a THEAD and a TFOOT (accessibility tags) by default. For the header, the GridView generates TH’s inside a TR. Similarly for the footer, the GridView generates a TABLE inside a TR and so on. Hence it is required to use additional filters to exclude header and footer rows while performing operations on the GridView rows. The filter shown above selects only those rows which are inside the TBODY.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;This recipe uses event delegation. Observe how we have used ‘e.target’ to find out the element that was clicked. This object is cached in the ‘cell’ variable. &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; $cell = $(e.target).closest(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;td&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The &lt;i&gt;closest()&lt;/i&gt; as given in the jQuery documentation, “works by first looking at the current element to see if it matches the specified expression, if so it just returns the element itself. If it doesn&#39;t match then it will continue to traverse up the document, parent by parent, until an element is found that matches the specified expression.”&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;With the help of the ‘cell’ variable, we can use the DOM tree traversal methods like &lt;i&gt;prev()&lt;/i&gt; and &lt;i&gt;next()&lt;/i&gt;, to retrieve the value of the immediate ‘preceding’ and ‘following’ elements, respectively. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; $leftCellText = $cell.prev().text();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; $rightCellText = $cell.next().text();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Similarly the column header text is retrieved using the code shown below. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; $colIndex = $cell.parent().children().index($cell);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; $colName = $cell.closest(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;table&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;.find(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;th:eq(&#39;&lt;/span&gt; + $colIndex + &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;)&#39;&lt;/span&gt;).text();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;As shown above, after retrieving the column index, we use the &lt;i&gt;closest() &lt;/i&gt;method to traverse up the DOM, parent by parent until we find the table element. The Header text is then selected using &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;th:eq(&#39;&lt;/span&gt; + $colIndex + &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;)&#39;&lt;/span&gt;).text()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;When a Cell of the GridView is clicked (for example 2&lt;sup&gt;nd&lt;/sup&gt; Row and 3&lt;sup&gt;rd&lt;/sup&gt; Column), the result is as shown below:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;GridView&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/21012010GridView.jpg&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;See a &lt;/span&gt;&lt;a href=&quot;http://www.dotnetcurry.com/ASPNETandjQuery/Section6-GridView/R32-CellClick.aspx&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Live Demo&lt;/span&gt;&lt;/a&gt;.&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The entire &lt;b&gt;source code&lt;/b&gt; of this article can be downloaded over &lt;/span&gt;&lt;a href=&quot;http://cid-2c5f5b0560e374cb.skydrive.live.com/self.aspx/.Public/Uploads/GVClickCelljQuery.zip&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;here&lt;/span&gt;&lt;/a&gt; &lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/5668962088908620504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2010/01/click-and-retrieve-value-of-gridview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/5668962088908620504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/5668962088908620504'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2010/01/click-and-retrieve-value-of-gridview.html' title='Click and Retrieve the Value of a GridView Cell using jQuery'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/th_21012010GridView.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-4450206741586440615</id><published>2009-12-24T21:35:00.000-08:00</published><updated>2009-12-24T21:35:21.527-08:00</updated><title type='text'>Saving an Image in a SQL Server Database</title><content type='html'>&lt;span style=&quot;font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;Most of the         web applications have a lot of images used in it. These images are usually         stored in a web server folder and they are accessed by giving the relative         path to the file with respect to the root folder of the website.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;.Net being         the platform for distributed application now, ASP.Net can be used to store         images that are small to be stored in a database like SQL Server 2000         and later versions. For this purpose the SQL Server database provides         a data type called “image” which is used to store images in         the database.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;To access         these images stored in the database we will be using the ADO.Net classes.         To find out how to insert and retrieve an image in to the SQL Server database,         you can create a .aspx page which can have a HTMLInputFile control which         is used to select the image file that is to be saved in the database.         &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;You can also         create a textbox control in which you can add the image name or some comment         or an image id for the image saved. Use a button control to upload the         image to the database. Namespaces like System.Data.SqlClient, System.Drawing,         System.Data, System.IO, and System.Drawing.Imaging are used in this task.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;In the OnClick         property of the button you can write the following code to upload an image         to the database.&lt;br /&gt;
&lt;br /&gt;
// create a byte[] for the image file that is uploaded&lt;br /&gt;
int imagelen = Upload.PostedFile.ContentLength;&lt;br /&gt;
byte[] picbyte = new byte[imagelen];&lt;br /&gt;
Upload.PostedFile.InputStream.Read (picbyte, 0, imagelen);&lt;br /&gt;
// Insert the image and image id into the database&lt;br /&gt;
SqlConnection conn = new SqlConnection (@&quot;give the connection string         here...&quot;);&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
conn.Open ();&lt;br /&gt;
SqlCommand cmd = new SqlCommand (&quot;insert into ImageTable &quot; &lt;br /&gt;
+ &quot;(ImageField, ImageID) values (@pic, @imageid)&quot;, conn);&lt;br /&gt;
cmd.Parameters.Add (&quot;@pic&quot;, picbyte);&lt;br /&gt;
cmd.Parameters.Add (&quot;@imageid&quot;, lblImageID.Text);&lt;br /&gt;
cmd.ExecuteNonQuery ();&lt;br /&gt;
}&lt;br /&gt;
finally &lt;br /&gt;
{&lt;br /&gt;
conn.Close ();&lt;br /&gt;
}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;You can also         write the above code in a function and call that function in the OnClick         event of the upload button. The code given above performs the following         steps in the process of inserting an image into the database.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;1. Get the         content length of the image that is to be uploaded&lt;br /&gt;
2. Create a byte[] to store the image&lt;br /&gt;
3. Read the input stream of the posted file&lt;br /&gt;
4. Create a connection object&lt;br /&gt;
5. Open the connection object&lt;br /&gt;
6. Create a command object&lt;br /&gt;
7. Add parameters to the command object&lt;br /&gt;
8. Execute the sql command using the ExecuteNonQuery method of the command         object&lt;br /&gt;
9. Close the connection object&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;To retrieve         the image from the SQL Database you can perform the following steps.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;1. Create         a MemoryStream object. The code can be something like,&lt;br /&gt;
MemoryStream mstream = new MemoryStream ();&lt;br /&gt;
2. Create a Connection object&lt;br /&gt;
3. Open the connection to the database&lt;br /&gt;
4. Create a command object to execute the command to retrieve the image&lt;br /&gt;
5. Use the command object’s ExecuteScalar method to retrieve the         image&lt;br /&gt;
6. Cast the output of the ExecuteScalar method to that of byte[]&lt;br /&gt;
byte[] image = (byte[]) command.ExecuteScalar ();&lt;br /&gt;
7. Write the stream&lt;br /&gt;
mstream.Write (image, 0, image.Length);&lt;br /&gt;
8. Create a bitmap object to hold the stream&lt;br /&gt;
Bitmap bitmap = new Bitmap (stream);&lt;br /&gt;
9. Set the content type to “image/gif”&lt;br /&gt;
Response.ContentType = &quot;image/gif&quot;;&lt;br /&gt;
10. Use the Save method of the bitmap object to output the image to the         OutputStream.&lt;br /&gt;
bitmap.Save (Response.OutputStream, ImageFormat.Gif);&lt;br /&gt;
11. Close the connection&lt;br /&gt;
12. Close the stream&lt;br /&gt;
mstream.Close();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;Using the         above steps you can retrieve and display the image from the database to         the web page.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;You can use         these algorithms and take advantage of the “image” data type         available in the SQLServer 2000 database to store small images that correspond         to a particular record in the table of the database. This method of storing         avoids the tedious task of tracking the path of the web folder if the         images are stored in a web folder.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/4450206741586440615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/12/saving-image-in-sql-server-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/4450206741586440615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/4450206741586440615'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/12/saving-image-in-sql-server-database.html' title='Saving an Image in a SQL Server Database'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-341736044595368098</id><published>2009-12-09T01:06:00.000-08:00</published><updated>2009-12-09T01:06:33.105-08:00</updated><title type='text'>Creating Email Triggers in SQL Server 2005</title><content type='html'>&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 15pt;&quot;&gt;Creating Email Triggers in SQL Server 2005&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 15pt;&quot;&gt;&lt;br clear=&quot;all&quot; style=&quot;page-break-before: always;&quot; /&gt;&lt;/span&gt;&lt;/b&gt; &lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 15pt;&quot;&gt;What exactly is a trigger?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;It is a piece of SQL that is activated when a certain event happens or occurs. A common usage is when a new record is added to a database, this triggers an action - for example, a new member triggers an email to the admin for the registration. Or you have certain records in a database table that are assigned to a particular customer and, upon that record being updated, that customer/admin should be notified of the change.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Triggers are useful to fire events and perform some action when data is inserted, updated, or deleted from a table. Microsoft SQL Server&#39;s xp_sendmail stored procedure can be invoked to send an email to one or more recipients.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 15pt;&quot;&gt;Creating the Table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;We will start by creating a table which will hold Customer Information that need to be updated. The name of the table is &lt;b&gt;CustomerInfo&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;img alt=&quot;image004.jpg&quot; border=&quot;0&quot; height=&quot;121&quot; src=&quot;http://www.datasprings.com/Portals/0/image004.jpg&quot; width=&quot;334&quot; /&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;or you can use the following Sql Script&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: rgb(243, 243, 243) none repeat scroll 0% 0%; border-collapse: collapse; border: medium none;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td style=&quot;background-color: transparent; border: 1pt solid windowtext; padding: 0in 5.4pt; width: 426.25pt;&quot; valign=&quot;top&quot; width=&quot;568&quot;&gt; &lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; [CustomerInfo]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Verdana; font-size: 10pt;&quot;&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;[CUSTOMER_ID] [int] &lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;IDENTITY(1,1) &lt;span style=&quot;color: grey;&quot;&gt;NOT&lt;/span&gt;&lt;span&gt; &lt;span style=&quot;color: grey;&quot;&gt;NULL,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[FIRST_NAME] [varchar]&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;50&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;NULL,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[MIDDLE_NAME] [varchar]&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;50&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;NULL,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[LAST_NAME] [nvarchar]&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;50&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;NULL,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Verdana; font-size: 10pt;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 15pt;&quot;&gt;Inserting the Data&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Now, we will insert some dummy data into the table. You can directly insert the data into the table by using the Grid Format or you can just write the script to do that.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 15pt;&quot;&gt;&lt;o:p&gt;&lt;img alt=&quot;image006.jpg&quot; border=&quot;0&quot; height=&quot;83&quot; src=&quot;http://www.datasprings.com/Portals/0/image006.jpg&quot; width=&quot;441&quot; /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;or you can use the following Sql Script&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: rgb(243, 243, 243) none repeat scroll 0% 0%; border-collapse: collapse; border: medium none;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td style=&quot;background-color: transparent; border: 1pt solid windowtext; padding: 0in 5.4pt; width: 426.25pt;&quot; valign=&quot;top&quot; width=&quot;568&quot;&gt; &lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; [CustomerInfo]&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;[CUSTOMER_ID]&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;[FIRST_NAME]&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;[MIDDLE_NAME]&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;[LAST_NAME]&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;1&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Amjad&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Ali&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Leghari&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;INSERT INTO&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; [CustomerInfo]&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;[CUSTOMER_ID]&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;[FIRST_NAME]&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;[MIDDLE_NAME]&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;[LAST_NAME]&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;2&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Ali&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Raza&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Shaikh&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 15pt;&quot;&gt;Creating the Trigger&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Now coming down to the business, we will create the trigger for the &lt;b&gt;CustomerInfo&lt;/b&gt; table, but there are few steps that need to be checked before creating the trigger.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ul style=&quot;margin-top: 0in;&quot; type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Check that the trigger already exists&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;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;If the trigger already exists, then delete it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;If the trigger doesn’t exists, now you can create the specified trigger. Right click on the Trigger section and click on “New Trigger”.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;img alt=&quot;image008.jpg&quot; border=&quot;0&quot; height=&quot;117&quot; src=&quot;http://www.datasprings.com/Portals/0/image008.jpg&quot; width=&quot;215&quot; /&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;This will generate the following template.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: rgb(243, 243, 243) none repeat scroll 0% 0%; border-collapse: collapse; border: medium none;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td style=&quot;background-color: transparent; border: 1pt solid windowtext; padding: 0in 5.4pt; width: 426.25pt;&quot; valign=&quot;top&quot; width=&quot;568&quot;&gt; &lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- ================================================&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- Template generated from Template Explorer using:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- Create Trigger (New Menu).SQL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;--&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- Use the Specify Values for Template Parameters &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- command (Ctrl-Shift-M) to fill in the parameter &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- values below.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;--&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- See additional Create Trigger templates for more&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- examples of different Trigger statements.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;--&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- This block of comments will not be included in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- the definition of the function.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- ================================================&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;ANSI_NULLS&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;QUOTED_IDENTIFIER&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- =============================================&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- Author:&lt;span&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;/span&gt;&lt;author,,name&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/author,,name&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- Create date: &lt;create date,,=&quot;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/create&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- Description:&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;description,,&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/description,,&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- =============================================&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TRIGGER&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;&lt;/span&gt;Schema_Name&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;sysname&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; Schema_Name&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;.&amp;lt;&lt;/span&gt;Trigger_Name&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;sysname&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; Trigger_Name&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;&lt;/span&gt;Schema_Name&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;sysname&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; Schema_Name&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;.&amp;lt;&lt;/span&gt;Table_Name&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;sysname&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; Table_Name&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;AFTER &lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;&lt;/span&gt;Data_Modification_Statements&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;BEGIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- SET NOCOUNT ON added to prevent extra result sets from&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- interfering with SELECT statements.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;NOCOUNT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- Insert statements for trigger here&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;So, now we end up writing the following trigger&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: rgb(243, 243, 243) none repeat scroll 0% 0%; border-collapse: collapse; border: medium none;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td style=&quot;background-color: transparent; border: 1pt solid windowtext; padding: 0in 5.4pt; width: 426.25pt;&quot; valign=&quot;top&quot; width=&quot;568&quot;&gt; &lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- Create Trigger with name &#39;CustomerUpdateMail&#39; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TRIGGER&lt;/span&gt; CustomerUpdateMail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- and the table is CustomerInfo&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; CustomerInfo&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: Verdana; font-size: 10pt;&quot;&gt;-- trigger is fired when an update is made for the table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;FOR&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;UPDATE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: 10pt;&quot;&gt;AS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- holds the CustomerID so we know which Customer was updated&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;declare&lt;/span&gt; @CustomerID &lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;10&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- holds the body of the email&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;declare&lt;/span&gt; @body &lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;2000&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- holds the old customer name which has been changed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;declare&lt;/span&gt; @CustomerName &lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;10&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- holds the new customer name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;declare&lt;/span&gt; @CustomerNewName &lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(1&lt;/span&gt;0&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- gets the previous customer first name that was deleted&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; @CustomerID &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; Customer_id&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@CustomerName &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; d&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;First_Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; deleted d&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- gets the new customer first name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; @CustomerNewName &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; First_Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; inserted&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; @body &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Customer with ID=&#39;&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;&lt;/span&gt;@CustomerID &lt;span style=&quot;color: grey;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39; has been updated&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: red; font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;with previous First Name is &#39;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: grey;&quot;&gt;&lt;/span&gt;@CustomerName &lt;span style=&quot;color: grey;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: red; font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;and the new First Name is &#39;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: grey;&quot;&gt;&lt;/span&gt;@CustomerNewName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;--xp_sendmail is the extended sproc used to send the mail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXEC&lt;/span&gt; master&lt;span style=&quot;color: grey;&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;xp_sendmail&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@recipients &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&lt;a href=&quot;mailto:%27ali_raza_shaikh@datasprings.com%27&quot;&gt;&#39;ali_raza_shaikh@datasprings.com&#39;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@subject &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;Customer Information Updated&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&lt;/span&gt;@message &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; @body&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;So, after writing the trigger, execute it to create the trigger and you can see the newly created trigger under the trigger section.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;img alt=&quot;image010.jpg&quot; border=&quot;0&quot; height=&quot;209&quot; src=&quot;http://www.datasprings.com/Portals/0/image010.jpg&quot; width=&quot;282&quot; /&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 15pt;&quot;&gt;xp_sendmail extended stored procedure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Sends an e-mail message, which may include a query result set attachment, to the specified recipients. This extended stored procedure uses SQL Mail to send the message. In order to use this extended stored procedure you must have SQL Mail Setup. You must grant EXECUTE permissions for the xp_sendmail procedure in the master database. After completing all these steps, the following lines will send the mail to the target recipient.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: rgb(243, 243, 243) none repeat scroll 0% 0%; border-collapse: collapse; border: medium none;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td style=&quot;background-color: transparent; border: 1pt solid windowtext; padding: 0in 5.4pt; width: 426.25pt;&quot; valign=&quot;top&quot; width=&quot;568&quot;&gt; &lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;--xp_sendmail is the extended sproc used to send the mail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXEC&lt;/span&gt; master&lt;span style=&quot;color: grey;&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;xp_sendmail&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@recipients &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&lt;a href=&quot;mailto:%27ali_raza_shaikh@datasprings.com%27&quot;&gt;&#39;deepakkarma@gmail.com&#39;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@subject &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;Customer Information Updated&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&lt;/span&gt;@message &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; @body&lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 15pt;&quot;&gt;Testing the Trigger&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman; font-size: small;&quot;&gt;After the table has been created, we inserted the dummy data into the tables and in the end created a trigger to mail the user about the customer update, now its time to execute the trigger. You can execute the trigger by using the following lines.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;update&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; customerinfo&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; First_Name&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Deepak Update&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; customer_id&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;1&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/341736044595368098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/12/creating-email-triggers-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/341736044595368098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/341736044595368098'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/12/creating-email-triggers-in-sql-server.html' title='Creating Email Triggers in SQL Server 2005'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-2179468174398313585</id><published>2009-12-06T06:24:00.001-08:00</published><updated>2009-12-06T06:25:02.030-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>Create an ASP.NET TextBox Watermark Effect using jQuery</title><content type='html'>&lt;div style=&quot;margin: 24pt 0in 0pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #365f91; font-family: Cambria; font-size: large;&quot;&gt;Create an ASP.NET TextBox Watermark Effect using jQuery&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;This short article demonstrates how to create a watermark effect on your TextBox and display instructions to users, without taking up screen space. This article is a sample chapter from my EBook called &lt;/span&gt;&lt;a href=&quot;http://www.dotnetcurry.com/ShowArticle.aspx?id=403&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;51 Tips, Tricks and Recipes with jQuery and ASP.NET Controls&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;. The chapter has been modified a little to publish it as an article. &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;Note that for demonstration purposes, I have included jQuery code in the same page. Ideally, these resources should be created in separate folders for maintainability. &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;Let us quickly jump to the solution and see how we can create a watermark effect on your TextBox using client-side code.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;DOCTYPE&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;html&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;PUBLIC&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Head1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;TextBox WaterMark&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;style&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/css&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #a31515;&quot;&gt;.water&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;font-family&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;Tahoma,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Arial,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;sans-serif&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;color&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;gray&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.water&quot;&lt;/span&gt;).each(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; $tb = $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; ($tb.val() != &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.title) {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; $tb.removeClass(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;water&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; }&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.water&quot;&lt;/span&gt;).focus(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; $tb = $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; ($tb.val() == &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.title) {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; $tb.val(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; $tb.removeClass(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;water&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; }&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.water&quot;&lt;/span&gt;).blur(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; $tb = $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; ($.trim($tb.val()) == &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;) {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; $tb.val(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.title);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; $tb.addClass(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;water&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; }&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;form1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;smallDiv&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;TextBox Watermark Demonstration&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;TextBox&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;txtFNm&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;water&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Type your First Name&quot;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;Tooltip&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Type your First Name&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;TextBox&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;txtLNm&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;water&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Type your Last Name&quot;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;Tooltip&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Type your Last Name&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Button&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;btnSubmit&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Submit&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tip: Click on the TextBox to start typing. The watermark &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text disappears.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;The code shown above adds the “watermark” behavior to controls marked with the ‘class=water’ attribute. When the user loads the page, a watermarked textbox displays a message to the user. As soon as the watermarked textbox receives focus and the user types some text, the watermark goes away. This technique is a great space saver as you can use it to provide instructions to the user, without using extra controls that take up valuable space on your form. &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp; The ‘Tooltip’ attribute applied to the textbox is crucial to this example. The ‘Tooltip’ gets rendered as ‘title’. Observe the code, as we use this ‘title’ property to compare it to the textbox value and remove the watermark css, when the textbox control gains focus&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;$(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.water&quot;&lt;/span&gt;).focus(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; $tb = $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; ($tb.val() == &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.title) {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; $tb.val(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; $tb.removeClass(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;water&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; }&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;Similarly when the user moves focus to a different control without entering a value in the textbox, we add the watermark css again.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;$(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.water&quot;&lt;/span&gt;).blur(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; $tb = $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; ($.trim($tb.val()) == &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;) {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; $tb.val(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.title);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; $tb.addClass(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;water&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; }&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;The water class declared in Demos.css looks like this:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt; line-height: 115%;&quot;&gt;.water&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt; line-height: 115%;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;font-family&lt;/span&gt;: &lt;span style=&quot;color: blue;&quot;&gt;Tahoma,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Arial,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;sans-serif&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;font-size&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;75%&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;color&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;gray&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt; line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;When the page loads for the first time, the watermark is visible as shown here:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;img alt=&quot;Watermark&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/Watermark1.png&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;When the user enters the First/Last Name and submits the form, the watermark behavior is no more needed to be displayed. This is achieved by comparing the ‘title’ with the ‘value’ of the textbox. If the ‘value’ does not match the ‘title’, this indicates that the user has entered some value in the textboxes and submitted the form. So in this case we remove the watermark appearance. &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;$(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.water&quot;&lt;/span&gt;).each(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; $tb = $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; ($tb.val() != &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.title) {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; $tb.removeClass(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;water&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; }&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;After the user enters the details and submits the form, the result is similar to the one shown here, without the watermark:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;img alt=&quot;Watermark disappears&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/Watermark2.png&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;Thanks to Arnold Matusz for sharing the tip about the tooltip property. The code has been tested on IE 7, IE 8, Firefox 3, Chrome 2, Safari 4 browsers&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;You can see a &lt;a href=&quot;http://www.dotnetcurry.com/ASPNETandjQuery/Section1-TextBox/R12-TextBoxWaterMark.aspx&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Live Demo&lt;/span&gt;&lt;/a&gt; over here&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/2179468174398313585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/12/create-aspnet-textbox-watermark-effect.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/2179468174398313585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/2179468174398313585'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/12/create-aspnet-textbox-watermark-effect.html' title='Create an ASP.NET TextBox Watermark Effect using jQuery'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/th_Watermark1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-5982502707372400443</id><published>2009-11-26T22:23:00.000-08:00</published><updated>2009-11-26T22:23:28.600-08:00</updated><title type='text'>HOW TO: Pass Current Credentials to an ASP.NET Web Service</title><content type='html'>This step-by-step article describes how to pass the user&#39;s current     credentials to an XML Web service that was created by using ASP.NET.&lt;br /&gt;
&lt;br /&gt;
The &lt;b&gt;DefaultCredentials&lt;/b&gt; property of the &lt;b&gt;CredentialCache&lt;/b&gt; class contains the     system credentials of the current security context. For client applications,     these credentials represent the user name, the password, and the domain of the user who is     currently logged on. Client credentials are not passed automatically. To pass the     client&#39;s Windows security context to a Web service, you must set     the &lt;b&gt;Credentials&lt;/b&gt; property of the Web service proxy to &lt;b&gt;CredentialCache.DefaultCredentials&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;topOfPage&quot;&gt;&lt;a href=&quot;http://support.microsoft.com/kb/813834#top&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;h3 id=&quot;tocHeadRef&quot;&gt;&lt;span&gt;&lt;/span&gt;Create the Web Service&lt;/h3&gt;&lt;script type=&quot;text/javascript&quot;&gt;
                loadTOCNode(2, &#39;summary&#39;);
            
&lt;/script&gt;&lt;ol&gt;&lt;li&gt;Start Microsoft Visual Studio .NET. Create     a new &lt;strong class=&quot;uiterm&quot;&gt;ASP.NET Web Service&lt;/strong&gt; project by using Visual C# .NET or     Visual Basic .NET. By default, Service1.asmx is created.&lt;/li&gt;
&lt;li&gt;Name the project MyWebService.&lt;/li&gt;
&lt;li&gt;In Solution Explorer, right-click     &lt;strong class=&quot;uiterm&quot;&gt;Service1.asmx&lt;/strong&gt;, and then click &lt;strong class=&quot;uiterm&quot;&gt;View     Code&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong class=&quot;uiterm&quot;&gt;Service1.asmx.cs&lt;/strong&gt; file (or the     &lt;strong class=&quot;uiterm&quot;&gt;Service1.asmx.vb&lt;/strong&gt; file if you used Visual Basic .NET), remove the comment on the default WebMethod     &lt;b&gt;HelloWorld()&lt;/b&gt;.&lt;/li&gt;
&lt;li&gt;On the &lt;strong class=&quot;uiterm&quot;&gt;Build&lt;/strong&gt; menu, click &lt;strong class=&quot;uiterm&quot;&gt;Build     Solution&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Type the following URL in your browser to view the     &lt;strong class=&quot;uiterm&quot;&gt;Service1&lt;/strong&gt; Web service description:&lt;div class=&quot;indent&quot;&gt;&lt;span class=&quot;userInput&quot;&gt;http://localhost/MyWebService/Service1.asmx&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;To test the &lt;b&gt;HelloWorld&lt;/b&gt; WebMethod, click the &lt;strong class=&quot;uiterm&quot;&gt;HelloWorld&lt;/strong&gt; link. Notice that the WebMethod works as expected.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;div class=&quot;topOfPage&quot;&gt;&lt;a href=&quot;http://support.microsoft.com/kb/813834#top&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;h3 id=&quot;tocHeadRef&quot;&gt;&lt;span&gt;&lt;/span&gt;Set Integrated Windows Authentication for the Web Service&lt;/h3&gt;&lt;script type=&quot;text/javascript&quot;&gt;
                loadTOCNode(2, &#39;summary&#39;);
            
&lt;/script&gt;&lt;ol&gt;&lt;li&gt;Click &lt;strong class=&quot;uiterm&quot;&gt;Start&lt;/strong&gt;, point to     &lt;strong class=&quot;uiterm&quot;&gt;Settings&lt;/strong&gt;, and then click &lt;strong class=&quot;uiterm&quot;&gt;Control     Panel&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In Control Panel, double-click &lt;strong class=&quot;uiterm&quot;&gt;Administrative     Tools&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Double-click &lt;strong class=&quot;uiterm&quot;&gt;Internet Information     Services&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Expand &lt;strong class=&quot;uiterm&quot;&gt;Internet Information     Services&lt;/strong&gt;, and then locate the &lt;strong class=&quot;uiterm&quot;&gt;MyWebService&lt;/strong&gt; virtual     directory. &lt;/li&gt;
&lt;li&gt;Right-click &lt;strong class=&quot;uiterm&quot;&gt;MyWebService&lt;/strong&gt;, and then click     &lt;strong class=&quot;uiterm&quot;&gt;Properties&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Click the &lt;strong class=&quot;uiterm&quot;&gt;Directory Security&lt;/strong&gt; tab. Under     &lt;strong class=&quot;uiterm&quot;&gt;Anonymous access and authentication control&lt;/strong&gt;, click     &lt;strong class=&quot;uiterm&quot;&gt;Edit&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;In the &lt;strong class=&quot;uiterm&quot;&gt;Authentication Methods&lt;/strong&gt; dialog box,     click to select the check box for &lt;strong class=&quot;uiterm&quot;&gt;Integrated Windows authentication&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;div class=&quot;topOfPage&quot;&gt;&lt;a href=&quot;http://support.microsoft.com/kb/813834#top&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;h3 id=&quot;tocHeadRef&quot;&gt;&lt;span&gt;&lt;/span&gt;Use the  Web Service&lt;/h3&gt;&lt;script type=&quot;text/javascript&quot;&gt;
                loadTOCNode(2, &#39;summary&#39;);
            
&lt;/script&gt;&lt;ol&gt;&lt;li&gt;Create a new &lt;strong class=&quot;uiterm&quot;&gt;ASP.NET Web Application&lt;/strong&gt; by using     Visual C# .NET or Visual Basic .NET. Name the project WebServiceTest.&lt;/li&gt;
&lt;li&gt;In Solution Explorer, right-click     &lt;strong class=&quot;uiterm&quot;&gt;References&lt;/strong&gt;, and then click &lt;strong class=&quot;uiterm&quot;&gt;Add Web Reference&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong class=&quot;uiterm&quot;&gt;Address&lt;/strong&gt; text box, type the following URL for     WebServiceTest:&lt;div class=&quot;indent&quot;&gt;&lt;span class=&quot;userInput&quot;&gt;http://localhost/MyWebService/Service1.asmx&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong class=&quot;uiterm&quot;&gt;Go&lt;/strong&gt;,     and then click &lt;strong class=&quot;uiterm&quot;&gt;Add Reference&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In Solution Explorer, right-click     &lt;strong class=&quot;uiterm&quot;&gt;WebForm1.aspx&lt;/strong&gt;, and then click &lt;strong class=&quot;uiterm&quot;&gt;View Code&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the Design View of WebForm1, double-click &lt;strong class=&quot;uiterm&quot;&gt;WebForm1&lt;/strong&gt; to     open the &lt;b&gt;Page_Load&lt;/b&gt; event code. Change the &lt;b&gt;Page_Load&lt;/b&gt; event code as     follows:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Visual C# .NET Sample Code&lt;/b&gt;&lt;div class=&quot;kb_codebody&quot;&gt;&lt;div class=&quot;kb_codecontent&quot;&gt;&lt;code&gt;&lt;/code&gt;&lt;pre class=&quot;code&quot;&gt;private void Page_Load(object sender, System.EventArgs e)
{
// Start an instance of the Web Service client-side proxy.
localhost.Service1 myProxy = new localhost.Service1();
Response.Write( myProxy.HelloWorld()); 
}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;b&gt;Visual Basic .NET Sample Code&lt;/b&gt;&lt;div class=&quot;kb_codebody&quot;&gt;&lt;div class=&quot;kb_codecontent&quot;&gt;&lt;code&gt;&lt;/code&gt;&lt;pre class=&quot;code&quot;&gt;Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

&#39;Start an instance of the Web Service client-side proxy.
Dim myProxy As localhost.Service1 = New localhost.Service1()
Response.Write(myProxy.HelloWorld())
End Sub&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;On the &lt;strong class=&quot;uiterm&quot;&gt;Build&lt;/strong&gt; menu, click &lt;strong class=&quot;uiterm&quot;&gt;Build     Solution&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Type the following URL in the browser to view the Service1     Web service description:&lt;div class=&quot;indent&quot;&gt;&lt;span class=&quot;userInput&quot;&gt;http://localhost/WebServiceTest/WebForm1.aspx&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;You may receive an Access Denied error message. This occurs because your     credentials are not delivered with the Web service request for     authentication.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;div class=&quot;topOfPage&quot;&gt;&lt;a href=&quot;http://support.microsoft.com/kb/813834#top&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;h3 id=&quot;tocHeadRef&quot;&gt;&lt;span&gt;&lt;/span&gt;Pass Current Credentials to the     Web Service&lt;/h3&gt;&lt;script type=&quot;text/javascript&quot;&gt;
                loadTOCNode(2, &#39;summary&#39;);
            
&lt;/script&gt;The &lt;strong class=&quot;uiterm&quot;&gt;CredentialCache&lt;/strong&gt; class belongs to the     &lt;strong class=&quot;uiterm&quot;&gt;System.Net&lt;/strong&gt; namespace.&lt;ol&gt;&lt;li&gt;Add the following namespace declaration to the top of the     file:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Visual C# .NET Sample Code&lt;/b&gt;&lt;div class=&quot;kb_codebody&quot;&gt;&lt;div class=&quot;kb_codecontent&quot;&gt;&lt;code&gt;&lt;/code&gt;&lt;pre class=&quot;code&quot;&gt;using System.Net;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;b&gt;Visual Basic .NET Sample Code&lt;/b&gt;&lt;div class=&quot;kb_codebody&quot;&gt;&lt;div class=&quot;kb_codecontent&quot;&gt;&lt;code&gt;&lt;/code&gt;&lt;pre class=&quot;code&quot;&gt;Imports System.Net&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt; Assign &lt;b&gt;DefaultCredentials&lt;/b&gt; to the &lt;b&gt;Credentials&lt;/b&gt; property of the Web service client-side proxy. To do     this, change the code of the &lt;b&gt;Page_Load&lt;/b&gt; event as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Visual C# .NET Sample:&lt;/b&gt;&lt;div class=&quot;kb_codebody&quot;&gt;&lt;div class=&quot;kb_codecontent&quot;&gt;&lt;code&gt;&lt;/code&gt;&lt;pre class=&quot;code&quot;&gt;private void Page_Load(object sender, System.EventArgs e)
{
// Start an instance of the Web service client-side proxy.
localhost.Service1 myProxy = new localhost.Service1();
myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
Response.Write( myProxy.HelloWorld()); 
}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;b&gt;Visual Basic .NET Sample Code&lt;/b&gt;&lt;div class=&quot;kb_codebody&quot;&gt;&lt;div class=&quot;kb_codecontent&quot;&gt;&lt;code&gt;&lt;/code&gt;&lt;pre class=&quot;code&quot;&gt;Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

&#39;Start an instance of the Web service client-side proxy.
Dim myProxy As localhost.Service1 = New localhost.Service1()
myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials
Response.Write(myProxy.HelloWorld())
End Sub
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;On the &lt;strong class=&quot;uiterm&quot;&gt;Debug&lt;/strong&gt; menu, click     &lt;strong class=&quot;uiterm&quot;&gt;Start&lt;/strong&gt;. &lt;strong class=&quot;uiterm&quot;&gt;Hello World&lt;/strong&gt; appears in the browser.     &lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/5982502707372400443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/11/how-to-pass-current-credentials-to.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/5982502707372400443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/5982502707372400443'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/11/how-to-pass-current-credentials-to.html' title='HOW TO: Pass Current Credentials to an ASP.NET Web Service'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-7407006226700538344</id><published>2009-11-26T06:53:00.001-08:00</published><updated>2009-11-26T06:53:21.563-08:00</updated><title type='text'>ASP.NET MVC 2 Beta Default Parameter Values</title><content type='html'>&lt;div align=&quot;justify&quot; style=&quot;margin: 24pt 0cm 0pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #365f91; font-family: Cambria; font-size: large;&quot;&gt;ASP.NET MVC 2&amp;nbsp;Beta Default Parameter Values&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;If you’ve been living under a rock in the last few days you may have missed one of the big announcements at &lt;/span&gt;&lt;a href=&quot;http://microsoftpdc.com/&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;PDC 09&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;.&amp;nbsp;Microsoft has released ASP.NET MVC 2 Beta!&amp;nbsp;This is very exciting!&amp;nbsp;To get your hands on this beta release you can go &lt;/span&gt;&lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyID=4817cdb2-88ea-4af4-a455-f06b4c90fd2c&amp;amp;displaylang=en&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt; to download it.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Some of the cooler features in this release are the following: &lt;br /&gt;
&lt;br /&gt;
- Strongly typed UI helpers&lt;br /&gt;
- Areas support &lt;br /&gt;
- DataAnnotation validation support&lt;br /&gt;
- UI helper templating support&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;ASP.NET MVC 2&amp;nbsp;Beta&amp;nbsp;works side by side with ASP.NET MVC 1.&amp;nbsp;This article was creating using Visual Studio 2008 Service Pack 1.&amp;nbsp;Once you’ve installed the beta you’ll have the option for both projects.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;NewProject&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/aspmvc/2611NewProject.jpg&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;I’ll focus more on the different areas in upcoming articles.&amp;nbsp;This article will look at the new &lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.componentmodel.defaultvalueattribute.aspx&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;DefaultValue&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt; attribute.&amp;nbsp;This is a way for specifying default values for parameters.&amp;nbsp;In ASP.NET MVC 1 you either had to write a custom route to pass in default values, or create nullable types as parameters and check for the null values in your code.&amp;nbsp;ASP.NET MVC 2 Beta now supports decorating action method parameters with the &lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.componentmodel.defaultvalueattribute.aspx&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;DefaultValueAttribute&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt; from the&lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.componentmodel.aspx&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; System.ComponentModel&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; namespace.&amp;nbsp;This allows you to specify parameters values if none are present.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The above scenario is much simpler with an example.&amp;nbsp;Suppose you build a website which displays a list of cars.&amp;nbsp;You’ll need to create a cars controller.&amp;nbsp;Each car has a make and model, but the user might not know the make and model, so this is when you would create a default route in the global.asax file to handle this:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;routes.MapRoute(&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;CarsDefault&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Cars/{action}/{make}/{model}&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; { controller = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Cars&quot;&lt;/span&gt;, action = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Model&quot;&lt;/span&gt;, make = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Holden&quot;&lt;/span&gt;, model = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Camaro&quot;&lt;/span&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; );&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;routes.MapRoute(&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Default&quot;&lt;/span&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;{controller}/{action}/{id}&quot;&lt;/span&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; { controller = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Home&quot;&lt;/span&gt;, action = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Index&quot;&lt;/span&gt;, id = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt; } &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The first &lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.web.mvc.routecollectionextensions.maproute%28VS.100%29.aspx&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;MapRoute&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt; will default the &lt;i&gt;make&lt;/i&gt; value to Holden and the &lt;i&gt;model&lt;/i&gt; value to Camaro if no parameters are passed to the action method.&amp;nbsp;There’s nothing wrong with doing it this way.&amp;nbsp;The downside of this is your global.asax file can fill up quickly if you have numerous routes.&amp;nbsp;In ASP.NET MVC 2 Beta&amp;nbsp;this is taken care of for you thanks to DefaultValue attribute.&amp;nbsp;Now you can leave the global.asax file and move the logic into your action method:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt; System.ComponentModel;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ActionResult&lt;/span&gt; Make([&lt;span style=&quot;color: #2b91af;&quot;&gt;DefaultValue&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Holden&quot;&lt;/span&gt;)] &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; make, &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;span style=&quot;color: #2b91af;&quot;&gt;DefaultValue&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Camaro&quot;&lt;/span&gt;)] &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; model)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; View();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The DefaultValue attribute is prefixed to the parameter, so in the example above, if I don’t specify a make, the default value will be Holden.&amp;nbsp;This frees up the global.asax file and makes your code more discoverable in my opinion.&amp;nbsp;Default values can be positioned anywhere in your arguments, so your action could look like this:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt; System.ComponentModel;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ActionResult&lt;/span&gt; Make([&lt;span style=&quot;color: #2b91af;&quot;&gt;DefaultValue&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Holden&quot;&lt;/span&gt;)] &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; make, &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; model)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; View();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;This is one of the new features in ASP.NET MVC 2 Beta.&amp;nbsp;In the next few weeks I’ll be posting more articles on the other new features.&amp;nbsp;Stay tuned! The entire &lt;strong&gt;source code&lt;/strong&gt; of this article can be downloaded over &lt;strong&gt;&lt;a href=&quot;http://cid-9985e8fe16c84ccb.skydrive.live.com/self.aspx/Public/dotnetcurry/MVC2BetaDefaultParam.zip&quot;&gt;here&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/7407006226700538344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/11/aspnet-mvc-2-beta-default-parameter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/7407006226700538344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/7407006226700538344'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/11/aspnet-mvc-2-beta-default-parameter.html' title='ASP.NET MVC 2 Beta Default Parameter Values'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://i849.photobucket.com/albums/ab56/a2zknowledge/aspmvc/th_2611NewProject.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-538664361563628400</id><published>2009-11-16T20:24:00.003-08:00</published><updated>2009-11-16T20:24:54.484-08:00</updated><title type='text'>Partitioning Data Using LINQ</title><content type='html'>&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;We often come across requirements where data needs to be partitioned into two parts and then return one of the parts. The Partition Operators in LINQ helps you partition data. These operators are Skip, SkipWhile, Take and TakeWhile. In this article, we will see how to use these operators to partition collections. Malcolm Sheridan had posted a cool article demonstrating a practical usage of the Skip and Take operators. You can read it&amp;nbsp;over here &lt;a href=&quot;http://www.dotnetcurry.com/ShowArticle.aspx?ID=267&quot;&gt;Efficient Server Side Paging with the ASP.NET&amp;nbsp; GridView Control&lt;/a&gt;.&amp;nbsp;You can also read more about Partition Operators over &lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb546164.aspx&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: x-small;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;For demonstration purposes, we will take the Person class as a sample whose definition is as shown below:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Program&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Main(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;[] args)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Person&lt;/span&gt;&amp;gt; collectionOne = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Person&lt;/span&gt;&amp;gt;();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Person&lt;/span&gt;() { ID = 1, Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Jack&quot;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Person&lt;/span&gt;() { ID = 2, Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Julian&quot;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Person&lt;/span&gt;() { ID = 3, Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;David&quot;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Person&lt;/span&gt;() { ID = 4, Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Kathy&quot;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Person&lt;/span&gt;() { ID = 5, Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Jennifer&quot;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Person&lt;/span&gt;() { ID = 6, Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Billy&quot;&lt;/span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; PrintConsole(&lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Person&lt;/span&gt;&amp;gt; per)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;Person&lt;/span&gt; p &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; per)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;{0} {1}&quot;&lt;/span&gt;, p.ID, p.Name);&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;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.ReadLine();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Person&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; ID { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; Name { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Module&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; Module1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; Main()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; collectionOne &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; List(&lt;span style=&quot;color: blue;&quot;&gt;Of&lt;/span&gt; Person)()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Person() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 1, .Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Jack&quot;&lt;/span&gt;})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Person() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 2, .Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Julian&quot;&lt;/span&gt;})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Person() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 3, .Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;David&quot;&lt;/span&gt;})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Person() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 4, .Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Kathy&quot;&lt;/span&gt;})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Person() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 5, .Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Jennifer&quot;&lt;/span&gt;})&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectionOne.Add(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Person() &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ID = 6, .Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Billy&quot;&lt;/span&gt;})&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; PrintConsole(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; per &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; List(&lt;span style=&quot;color: blue;&quot;&gt;Of&lt;/span&gt; Person))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;For&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt; p &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; Person &lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt; per&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;{0} {1}&quot;&lt;/span&gt;, p.ID, p.Name)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt; p&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadLine()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Module&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Class&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; Person&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt; privateID &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt; ID() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; privateID&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; value &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; privateID = value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt; privateName &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt; Name() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; privateName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; value &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; privateName = value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The PrintConsole() method accepts a List&amp;lt;&amp;gt; and prints it on the console.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Let us now explore the Partition Operators.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Skip&lt;/b&gt; – The ‘Skip’ Operator skips elements to a specified position in a sequence and returns the remaining elements. Let us see how to use the Skip operator&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;In this example, we will be skipping the first two elements in the List and return the remaining elements&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; p1 = collectionOne.Skip(2).ToList();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;PrintConsole(p1);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; p1 = collectionOne.Skip(2).ToList()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;PrintConsole(p1)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Output&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;Skip Operator&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/LinqPartition1.jpg&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;SkipWhile&lt;/b&gt; – The ‘SkipsWhile’ operator skips elements in a sequence as long as the specified condition remains true and then returns the remaining elements.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;In this example, we will be skipping the elements in the List till the name “Kathy” and return the remaining elements along with “Kathy”&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; p2 = collectionOne.SkipWhile(x =&amp;gt; x.Name != &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Kathy&quot;&lt;/span&gt;).ToList();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;PrintConsole(p2);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; p2 = collectionOne.SkipWhile(&lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt;(x) x.Name &amp;lt;&amp;gt; &quot;Kathy&quot;).ToList()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;PrintConsole(p2)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Output&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;SkipWhile&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/LinqPartition2.jpg&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Take &lt;/b&gt;– The ‘Take’ operator grabs elements to a specified position in the sequence and returns the grabbed elements&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;In this example, we will grab the first two elements in the List&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; p3 = collectionOne.Take(2).ToList();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;PrintConsole(p3);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; p3 = collectionOne.Take(2).ToList()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;PrintConsole(p3)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Output&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;Take Operator&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/LinqPartition3.jpg&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;TakeWhile&lt;/b&gt; - The ‘TakeWhile’ operator grabs elements to a specified position in the sequence till the specified condition is true and returns the grabbed elements&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;In this example, we will grab the elements till ID&amp;lt;=4 in the List&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; p4 = collectionOne.TakeWhile(x =&amp;gt; x.ID &amp;lt;= 4).ToList();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;PrintConsole(p4);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; p4 = collectionOne.TakeWhile(&lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt;(x) x.ID &amp;lt;= 4).ToList()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;PrintConsole(p4)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Output&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;TakeWhile&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/LinqPartition4.jpg&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;In this article, we saw how to use LINQ operators to partition data.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/538664361563628400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/11/partitioning-data-using-linq.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/538664361563628400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/538664361563628400'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/11/partitioning-data-using-linq.html' title='Partitioning Data Using LINQ'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://i849.photobucket.com/albums/ab56/a2zknowledge/LINQ/th_LinqPartition1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-243892976107833367</id><published>2009-11-04T20:16:00.001-08:00</published><updated>2009-11-04T20:16:34.579-08:00</updated><title type='text'>Use Keyboard Shortcuts to Create Tooltips for Forms using jQuery</title><content type='html'>&lt;div style=&quot;margin: 24pt 0cm 0pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #365f91; font-family: Cambria; font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;I’ve said this once and I’ll say it again, jQuery is cool.&amp;nbsp;Something on the web that is very helpful to users when filling out HTML forms is for you, the developer, to give them help along the way.&amp;nbsp;I thought it would be cool to use jQuery to show help tooltips when the user clicks on a combination of keys using their keyboard.&amp;nbsp;This article will demonstrate how to capture keyboard events in JavaScript and display help tooltips.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Before we get started, this example uses the latest version of jQuery which is 1.3.2.&amp;nbsp;That can be downloaded from &lt;/span&gt;&lt;a href=&quot;http://docs.jquery.com/Downloading_jQuery&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;.&amp;nbsp;The jQuery Tools and can be downloaded from &lt;/span&gt;&lt;a href=&quot;http://flowplayer.org/tools/tooltip.html&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Open Visual Studio 2008 and choose File &amp;gt; New &amp;gt; Web &amp;gt; ASP.NET Web Application.&amp;nbsp;Add the following HTML to the Default.aspx page:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;table&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; Given Name&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;maxlength&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;10&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;txtGivenName&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;givenName&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;display:none;&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;G&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;info.png&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Info&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;16&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;16&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please supply your given name&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; Surname&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;maxlength&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;20&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;txtSurname&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;surname&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;display:none;&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;S&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;info.png&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Info&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;16&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;16&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please supply your surname.&amp;nbsp;This can only be &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;20&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt; characters long&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;table&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The HTML above is quite simple.&amp;nbsp;There’s a table which contains two text boxes.&amp;nbsp;In the cell to the right of the text boxes there’s a &lt;/span&gt;&lt;div&gt; &lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;element which contains an image and some useful text if the user gets lost or in unsure of what value to put in the text box.&amp;nbsp;To make a generic piece of JavaScript I’m going to use the &lt;i&gt;title&lt;/i&gt; attribute in the &lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt; element.&amp;nbsp;I’ll use that as the key to combine with the &lt;i&gt;shift&lt;/i&gt; key.&amp;nbsp;The next step is to add the following jQuery code to the  section of the page.&amp;nbsp;Ideally JavaScript should go to a separate .js file, however for this example; I’ll keep it in the same page:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;language&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;javascript&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&amp;gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;language&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;javascript&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(document).ready(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;).keydown(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(e) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; evt = e || window.event;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (evt.shiftKey) {&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;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;findHelp(evt).fadeIn(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;slow&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;).keyup(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(e) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; evt = e || window.event;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (evt.shiftKey) {&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;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; findHelp(evt).hide(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;fast&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt; findHelp(e) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; key = (e.keyCode ? e.keyCode : e.charCode);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;div[title=&quot;&lt;/span&gt; + String.fromCharCode(key) + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;]&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;In the above code, I’m binding to the document’s keydown and keyup events.&amp;nbsp;On the keydown event, I want to show the tooltip, and on keyup, hide it.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;).keydown(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(e)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;).keyup(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(e)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Both pieces of code get information about the event through the argument &lt;i&gt;e&lt;/i&gt;. Because I only want this to work when the user holds down the shift key, I’m checking for that through the evt.shiftKey variable.&amp;nbsp;This indicates whether the &lt;i&gt;shift&lt;/i&gt; key was pressed when the event fired&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; evt = e || window.event;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; (evt.shiftKey) &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;From there I have created a function called findHelp.&amp;nbsp;The sender of the event is passed to this function.&amp;nbsp;I grab either the keyCode or charCode value, and then use that in the &lt;/span&gt;&lt;a href=&quot;http://docs.jquery.com/Selectors/attributeEquals#attributevalue&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;jQuery Selector&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt; to find the related &lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt; element by its title attribute:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; findHelp(e) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; key = (e.keyCode ? e.keyCode : e.charCode);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;div[title=&quot;&lt;/span&gt; + String.fromCharCode(key) + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;]&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Running this code now will display the simple form.&amp;nbsp;If you hold down &lt;i&gt;Shift + S&lt;/i&gt; or &lt;i&gt;Shift + G&lt;/i&gt; it will show and hide the tooltip for each text box.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;i&gt;Before&lt;/i&gt; the keydown event and on the keyup event&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;KeyDownevent_1&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/4112009KeyDownevent_1.png&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;i&gt;During&lt;/i&gt; the keydown event&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;KeyDownevent_2&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/4112009KeyDownevent_2.png&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;This is a nice addition for any website that wants to help their users fill out HTML forms.&amp;nbsp;For more information on keyboard events you can go &lt;a href=&quot;http://www.quirksmode.org/js/events_properties.html&quot;&gt;here&lt;/a&gt; for more reading. The entire &lt;strong&gt;source code&lt;/strong&gt; of this article can be downloaded over &lt;strong&gt;&lt;a href=&quot;http://cid-9985e8fe16c84ccb.skydrive.live.com/self.aspx/Public/dotnetcurry/ToolTipKeyboardShortcut.zip&quot;&gt;here&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/243892976107833367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/11/use-keyboard-shortcuts-to-create.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/243892976107833367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/243892976107833367'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/11/use-keyboard-shortcuts-to-create.html' title='Use Keyboard Shortcuts to Create Tooltips for Forms using jQuery'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/th_4112009KeyDownevent_1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-62656500188331441</id><published>2009-11-02T21:07:00.000-08:00</published><updated>2009-11-02T21:07:20.178-08:00</updated><title type='text'>Implementing KeyBoard Shortcuts on an ASP.NET Hyperlink Control using jQuery</title><content type='html'>&lt;div style=&quot;margin: 24pt 0cm 0pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #365f91; font-family: Cambria; font-size: large;&quot;&gt;Implementing KeyBoard Shortcuts on an ASP.NET Hyperlink Control using jQuery&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;Popular Web apps like Gmail and Windows Live Mail feature Keyboard shortcuts, which help you save time by executing common operations using the Keyboard, without having to switch between the keyboard and mouse. In this short article, I will demonstrate how to use jQuery to implement keyboard shortcuts on an ASP.NET Hyperlink control. This article is a sample chapter from my EBook called &lt;/span&gt;&lt;a href=&quot;http://www.dotnetcurry.com/ShowArticle.aspx?id=403&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;51 Tips, Tricks and Recipes with jQuery and ASP.NET Controls&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Note that for demonstration purposes, I have included jQuery code in the same page. Ideally, these resources should be created in separate folders for maintainability. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Let us quickly jump to the solution and see how we can implement KeyBoard shortcut on the Hyperlink control&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;Implement KeyBoard Shortcuts on Hyperlinks&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&#39;text/javascript&#39;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&#39;../Scripts/jquery-1.3.2.min.js&#39;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(document).keyup(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(e) {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; key = (e.keyCode ? e.keyCode : e.charCode);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;switch&lt;/span&gt; (key) {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; 49:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; navigateUrl($(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;a[id$=linkA]&#39;&lt;/span&gt;));&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; 50:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; navigateUrl($(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;a[id$=linkB]&#39;&lt;/span&gt;));&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; 51:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; navigateUrl($(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;a[id$=linkC]&#39;&lt;/span&gt;));&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;default&lt;/span&gt;: ;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; }&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt; navigateUrl(jObj) {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; window.location.href = $(jObj).attr(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;href&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; alert(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Navigating to &quot;&lt;/span&gt; + $(jObj).attr(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;href&quot;&lt;/span&gt;));&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;form1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;tableDiv&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;Use Keyboard Keys 1, 2 or 3 to invoke respective &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; websites&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;HyperLink&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;linkA&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;NavigateUrl&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://www.dotnetcurry.com&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DotNetCurry&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;HyperLink&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;HyperLink&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;linkB&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;NavigateUrl&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://www.sqlservercurry.com&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlServerCurry&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;HyperLink&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;HyperLink&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;linkC&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;NavigateUrl&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://www.devcurry.com&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DevCurry&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;HyperLink&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Implementing a Keyboard shortcut in jQuery is relatively simple as shown here. The code first captures the keyup event and the key is detected using the keyCode or charCode. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;$(document).keyup(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(e) {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; key = (e.keyCode ? e.keyCode : e.charCode);&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;In the code shown below, if the key = 49, digit 1 is pressed by the user and the first Hyperlink is auto-clicked. Similarly if the key = 50 or 51, then digit 2 or 3 are pressed respectively and the 2&lt;sup&gt;nd&lt;/sup&gt; or 3&lt;sup&gt;rd&lt;/sup&gt; hyperlink is autoclicked. Once the key matches any of the switch case statement, the function navigateUrl() is called passing in the respective hyperlink control object to the function. So if the user pressed 1, the first hyperlink control object is passed to the function as shown below:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;switch&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt; (key) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; 49:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; navigateUrl($(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;a[id$=linkA]&#39;&lt;/span&gt;));&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;The navigateUrl function looks like this:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt; navigateUrl(jObj) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.location.href = $(jObj).attr(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;href&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;The function accepts the hyperlink object and sets the ‘window.location.href’ to the href attribute of the Hyperlink passed in. This is how we invoke actions with shortcut keys.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;Tip:&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt; keyCode represents the actual key pressed as a numerical value, whereas charCode gives the ASCII/Unicode value of the key press result (for eg: Shift + A). Firefox and other browsers also support ‘e.which’. IE and Opera does not support charCode.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Keyboard shortcuts improve productivity by accomplishing tasks more quickly and without much effort. In applications, where the user has to select from a variety of actions to perform, keyboard shortcuts can save on time and effort. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;You can see a &lt;/span&gt;&lt;a href=&quot;http://www.dotnetcurry.com/ASPNETandjQuery/Section9-Hyperlink/R45-KeyBoardShortcut.aspx&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;Live Demo&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt; over here. The entire &lt;b&gt;source code&lt;/b&gt; of this article can be downloaded over &lt;b&gt;&lt;a href=&quot;http://cid-9985e8fe16c84ccb.skydrive.live.com/self.aspx/Public/dotnetcurry/HyperlinkKeyboardShortcuts.zip&quot;&gt;here&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 115%;&quot;&gt;&lt;b&gt;Reference : &lt;a href=&quot;http://www.dotnetcurry.com/&quot;&gt;http://www.dotnetcurry.com/&lt;/a&gt; &lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/62656500188331441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/11/implementing-keyboard-shortcuts-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/62656500188331441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/62656500188331441'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/11/implementing-keyboard-shortcuts-on.html' title='Implementing KeyBoard Shortcuts on an ASP.NET Hyperlink Control using jQuery'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-2187926767063597866</id><published>2009-10-13T23:32:00.000-07:00</published><updated>2009-10-13T23:32:17.053-07:00</updated><title type='text'>Prevent Cut, Copy and Paste Operations in an ASP.NET TextBox using jQuery</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Calibri, Arial, serif; font-size: 12px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 24pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #365f91; font-family: Cambria; font-size: large;&quot;&gt;Prevent Cut, Copy and Paste Operations in an ASP.NET TextBox using jQuery&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;In this short article, I will demonstrate how to prevent users from doing Cut, Copy and Paste operations in an ASP.NET TextBox using jQuery. This article is a sample chapter from my upcoming EBook called&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.dotnetcurry.com/ShowArticle.aspx?ID=393&quot; style=&quot;color: #4292c6;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;51 Tips, Tricks and Recipes with jQuery and ASP.NET Controls&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;. The chapter content has been modified to publish it as an article. Also please note that for demonstration purposes, I have included JavaScript into the same file. Ideally, these resources should be created in separate folders for maintainability.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The event handling approach in jQuery begins by attaching a handler to an event. The jQuery&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://docs.jquery.com/Events/bind&quot; style=&quot;color: #4292c6;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;bind()&lt;/span&gt;&lt;/i&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&amp;nbsp;event method does exactly the same and binds one or more events to a handler. The signature of the&amp;nbsp;&lt;i&gt;bind()&lt;/i&gt;&amp;nbsp;method is as follows:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;bind(eventType,data,handler)&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The parameters of the bind() method are as follows:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;eventType&lt;/i&gt;&amp;nbsp;is a string holding a JavaScript event type such as click, focus, keyup etc.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;data&lt;/i&gt;&amp;nbsp;is some optional data you want to pass to the handler&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;handler&lt;/i&gt;&amp;nbsp;is the event handler function which will execute when the event is triggered&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Let us quickly jump to the solution and see how we can use the&amp;nbsp;&lt;i&gt;bind()&lt;/i&gt;&amp;nbsp;event method to write minimal code to prevent cut, copy and paste operations on the textbox.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Head1&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;Prevent Cut, Copy and Paste Operations in a TextBox&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&#39;text/javascript&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&#39;http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js&#39;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;input[id$=tb1]&#39;&lt;/span&gt;).bind(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;cut copy paste&#39;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(e) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; e.preventDefault();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; alert(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;You cannot &#39;&lt;/span&gt;&amp;nbsp;+ e.type +&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&#39; text!&#39;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;form1&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;bigDiv&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;Prevent Cut, Copy and Paste Operations in a TextBox&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;TextBox&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;tb1&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: red;&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Text which cannot be copied/cut/pasted&quot;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: red;&quot;&gt;ToolTip&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Try Copy/Cut/Paste in textbox&quot;/&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; line-height: 14px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;; line-height: 14px;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; line-height: 14px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Observe how convenient it is to use jQuery&amp;nbsp;to&amp;nbsp;list multiple events (cut, copy, paste) together and bind it to a handler as shown below. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;input[id$=tb1]&#39;&lt;/span&gt;).bind(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;cut copy paste&#39;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(e) {});&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;If the user performs any of these events on the textbox (tb1), the default behavior is prevented using&amp;nbsp;&lt;i&gt;e.preventDefault()&lt;/i&gt;&amp;nbsp;and the user is alerted with a message. The&amp;nbsp;&lt;i&gt;e.type&lt;/i&gt;&amp;nbsp;describes the type of event performed.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;input[id$=tb1]&#39;&lt;/span&gt;).bind(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;cut copy paste&#39;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(e) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.preventDefault();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;You cannot &#39;&lt;/span&gt;&amp;nbsp;+ e.type +&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&#39; text!&#39;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;CutCopyPaste&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/1210CutCopyPaste.jpg&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;This piece of ‘minimal’ code handles a typical requirement where you are asked to ‘confirm’ an email address and want the user to type it manually, instead of copying and pasting it.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;i&gt;Note:&lt;/i&gt;&amp;nbsp;Text can be edited in this textbox, but cut/copy/paste actions are prevented&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;This demo has been tested on IE7, IE8, Firefox 3, Chrome 2 and Safari 4.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/2187926767063597866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/10/prevent-cut-copy-and-paste-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/2187926767063597866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/2187926767063597866'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/10/prevent-cut-copy-and-paste-operations.html' title='Prevent Cut, Copy and Paste Operations in an ASP.NET TextBox using jQuery'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/th_1210CutCopyPaste.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-6897848632430510376</id><published>2009-10-08T22:12:00.001-07:00</published><updated>2009-10-08T22:12:51.923-07:00</updated><title type='text'>Limit Number Of Characters In an ASP.NET Multiline TextBox using jQuery</title><content type='html'>&lt;div style=&quot;margin: 24pt 0cm 0pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #365f91; font-family: Cambria; font-size: large;&quot;&gt;Limit Number Of Characters In an ASP.NET Multiline TextBox using jQuery&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;This article shows you how to limit characters entered in an ASP.NET Multiline TextBox. The ASP.NET Multiline TextBox ignores the MaxLength property. So one of the ways of solving this requirement is to use Client Script and detect if the maximum character limit of the Multiline TextBox has been reached. I will be showing a common technique adopted by developers to solve this requirement. I will then explain why this technique is not user friendly and how to improve on it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;This article is a sample chapter from my upcoming EBook called &lt;/span&gt;&lt;a href=&quot;http://www.dotnetcurry.com/ShowArticle.aspx?ID=393&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: purple; font-family: Verdana; font-size: x-small;&quot;&gt;51 Tips, Tricks and Recipes with jQuery and ASP.NET Controls&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;. The chapter content has been modified to publish it as an article. Also please note that for demonstration purposes, I have included both the JavaScript and CSS into the same file. Ideally, these resources should be created in seperate folders for maintainability.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;A common technique adopted by developers is to capture the textbox keyup event and calculate the number of characters in the textbox, as the user types in it. If the character exceeds the limit of the textbox (in our case 50 characters), the additional characters entered by the user is disallowed. &amp;nbsp;The code is as shown below: &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Head1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;Limit Characters in a Multiline TextBox&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&#39;text/javascript&#39;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&#39;http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js&#39;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; limit = 50;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;textarea[id$=tb1]&#39;&lt;/span&gt;).keyup(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; len = $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;).val().length;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (len &amp;gt; limit) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.value = &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.value.substring(0, limit);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;#spn&lt;/span&gt;).text(limit - len + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot; characters left&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;form1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;TextBox&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;tb1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;TextMode&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;MultiLine&quot;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;spn&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &quot;&amp;gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Observe how we are selecting the control using &lt;i&gt;textarea &lt;/i&gt;in the code shown above &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;$(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;textarea[id$=tb1]&#39;&lt;/span&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;. This is as the&amp;nbsp;ASP.NET Multiline TextBox renders as a &lt;i&gt;textarea&lt;/i&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Although the solution given above restricts the user from entering more than 50 characters, this behavior can be confusing for users who may not realize that they have reached the TextBox limit. Instead of disallowing extra characters, a slick way of handling this requirement would be to visually indicate to the user when the textbox limit has been exceeded. Then before submitting the form, give the user a chance to remove the extra text. The code shown below changes the background color of the textbox to red when the textbox limit is exceeded. The user is also prevented from submitting the form.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Head1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;Limit Characters in a Multiline TextBox&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&#39;text/javascript&#39;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&#39;http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js&#39;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;style&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/css&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #a31515;&quot;&gt;.exceeded&lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;background-color&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;red&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; limit = 50;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; tb = $(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;textarea[id$=tb1]&#39;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(tb).keyup(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; len = $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;).val().length;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (len &amp;gt; limit) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//this.value = this.value.substring(0, 50);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;).addClass(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;exceeded&#39;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;#spn&#39;&lt;/span&gt;).text(len - limit + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot; characters exceeded&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;else&lt;/span&gt; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; $(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;).removeClass(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;exceeded&#39;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;#spn&#39;&lt;/span&gt;).text(limit - len + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot; characters left&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;input[id$=btnSubmit]&#39;&lt;/span&gt;).click(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(e) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; len = $(tb).val().length;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (len &amp;gt; limit) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; e.preventDefault();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;form1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;smallDiv&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;Type into this textbox which accepts 50 characters overall&lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;TextBox&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;tb1&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;TextMode&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;MultiLine&quot;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (This textbox accepts only 50 characters) &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;spn&quot;&amp;gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Button&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;btnSubmit&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Submit&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;error&quot;&amp;gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;br&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tip: Clicking on the Submit button when number of characters are&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; less than 50, results in a postback to same page. If you exceed 50&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; characters, the exceeded characters are printed below the textbox&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and a postback is prevented.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;When the number of characters exceeds the textbox limit, we add the &lt;i&gt;exceeded&lt;/i&gt; class to the textbox, which turns the textbox background to red, indicating the user that the limit has been exceeded. The result is shown here:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;LimitExceeded&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/0810LimitExceeded.jpg&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;When the user tries and submits the form now, the length of the TextBox is calculated and the user is prevented from submitting the form, since the textbox exceeds the permissible length.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;When the user removes the extra text, the &lt;i&gt;exceeded&lt;/i&gt; class is removed. The result is shown here:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;RemoveExceeded&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/0810RemoveExceeded.jpg&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The form can now be submitted. You can see a &lt;a href=&quot;http://www.dotnetcurry.com/Demos/jQueryLimitCharacters/TextAreaLimit.aspx&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;Live Demo here&lt;/strong&gt;&lt;/a&gt;&amp;nbsp;. This demo has been tested on IE7, IE8, Firefox 3, Chrome 2 and Safari 4.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/6897848632430510376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/10/limit-number-of-characters-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/6897848632430510376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/6897848632430510376'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/10/limit-number-of-characters-in-aspnet.html' title='Limit Number Of Characters In an ASP.NET Multiline TextBox using jQuery'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/th_0810LimitExceeded.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-8391819460361733641</id><published>2009-10-06T22:09:00.000-07:00</published><updated>2009-10-06T22:10:21.865-07:00</updated><title type='text'>Using jQuery To Create Stunning Tooltips in your ASP.NET Applications</title><content type='html'>&lt;div align=&quot;justify&quot; style=&quot;margin: 24pt 0cm 0pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #365f91; font-family: Cambria; font-size: large;&quot;&gt;Using jQuery To Create Stunning Tooltips in your ASP.NET Applications&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;“&lt;i&gt;jQuery Tools is a collection of the most important user interface components for the web. These are tabs and accordions, tooltips, overlays, exposing effects and scrollables. They can dramatically improve the usability and responsiveness of your site. They mainly focus on &lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-style: normal;&quot;&gt;presenting information&lt;/span&gt;&lt;/i&gt;&lt;i&gt; and &lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-style: normal;&quot;&gt;visual appeal&lt;/span&gt;&lt;/i&gt;&lt;i&gt;. After all, this is exactly what most websites desperately want: to present their content to the reader in an easy and visually pleasing manner.&lt;/i&gt;”&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;I’ll be focusing some future articles on these tools, but this article will concentrate on how to create stunning tooltips using this plugin.&amp;nbsp;The end result in this article will show you how to create these tooltips using dynamic data by using jQuery’s Ajax functionality.&amp;nbsp;The end result will look something like this:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;ToolTip&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/610ToolTip.png&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Before we get started, this example uses the latest version of jQuery which is 1.3.2.&amp;nbsp;That can be downloaded from &lt;/span&gt;&lt;a href=&quot;http://docs.jquery.com/Downloading_jQuery&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;.&amp;nbsp;The jQuery Tools and can be downloaded from &lt;/span&gt;&lt;a href=&quot;http://flowplayer.org/tools/tooltip.html&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;The jQuery Tools plugin has quite a few options when it comes time to configuration, but the one you should not forget is the &lt;i&gt;tip&lt;/i&gt; attribute.&amp;nbsp;This jQuery selector selects the tooltip element being used.&amp;nbsp;The attribute that will allow you to position the tooltip is funnily enough called &lt;i&gt;position&lt;/i&gt;.&amp;nbsp;The position property specifies the position in relation to the trigger element. For example, a value of &lt;/span&gt;&lt;samp&gt;&#39;bottom center&#39;&lt;/samp&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt; will place the tooltip on the bottom edge of the trigger, centred horizontally.&amp;nbsp;Other values are:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ul style=&quot;margin-top: 0cm;&quot; type=&quot;disc&quot;&gt;&lt;li&gt;     &lt;br /&gt;
&lt;div align=&quot;justify&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;top center, top right, center right, bottom right, bottom left, center left and top left&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;To make this real, instead of showing this tooltip against static data such as images, I’m going to use jQuery’s Ajax functionality to query the server for a list of running processes.&amp;nbsp;Okay let’s gets started.&amp;nbsp;Open Visual Studio 2008 and create a new Web Application.&amp;nbsp;First off add a new class to the project and call it ProcessInfo.&amp;nbsp;This class will hold information about the process.&amp;nbsp;Add the following code to the class:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ProcessInfo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; ProcessName { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; MainWindowTitle { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;long&lt;/span&gt; PagedMemorySize64 { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Class&lt;/span&gt; ProcessInfo&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Private&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; privateProcessName &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt; ProcessName() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; privateProcessName&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; value &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; privateProcessName = value&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt; privateMainWindowTitle &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt; MainWindowTitle() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; privateMainWindowTitle&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; value &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;privateMainWindowTitle = value&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt; privatePagedMemorySize64 &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Long&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt; PagedMemorySize64() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Long&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt; privatePagedMemorySize64&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; value &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Long&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;privatePagedMemorySize64 = value&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The next step is to open the Default.aspx.cs file and add the following code:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[&lt;span style=&quot;color: #2b91af;&quot;&gt;WebMethod&lt;/span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;ProcessInfo&lt;/span&gt;&amp;gt; GetRunningProcesses()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; query = (&lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt; p &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; System.Diagnostics.&lt;span style=&quot;color: #2b91af;&quot;&gt;Process&lt;/span&gt;.GetProcesses()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;select&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ProcessInfo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessName = p.ProcessName,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MainWindowTitle = p.MainWindowTitle,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PagedMemorySize64 = p.PagedMemorySize64&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0cm 0cm 0pt 72pt; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}).ToList();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; query;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;webmethod&gt; _&lt;/webmethod&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Shared&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt; GetRunningProcesses() &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; List(&lt;span style=&quot;color: blue;&quot;&gt;Of&lt;/span&gt; ProcessInfo)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; query = ( _&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;From&lt;/span&gt; p &lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt; System.Diagnostics.Process.GetProcesses() _&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Select&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; ProcessInfo &lt;span style=&quot;color: blue;&quot;&gt;With&lt;/span&gt; {.ProcessName = p.ProcessName, .MainWindowTitle = p.MainWindowTitle, .PagedMemorySize64 = p.PagedMemorySize64}).ToList()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Return&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; query&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The code above will be called by jQuery’s Ajax function.&amp;nbsp;It returns a list of running process on the machine thanks to the &lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Process&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt; object.&amp;nbsp;The Process class provides access to local and remote processes.&amp;nbsp;The LINQ query will return a generic list of &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;ProcessInfo&lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt; objects that will be used to create the tooltips.&amp;nbsp;The next step is to add the JavaScript.&amp;nbsp;Open the Default.aspx page and add the following jQuery code to the  section of the page.&amp;nbsp;Ideally JavaScript should go to a separate .js file, however for this example; I’ll keep it in the same page:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;language&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;javascript&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Scripts/jquery-1.3.2.js&quot;&amp;gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;language&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;javascript&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;http://cdn.jquerytools.org/1.1.1/jquery.tools.min.js&quot;&amp;gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;language&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;javascript&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt; showToolTip() {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;#results span[title]&quot;&lt;/span&gt;).tooltip({&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; position: &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;center right&quot;&lt;/span&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; opacity: 0.7,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; tip: &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;#demotip&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; effect: &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;fade&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(document).ready(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;#btnSearch&quot;&lt;/span&gt;).click(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;() {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; $.ajax({&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;type: &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;POST&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; url: &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Default.aspx/GetRunningProcesses&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; data: &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;{}&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; contentType: &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;application/json; charset=utf-8&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; dataType: &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;json&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; async: &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; success: &lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(msg) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; processInfo = msg.d;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;#results&quot;&lt;/span&gt;).text(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; i = 0; i &amp;lt; processInfo.length; i++) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// create the title for each item&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; title = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Process&amp;nbsp;Name:&amp;nbsp;&quot;&lt;/span&gt; +&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; processInfo[i].ProcessName +&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&amp;lt;BR&amp;gt;&quot;&lt;/span&gt; +&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Paged&amp;nbsp;Memory&amp;nbsp;Size64:&amp;nbsp;&quot;&lt;/span&gt; + &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; processInfo[i].PagedMemorySize64;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;#results&quot;&lt;/span&gt;).append(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;span title=&quot;&amp;lt;/span&amp;gt; + title + &amp;lt;span style=&quot;&gt;&quot;&amp;gt;&quot;&lt;/span&gt; +&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;processInfo[i].ProcessName +&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;\&amp;quot;spacer\&amp;quot;&quot;&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; });&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;In the code above I am binding to the input button’s click event.&amp;nbsp;When the user clicks the button, it will execute the WebMethod GetRunningProcesses.&amp;nbsp;A generic list containing the ProcessInfo data will be returned in the msg.d argument.&amp;nbsp;For each process returned, a span tag will be appended in the div element&lt;i&gt;.&lt;/i&gt;&amp;nbsp;When the user hover’s their mouse over the tag, the JavaScript function showToolTip will run.&amp;nbsp;This function is responsible for displaying the tooltip:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; showToolTip() {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;#results span[title]&quot;&lt;/span&gt;).tooltip({&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0cm 0cm 0pt 36pt; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;position: &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;center right&quot;&lt;/span&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; opacity: 0.7,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tip: &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;#demotip&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; effect: &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;fade&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Using jQuery’s selectors the tooltip will find the related span tag to trigger the tooltip.&amp;nbsp;The tool looks for the element that is placed next to the tooltip to be the tooltip. The return value is a jQuery object associated with the selection.&amp;nbsp;&amp;nbsp; The result is a stunning tooltip as the screen shot below shows:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;ToolTip&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/610ToolTip.png&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The information in the tooltip can be configured as it’s just HTML.&amp;nbsp;So if you want you can display a nice image to the user so they’ll be able to associate the process by the icon.&amp;nbsp;The background image of the tooltip is configurable too.&amp;nbsp;The styling for the tooltip is below:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;#demotip {&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display:none;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; background:transparent url(http://flowplayer.org/tools/img/tooltip/black_arrow.png);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size:12px;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height:70px;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width:160px;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding:25px;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color:#fff;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Verdana&#39;,&#39;sans-serif&#39;; font-size: 10pt; line-height: 115%;&quot;&gt;This is a nice addition to your jQuery ensemble.&amp;nbsp;The entire &lt;b&gt;source code&lt;/b&gt; of this article can be downloaded over &lt;b&gt;&lt;a href=&quot;http://cid-9985e8fe16c84ccb.skydrive.live.com/self.aspx/Public/dotnetcurry/jQueryStunningTooltips.zip&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt; &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/8391819460361733641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/10/using-jquery-to-create-stunning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/8391819460361733641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/8391819460361733641'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/10/using-jquery-to-create-stunning.html' title='Using jQuery To Create Stunning Tooltips in your ASP.NET Applications'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://i849.photobucket.com/albums/ab56/a2zknowledge/jQuery/th_610ToolTip.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-9192476312803395991</id><published>2009-10-02T22:13:00.000-07:00</published><updated>2009-10-02T22:13:21.513-07:00</updated><title type='text'>Error Logging using ASP.NET 2.0</title><content type='html'>&lt;div style=&quot;margin: 24pt 0in 0pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #365f91; font-family: Cambria; font-size: large;&quot;&gt;Error Logging using ASP.NET 2.0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;This article has been republished with a few minor changes.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Errors and failures may occur during development and operation of a website. ASP.NET 2.0 provides tracing, instrumentation and error handling mechanisms to detect and fix issues in an application. &lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;In this article, we will adopt a simple mechanism to log errors and exceptions in our website. We will be using a mechanism where the user will be redirected to a separate page whenever an error is encountered in the application. Simultaneously, the error will get logged in a text file on the server. The error file will be created on a daily basis, whenever the error is encountered. Having said that, let us now see some code.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Step 1:&lt;/b&gt; Start by creating an Error folder where all errors will be logged. Right click the website &amp;gt; New Folder. Rename the folder to “Error”. Also add a web.config file, if one does not already exist in your site. Right click the website &amp;gt; Add New Item &amp;gt; Web.config. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Step 2:&lt;/b&gt; Now we will create the error handler code. To do so, right click your website &amp;gt; Add New Item &amp;gt; select Class. Rename the class to ‘ErrHandler.cs’ and click on ‘Add’. When you do so, you will be prompted with a message to place the class in ‘App_Code’ folder. Accept the message to place the class in the &#39;App_Code&#39; folder. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Step 3:&lt;/b&gt; Now let us add functionality to the ErrHandler class. This class will accept the error message and write the message in a text file. One text file will be created for each day. If the text file already exists, the message will be appended to the text file. If not, a new text file will be created based on today’s date and error message will be written in it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The code will look similar to the following:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;;&quot;&gt;///&lt;/span&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt; Handles error by accepting the error message &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;///&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt; Displays the page on which the error occured&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; WriteError(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; errorMessage)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; path = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;~/Error/&quot;&lt;/span&gt; + &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Today.ToString(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;dd-mm-yy&quot;&lt;/span&gt;) + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.txt&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: #2b91af;&quot;&gt;File&lt;/span&gt;.Exists(System.Web.&lt;span style=&quot;color: #2b91af;&quot;&gt;HttpContext&lt;/span&gt;.Current.Server.MapPath(path)))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: #2b91af;&quot;&gt;File&lt;/span&gt;.Create(System.Web.&lt;span style=&quot;color: #2b91af;&quot;&gt;HttpContext&lt;/span&gt;.Current.Server.MapPath(path)).Close();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;StreamWriter&lt;/span&gt; w = &lt;span style=&quot;color: #2b91af;&quot;&gt;File&lt;/span&gt;.AppendText(System.Web.&lt;span style=&quot;color: #2b91af;&quot;&gt;HttpContext&lt;/span&gt;.Current.Server.MapPath(path)))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\r\nLog Entry : &quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;{0}&quot;&lt;/span&gt;, &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Now.ToString(&lt;span style=&quot;color: #2b91af;&quot;&gt;CultureInfo&lt;/span&gt;.InvariantCulture));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; err = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Error in: &quot;&lt;/span&gt; + System.Web.&lt;span style=&quot;color: #2b91af;&quot;&gt;HttpContext&lt;/span&gt;.Current.Request.Url.ToString() +&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;. Error Message:&quot;&lt;/span&gt; + errorMessage;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.WriteLine(err);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;__________________________&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.Flush();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.Close();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;Exception&lt;/span&gt; ex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WriteError(ex.Message);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;&#39;&#39; Handles error by accepting the error message &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;&#39;&#39;&#39; Displays the page on which the error occured&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Shared&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; WriteError(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; errorMessage &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; path &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;~/Error/&quot;&lt;/span&gt; &amp;amp; DateTime.Today.ToString(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;dd-mm-yy&quot;&lt;/span&gt;) &amp;amp; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;.txt&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt; (&lt;span style=&quot;color: blue;&quot;&gt;Not&lt;/span&gt; File.Exists(System.Web.HttpContext.Current.Server.MapPath(path))) &lt;span style=&quot;color: blue;&quot;&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; File.Create(System.Web.HttpContext.Current.Server.MapPath(path)).Close()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Using&lt;/span&gt; w &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; StreamWriter = File.AppendText(System.Web.HttpContext.Current.Server.MapPath(path))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.WriteLine(Constants.vbCrLf &amp;amp; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Log Entry : &quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;{0}&quot;&lt;/span&gt;, DateTime.Now.ToString(CultureInfo.InvariantCulture))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; err &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Error in: &quot;&lt;/span&gt; &amp;amp; System.Web.HttpContext.Current.Request.Url.ToString() &amp;amp; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;. Error Message:&quot;&lt;/span&gt; &amp;amp; errorMessage&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.WriteLine(err)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;__________________________&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.Flush()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; w.Close()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Using&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Catch&lt;/span&gt; ex &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; Exception&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WriteError(ex.Message)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;That was our ErrHandler class. We will now see how to use this Error Handler class and handle errors at the page level as well as at the application level.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Handling errors at Page Level&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;In the Default.aspx, drag and drop a button from the toolbox. Rename this button to btnError and set the Text as ‘Throw Handled Exception’. Here we will throw an exception. Since we have a catch block defined, the exception will be caught and the error will be logged in the Error folder. Since a text file with today’s date, does not exists, a new text file will be created by the code.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The button click handler will look similar to the following:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; btnHandled_Click(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: #2b91af;&quot;&gt;EventArgs&lt;/span&gt; e)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;throw&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Exception&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sample Exception&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;Exception&lt;/span&gt; ex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Log the error to a text file in the Error folder&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;ErrHandler&lt;/span&gt;.WriteError(ex.Message);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Protected&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; btnHandled_Click(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; sender &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Object&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; e &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; System.EventArgs) &lt;span style=&quot;color: blue;&quot;&gt;Handles&lt;/span&gt; btnHandled.Click&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Throw&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; Exception()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Catch&lt;/span&gt; ex &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; Exception&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;&#39; Log the error to a text file in the Error folder&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrHandler.WriteError(ex.Message)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Now with the code in place, run the application and click on the button. Since we have handled the error and logged the exception in our code, you will not notice anything when the button is clicked. However, close the application and refresh the Error folder. You will see a new text file created with today’s date. The exception has been logged successfully as shown below. The date and time will differ on your machine.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Log Entry : &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;01/11/2008 23:33:46&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Error in: http://localhost:51087/ErrorHandling/Default.aspx. Error Message:Sample Exception&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;__________________________&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Redirecting users on unhandled errors&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Let us see how to catch unhandled errors and redirect the user to a different page, whenever such an unhandled error occurs at the application level.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;To catch unhandled errors, do the following. Add a Global.asax file (Right click project &amp;gt; Add New Item &amp;gt; Global.asax). In the Application_Error() method, add the following code:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Application_Error(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: #2b91af;&quot;&gt;EventArgs&lt;/span&gt; e)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Code that runs when an unhandled error occurs&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;Exception&lt;/span&gt; objErr = Server.GetLastError().GetBaseException();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; err = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Error in: &quot;&lt;/span&gt; + Request.Url.ToString() +&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;. Error Message:&quot;&lt;/span&gt; + objErr.Message.ToString();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Log the error&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;ErrHandler&lt;/span&gt;.WriteError(err);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Sub&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; Application_Error(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; sender &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Object&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; e &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; EventArgs)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;&#39; Code that runs when an unhandled error occurs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; objErr &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; Exception = Server.GetLastError().GetBaseException()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; err &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Error in: &quot;&lt;/span&gt; &amp;amp; Request.Url.ToString() &amp;amp; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;. Error Message:&quot;&lt;/span&gt; &amp;amp; objErr.Message.ToString()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;&#39; Log the error&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrHandler.WriteError(err)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;We capture the error using the Server.GetLastError(). Now to redirect users to a different page whenever an unhandled error occurs, open your web.config file and locate the &lt;customerrors&gt; tag and uncomment it. After removing the comment, the tag will look similar to the following code:&lt;/customerrors&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;!--&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 0pt; line-height: normal;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The &lt;customerrors&gt; section enables configuration &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 0pt; line-height: normal;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; of what to do if/when an unhandled error occurs &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 0pt; line-height: normal;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; during the execution of a request. Specifically, &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 0pt; line-height: normal;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; it enables developers to configure html error pages &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 0pt; line-height: normal;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to be displayed in place of a error stack trace.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&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;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;customErrors&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;mode&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;RemoteOnly&lt;/span&gt;&quot;&lt;span style=&quot;color: red;&quot;&gt;defaultRedirect&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;GenericErrorPage.htm&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;error&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;statusCode&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;403&lt;/span&gt;&quot;&lt;span style=&quot;color: red;&quot;&gt;redirect&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;NoAccess.htm&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;error&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;statusCode&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;404&lt;/span&gt;&quot;&lt;span style=&quot;color: red;&quot;&gt;redirect&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;FileNotFound.htm&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&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; &lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;customErrors&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Now change:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;mode&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;RemoteOnly&lt;/span&gt;&quot;to&lt;span style=&quot;color: red;&quot;&gt;mode&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;On&lt;/span&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;defaultRedirect&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;GenericErrorPage.htm&lt;/span&gt;&quot; to &lt;span style=&quot;color: red;&quot;&gt;defaultRedirect&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;ErrorPage.aspx&lt;/span&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The modified code will now look like this:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;customErrors&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;mode&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;On&lt;/span&gt;&quot;&lt;span style=&quot;color: red;&quot;&gt;defaultRedirect&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;ErrorPage.aspx&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;error&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;statusCode&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;403&lt;/span&gt;&quot;&lt;span style=&quot;color: red;&quot;&gt;redirect&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;NoAccess.htm&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;error&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;;&quot;&gt;statusCode&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;404&lt;/span&gt;&quot;&lt;span style=&quot;color: red;&quot;&gt;redirect&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;FileNotFound.htm&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&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; &lt;!--&lt;/span--&gt;&lt;span style=&quot;color: #a31515; font-family: &#39;Courier New&#39;;&quot;&gt;customErrors&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;This configuration will now redirect the user to an Error page when an error occurs. Let us create this error page and display some message to the user.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Right Click Project &amp;gt; Add New Item&amp;gt; Create a new ErrorPage.aspx page in the application and display a sample message on the page informing the user that an error has occurred. &lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;To test our functionality, go back to Default.aspx, add another button and rename it to btnUnhandled and set its Text property to ‘Throw Unhandled Exception’. Here instead of throwing the exception as we did for ‘btn_Error’, we will introduce a ‘Divide By Zero’ exception and not handle it. Observe that there is no try catch block as shown below. So when the error occurs, the user will be redirected to the ‘ErrorPage.aspx’ as a result of the changes made in our web.config file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; btnHandled_Click(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: #2b91af;&quot;&gt;EventArgs&lt;/span&gt; e)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;throw&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Exception&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sample Exception&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;Exception&lt;/span&gt; ex)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Log the error to a text file in the Error folder&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;ErrHandler&lt;/span&gt;.WriteError(ex.Message);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;;&quot;&gt;Protected&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; btnUnhandled_Click(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; sender &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Object&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; e &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; System.EventArgs) &lt;span style=&quot;color: blue;&quot;&gt;Handles&lt;/span&gt; btnUnhandled.Click&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; i &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt; = 1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; j &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt; = 0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(i \ j)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Run the application and click on the ‘Throw Unhandled Exception’ button. You will observe that the user will be automatically redirected to the Error Page and the error will be logged in the Error folder. Well that’s it. &lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;In this article, we saw how to implement a simple error logging system in our application. Logging errors can be very useful and helps us detect errors during development and operation of a website. ASP.NET also provides some advanced options titled under ‘Health Monitoring’ where the errors can be stored in Sql Server or even emailed to the administrator based on the criticality of it.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;I hope this article was useful and I thank you for viewing it.&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Download the source code of the application over &lt;/span&gt;&lt;a href=&quot;http://www.dotnetcurry.com/Uploads/ErrorHandling.zip&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana; font-size: x-small;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/9192476312803395991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/10/error-logging-using-aspnet-20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/9192476312803395991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/9192476312803395991'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/10/error-logging-using-aspnet-20.html' title='Error Logging using ASP.NET 2.0'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3134229932700174553.post-1487137754729240929</id><published>2009-10-02T21:58:00.001-07:00</published><updated>2009-10-02T21:58:13.481-07:00</updated><title type='text'>Dynamically Generate META tags in ASP.NET pages with LINQ to SQL</title><content type='html'>&lt;div align=&quot;justify&quot; style=&quot;margin: 24pt 0in 0pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #365f91; font-family: Cambria; font-size: large;&quot;&gt;Dynamically Generate&amp;nbsp;META tags in ASP.NET pages with LINQ to SQL&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Earlier this year I wrote an article on how to &lt;/span&gt;&lt;a href=&quot;http://www.dotnetcurry.com/ShowArticle.aspx?ID=319&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Dynamically Generate Meta Tags for ASP.NET Pages using LINQ To XML&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;.&amp;nbsp;I received allot of feedback from readers on that article, and some people pointed out this information should be coming from a database.&amp;nbsp;Well I thought it was time to address this by writing an article on how to generate this information from a database.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The first step is creating the database.&amp;nbsp;I have created a database called MetaTags and it contains two tables.&amp;nbsp;One called Pages and the other called MetaData.&amp;nbsp;The script to create the database&amp;nbsp; (MetaTags.sql)&amp;nbsp;can be downloaded along with the source code&amp;nbsp;(link given at the end) of this article, but the tables will end up looking like this:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;Page_MeataData&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/aspnet/2809Page_MeataData.png&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The Page table will store the name of the page, and the MetaData will store Meta information on the page.&amp;nbsp;This is a one to many relationship as one page can have multiple Meta tags.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;The next step in to create a new web application project.&amp;nbsp;Open Visual Studio 2008 and choose File &amp;gt; New &amp;gt; Web &amp;gt; ASP.NET Web Application.&amp;nbsp;I’m going to use LINQ to SQL in this example as I think it’s a great piece of technology.&amp;nbsp;Right click on the project and choose Add &amp;gt; New Item &amp;gt; LINQ to SQL Classes.&amp;nbsp;Name the new file MetaTags.&amp;nbsp;Once the file is created, connect to your SQL Server and drag and drop the two tables created in the previous step.&amp;nbsp;Your file should look like this:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;Page_MetaData_1&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/aspnet/2809Page_MetaData_1.png&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Save and build your project.&amp;nbsp;Now that’s done the last thing to do is add a master page to the project.&amp;nbsp;Right click the project and choose Add &amp;gt; New Item &amp;gt; Master Page.&amp;nbsp;When the page is created, open up the code behind file and add the following code:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Page_Load(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: #2b91af;&quot;&gt;EventArgs&lt;/span&gt; e)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; (!IsPostBack)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FetchMetaData();&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; FetchMetaData()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; (&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; dc = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;MetaDataDataContext&lt;/span&gt;())&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; query = &lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt; page &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; dc.Pages&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: blue;&quot;&gt;join&lt;/span&gt; meta &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; dc.MetaDatas &lt;span style=&quot;color: blue;&quot;&gt;on&lt;/span&gt; page.PageId &lt;span style=&quot;color: blue;&quot;&gt;equals&lt;/span&gt; meta.PageId&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;where&lt;/span&gt; page.PageName.ToLower() == Request.Url.AbsolutePath.ToLower()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;span style=&quot;color: blue;&quot;&gt;select&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Key = meta.KeyName,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; meta.Value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt 1in; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; (&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; item &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; query)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;span style=&quot;color: #2b91af;&quot;&gt;HtmlMeta&lt;/span&gt; meta = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;HtmlMeta&lt;/span&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;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; meta.Name = item.Key;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; meta.Content = item.Value;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; Page.Header.Controls.Add(meta); &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Protected&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; Page_Load(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; sender &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Object&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; e &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; EventArgs)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;If&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; (&lt;span style=&quot;color: blue;&quot;&gt;Not&lt;/span&gt; IsPostBack) &lt;span style=&quot;color: blue;&quot;&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;FetchMetaData()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Private&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; FetchMetaData()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; dc = &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; MetaDataDataContext()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; query = &lt;span style=&quot;color: blue;&quot;&gt;From&lt;/span&gt; page &lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt; dc.Pages _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Join meta &lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt; dc.MetaDatas &lt;span style=&quot;color: blue;&quot;&gt;On&lt;/span&gt; page.PageId Equals meta.PageId _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where page.PageName.ToLower() = Request.Url.AbsolutePath.ToLower() _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Select&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Key = meta.KeyName, meta.Value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt; item &lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt; query&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; meta &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; HtmlMeta()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;meta.Name = item.Key&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;meta.Content = item.Value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Page.Header.Controls.Add(meta)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; item&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Using&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;In the code above, the code will run on each page request.&amp;nbsp;It executes the LINQ query which returns Meta information for the requesting page:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; query = &lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt; page &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; dc.Pages&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;join&lt;/span&gt; meta &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; dc.MetaDatas &lt;span style=&quot;color: blue;&quot;&gt;on&lt;/span&gt; page.PageId &lt;span style=&quot;color: blue;&quot;&gt;equals&lt;/span&gt; meta.PageId&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;where&lt;/span&gt; page.PageName.ToLower() == Request.Url.AbsolutePath.ToLower()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; Key = meta.KeyName,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; meta.Value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; query = &lt;span style=&quot;color: blue;&quot;&gt;From&lt;/span&gt; page &lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt; dc.Pages _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Join meta &lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt; dc.MetaDatas &lt;span style=&quot;color: blue;&quot;&gt;On&lt;/span&gt; page.PageId Equals meta.PageId _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where page.PageName.ToLower() = Request.Url.AbsolutePath.ToLower() _&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Select&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; Key = meta.KeyName, meta.Value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;If records are found, the &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt; loop will enumerate through each record and create a new &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;HtmlMeta&lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt; object.&amp;nbsp;This object allows programmatic access to the  tag on the server:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;C#&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; (&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; item &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; query)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;HtmlMeta&lt;/span&gt; meta = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;HtmlMeta&lt;/span&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;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;meta.Name = item.Key;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; meta.Content = item.Value;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Page.Header.Controls.Add(meta); &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;VB.NET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt; item &lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt; query&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; meta &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; HtmlMeta()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;meta.Name = item.Key&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;meta.Content = item.Value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Page.Header.Controls.Add(meta)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Next&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt; item&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;That’s it.&amp;nbsp;When you run the application you’ll see the HTML Meta tags have been added to the page:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;img alt=&quot;HTML&quot; src=&quot;http://i849.photobucket.com/albums/ab56/a2zknowledge/aspnet/2809HTML.jpg&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;One thing I will point out is that I have used Request.Url.AbsolutePath in my LINQ query.&amp;nbsp;This property will return the absolute path of the requesting page, so for example if the requesting page is coming from the Default.aspx page in the root directory it will appear as this:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;/Default.aspx&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;I chose to leave this instead of querying for the exact page name because for the simple fact that if you have a sub folder, there’s a chance you could have a page that is the same name as another page in a different folder.&amp;nbsp;So if you have a folder called Admin and you want to add Meta tags to it, you’ll need to add the absolute path into the database:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt; &lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;/Admin/Default.aspx&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;This way you’ll always fetch the correct Meta tags for the requested page.&amp;nbsp;I hope you have found this article of interest.&amp;nbsp;Meta tags are a great way to describe your website to the outside world, and this way you can dynamically add this data with LINQ.&amp;nbsp;Yet another good use for LINQ! The entire &lt;strong&gt;source code&lt;/strong&gt; of this article can be downloaded from &lt;a href=&quot;http://cid-9985e8fe16c84ccb.skydrive.live.com/self.aspx/Public/dotnetcurry/DynamicMetaTagsLinQ.zip&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://asktheque.blogspot.com/feeds/1487137754729240929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asktheque.blogspot.com/2009/10/dynamically-generate-meta-tags-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/1487137754729240929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3134229932700174553/posts/default/1487137754729240929'/><link rel='alternate' type='text/html' href='http://asktheque.blogspot.com/2009/10/dynamically-generate-meta-tags-in.html' title='Dynamically Generate META tags in ASP.NET pages with LINQ to SQL'/><author><name>Deepak Karma</name><uri>http://www.blogger.com/profile/03205256869269638053</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://i849.photobucket.com/albums/ab56/a2zknowledge/aspnet/th_2809Page_MeataData.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>