<?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-9006641</id><updated>2013-11-25T15:14:36.605+05:00</updated><category term="MOSS 2007"/><category term="SharePoint Designer 2007"/><category term="State Machine Workflow"/><category term="ADO.NET Entity Framework"/><category term="Code Generation"/><category term="DAL"/><category term="LINQ"/><category term="MOSS"/><category term="O/R Mapper"/><category term="Oddcast"/><category term="Pakistan Developer Conference 2007"/><category term="SitePal"/><category term="Speech"/><category term="SubSonic"/><category term="TTS"/><category term="Text-to-Speech"/><category term="Workflow Forms"/><title type='text'>core.net</title><subtitle type='html'>.NET, Speech Technologies, and anything technical (including SharePoint)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default?alt=atom'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default?alt=atom&amp;start-index=26&amp;max-results=25'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>74</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9006641.post-7497997496546087835</id><published>2012-08-17T23:45:00.002+05:00</published><updated>2013-03-14T20:15:56.788+05:00</updated><title type='text'>Apply new Master Page to existing My Sites in MS SharePoint 2010</title><content type='html'>&lt;b&gt;Scenario:&lt;/b&gt;&lt;ol&gt;&lt;li&gt;The PROD farm in your organization has dozens, possibly hundreds, of user My Sites in existence.&lt;/li&gt;&lt;li&gt;All My Sites use custom branding designed by your graphics department.&lt;/li&gt;&lt;li&gt;The graphics department comes up with a new branding for the My Sites to reflect a change in the organization&#39;s strategic focus.&lt;/li&gt;&lt;li&gt;A re-designed master page with the new branding (mysiteRedesigned.master) needs to be applied to ALL existing My Sites without re-provisioning them.&lt;/li&gt;&lt;/ol&gt; &lt;b&gt;Solution:&lt;/b&gt;&lt;ol&gt;&lt;li&gt;Create a folder where you will be copying some files in the subsequent steps. (The script assumes that the folder is C:\temp)&lt;/li&gt;&lt;li&gt;Create a text file in that folder called SitesList.txt&lt;/li&gt;&lt;li&gt;On each separate line inside the SitesList.txt file, enter each of the My Site Urls that you want to apply the master page change to. (These are all the My Sites that already exist. You can get a list by going to Central Administration &gt; View Al Site Collections)&lt;/li&gt;&lt;li&gt;Drop the new/updated Master Page file in the folder you created in Step 1, i.e. C:\temp&lt;/li&gt;&lt;li&gt;Run SharePoint 2010 Management Shell, and paste the following code in the PowerShell window.&lt;/li&gt;&lt;/ol&gt; &lt;pre&gt;&lt;br /&gt;$SourceFilePath = &quot;C:\temp\SitesList.txt&quot; &lt;br /&gt;$SiteList = Get-Content $SourceFilePath &lt;br /&gt;&lt;br /&gt;foreach ($SiteUrl in $SiteList) { &lt;br /&gt; write-host &quot;Applying master page to Url&quot;, $SiteUrl&lt;br /&gt;  &lt;br /&gt; $site=Get-SpSite $SiteUrl&lt;br /&gt; $web=$site.RootWeb&lt;br /&gt; $masterPageSrc = &quot;C:\temp\mysiteRedesigned.master&quot;&lt;br /&gt; $masterPageDest = $web.GetFolder(&quot;Master Page Gallery&quot;)&lt;br /&gt;&lt;br /&gt; Get-ChildItem $masterPageSrc | foreach { &lt;br /&gt;  $stream = [IO.File]::OpenRead($_.FullName)&lt;br /&gt;  $destUrl = $web.Url + &quot;/_catalogs/masterpage/&quot; + $_.Name.Replace(&quot; &quot;,&quot;&quot;) &lt;br /&gt;  $resultingfile = $masterPageDest.files.Add($destUrl, $stream, $true)&lt;br /&gt;  $stream.close()&lt;br /&gt; } &lt;br /&gt;&lt;br /&gt; $masterUrl = New-Object System.Uri($destUrl)&lt;br /&gt; $web.MasterUrl = $masterUrl.AbsolutePath&lt;br /&gt; $web.CustomMasterUrl = $masterUrl.AbsolutePath&lt;br /&gt; $web.Update()&lt;br /&gt; $web.Dispose()&lt;br /&gt; $site.Dispose() &lt;br /&gt;  &lt;br /&gt; write-host &quot;Done&quot;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; &lt;i&gt;The accompanying SiteList.txt file should list each My Site Url to apply fix to.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SitesList.txt&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;http://mysites.inetaPakistan.org/personal/saqib_ilyas http://mysites.inetaPakistan.org/personal/hammad_rajjoub http://mysites.inetaPakistan.org/personal/adnan_hashmi  &lt;img src=&quot;http://adnan.blob.core.windows.net/images/logo-powershell.png&quot; border=&quot;0&quot; style=&quot;display: none&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/7497997496546087835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=7497997496546087835' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/7497997496546087835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/7497997496546087835'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2012/08/apply-new-master-page-to-existing-my.html' title='Apply new Master Page to existing My Sites in MS SharePoint 2010'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-7425232731234894137</id><published>2011-10-21T19:43:00.002+05:00</published><updated>2013-03-15T02:07:41.424+05:00</updated><title type='text'>Branding SharePoint</title><content type='html'>&lt;table cellpadding=&quot;10&quot; cellspacing=&quot;0&quot; style=&quot;background: #edf0f1; border-style: solid; border: 1px #b5b5b5 solid; width: 300px&quot;&gt;&lt;tr&gt;         &lt;td&gt;&lt;a href=&quot;http://www.inetapakistan.org/&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;INETA Pakistan&quot; border=&quot;0&quot; src=&quot;http://inetapakistan.org/pics/inetaPakistan.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;font-family: Verdana; text-align: center;&quot;&gt;&lt;div style=&quot;color: grey; font-size: 9pt; font-weight: bold;&quot;&gt;SharePoint Branding Screencast&lt;/div&gt;&lt;div style=&quot;font-size: 8pt;&quot;&gt;&lt;a href=&quot;http://inetapakistan.org/post/2011/10/15/Branding-MS-SharePoint-2010.aspx&quot; target=&quot;_blank&quot;&gt;Branding MS SharePoint 2010&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;font-size: 8pt;&quot;&gt;&lt;a href=&quot;http://inetapakistan.org/post/2010/11/06/Branding-MS-Office-SharePoint-2007.aspx&quot; target=&quot;_blank&quot;&gt;Branding MS Office SharePoint 2007&lt;/a&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/7425232731234894137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=7425232731234894137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/7425232731234894137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/7425232731234894137'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2011/10/branding-sharepoint.html' title='Branding SharePoint'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-8156369792843137862</id><published>2008-07-27T07:03:00.010+06:00</published><updated>2013-03-14T20:25:40.337+05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MOSS 2007"/><category scheme="http://www.blogger.com/atom/ns#" term="Workflow Forms"/><title type='text'>MOSS 2007 Workflow Forms: Everything you ever wanted to know but were afraid to ask (Part I)</title><content type='html'>&lt;b&gt;Background&lt;/b&gt;&lt;br /&gt;What differentiates a workflow from a typical process written in code is the ability of multiple actors (human or otherwise) to interact with the long-running workflow process during the course of execution. This allows the executing process to behave in a manner that external actors want it to, as opposed to just performing a sequence of operations along a single pre-defined path. The rule-of-thumb while choosing between Sequential and State-Machine Workflows is based on a simple premise based on the scenario for which the workflow is being created:&lt;br /&gt;&lt;ul type=&quot;square&quot;&gt;&lt;br /&gt;  &lt;li&gt;&lt;strong&gt;Sequential Workflow:&lt;/strong&gt; Use when a pre-defined sequence of activities need to be executed, involving no external input, and the only repetitive activity executions are through loops.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;strong&gt;State-Machine Workflow:&lt;/strong&gt; Use when external actors are involved, causing the workflow to stop and wait for input from the actor. Also use if the same activity needs to be executed multiple times based on a user-input or external event during the course of workflow execution.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;background-color: #E0EBF5; border: 1px solid #B0CAE5&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; You can choose to use a Sequential workflow even when external actor interaction is involved. However, this will not allow you to jump to another activity, other than the one next in the sequence.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Developing a State-Machine workflow in Visual Studio 2005&lt;/strong&gt;&lt;br /&gt;Read the following posts to learn how to develop a state-machine workflow in VS 2005.&lt;br /&gt;&lt;br /&gt;&lt;ul type=&quot;square&quot;&gt;&lt;br /&gt;   &lt;li&gt;&lt;a href=&quot;https://blogs.pointbridge.com/Blogs/morse_matt/Lists/Posts/Post.aspx?ID=9&quot; target=&quot;_blank&quot;&gt;Creating a MOSS state machine workflow - Part 1 of 4 : Concepts and planning&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;&lt;a href=&quot;https://blogs.pointbridge.com/Blogs/morse_matt/Lists/Posts/Post.aspx?ID=11&quot; target=&quot;_blank&quot;&gt;Creating a MOSS state machine workflow - Part 2 of 4: Creating InfoPath forms&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;&lt;a href=&quot;https://blogs.pointbridge.com/Blogs/morse_matt/Lists/Posts/Post.aspx?ID=16&quot; target=&quot;_blank&quot;&gt;Creating a MOSS state machine  workflow - Part 3 of 4 : workflow development&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;&lt;a href=&quot;https://blogs.pointbridge.com/Blogs/morse_matt/Pages/Post.aspx?_ID=20&quot; target=&quot;_blank&quot;&gt;Creating a MOSS State Machine Workflow - Part 4 of 4: Workflow Deployment&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Apart from the workflow code file (*.cs and/or *.xoml), the workflow project should include the following files:&lt;br /&gt;&lt;ul type=&quot;square&quot;&gt;&lt;br /&gt;   &lt;li&gt;feature.xml (Contains information about the SharePoint feature)&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;workflow.xml (Specifies the workflow properties for the SharePoint feature)&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;PostBuildActions.bat (A batch file executed as a Post-build event inside Visual Studio that creates a sub-folder in the &#39;FEATURES&#39; directory under 12 hive [C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE] and copies feature.xml and workflow.xml files into it; also executes the &lt;code&gt;stsadm&lt;/code&gt; command to activate the deployed feature on a SharePoint site)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;background-color: #E0EBF5; border: 1px solid #B0CAE5&quot;&gt; &lt;strong&gt;Note:&lt;/strong&gt; You can avoid creating the PostBuildActions.bat file if you use &lt;a href=&quot;http://codeplex.com/wspbuilder&quot; target=&quot;_blank&quot;&gt;WSPBuilder&lt;/a&gt; to generate a SharePoint solution file (*.wsp) and deploy it from within the VS2005 environment.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The life-cycle of a workflow involves the following stages:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;Development:&lt;/b&gt; Visually creating the workflow in VS2005/VS2008 Workflow Designer and writing code for each activity. Also includes creating workflow.xml, feature.xml, and PostBuildActions.bat&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;Deployment:&lt;/b&gt; Deploying the workflow to a SharePoint Server farm and activating it either using the PostBuildActions.bat batch file or using &lt;a href=&quot;http://codeplex.com/wspbuilder&quot; target=&quot;_blank&quot;&gt;WSPBuilder&lt;/a&gt;. In either case, a new folder is created in the FEATURES directory (explained above), the workflow.xml &amp; feature.xml files are copied to it, the workflow assembly (*.dll) is installed into the GAC or copied to the Virtual Directory&#39;s bin folder, and the stsadm command is used to activate the feature&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;Association:&lt;/b&gt; Attaching the workflow to a list or content type and specifying when a new workflow instance should kick-off; either manually, OR automatically when a new item is created and/or updated.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;Execution:&lt;/b&gt;This stage involves the following sub-stages&lt;/li&gt;&lt;br /&gt;  &lt;ul type=&quot;square&quot;&gt;&lt;br /&gt;    &lt;li&gt;&lt;b&gt;Initiation:&lt;/b&gt; This is the first stage for any workflow instance, happens ONLY once during the course of execution, and is marked by firing of the OnWorkflowActivated event.&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;&lt;b&gt;Passivation or De-hydration:&lt;/b&gt; This is the process of persisting the workflow instance to a datastore so that it can subsequently re-loaded into memory for further execution. Also, passivation or dehydration occurs when the workflow instance wants to wait for an external input or event to execute further.&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;&lt;b&gt;Re-hydration:&lt;/b&gt; This stage involves the workflow instance being loaded back into memory by the workflow engine, after a user input is received OR an external event fires.&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;&lt;b&gt;Activity Execution:&lt;/b&gt; This is characterized by the workflow engine executing the code in each of the workflow activities in the defined sequence, or transitioning states in case of a state-machine workflow.&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;&lt;b&gt;Modification:&lt;/b&gt; This stage is optional, but it allows workflow actors to inject new values into the workflow instance while it is in execution to alter its behavior. This also entails that the workflow has the logic built into it to process the new values.&lt;/li&gt;&lt;br /&gt;  &lt;/ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;Completion:&lt;/b&gt; The competion stage is marked by the workflow instance completing execution successfully, and the status being written to the data store.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;Termination:&lt;/b&gt; This stage refers to the workflow instance stopping abruptly due to an internal error, or an actor explicitly ending the workflow instance. Any data written to the list by the workflow instance is NOT rolled-back if the workflow is terminated. Terminated workflows cannot be restarted again.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Having got the above off my chest, lets delve into how users (workflow actors) interact with the workflow.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Workflow Forms&lt;/b&gt;&lt;br /&gt;Workflows Forms (as the name implies) are typical forms that allow user input to be communicated to the workflow. In addition, workflow forms also allow data within the workflow to be presented to the actor so that they can take appropriate action. The 4 types of workflow forms that can be created are:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;Association Forms:&lt;/b&gt; Displayed to the user at the time the workflow is being associated to a list or content type to allow user to enter any additional values that can be used in the workflow association process.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;Initiation Forms:&lt;/b&gt; When the users initiates a workflow instance, the Initiation Form is displayed to allow entry of additional parameter values that the workflow instance can process during execution.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;Modification Forms:&lt;/b&gt; Modofication forms are displayed either when the workflow instance encounters the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflowactions.enableworkflowmodification.aspx&quot; target=&quot;_blank&quot;&gt;EnableWorkflowModification&lt;/a&gt; activity, OR the user clicks the Modification link on the workflow status page.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;Task Forms:&lt;/b&gt; During execution, a workflow creates tasks in the Tasks List that tell the user what they need to do, and in most cases, move the workflow forward when a task is marked as complete. From the users&#39; perspective, tasks enable them to know where the workflow stands, and what needs to be done to get to the next process in the flow sequence.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;In my next post, I will cover how to develop each of the Workflow forms in a state-machine workflow using both ASP.NET and Microsoft InfoPath 2007.  &lt;img src=&quot;http://adnan.blob.core.windows.net/images/logo-workflow.png&quot; style=&quot;display: none&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/8156369792843137862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=8156369792843137862' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/8156369792843137862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/8156369792843137862'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2008/07/moss-2007-workflow-forms-everything-you.html' title='MOSS 2007 Workflow Forms: Everything you ever wanted to know but were afraid to ask (Part I)'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-9188426566608195734</id><published>2008-04-14T06:45:00.002+05:00</published><updated>2008-04-14T06:56:19.045+05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MOSS 2007"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint Designer 2007"/><category scheme="http://www.blogger.com/atom/ns#" term="State Machine Workflow"/><title type='text'>Creating State Machine Workflows using SharePoint Designer 2007: Addendum</title><content type='html'>In my &lt;a href=&quot;http://coredotnet.blogspot.com/2008/03/creating-state-machine-workflows-using.html&quot;&gt;previous post&lt;/a&gt;, I gave an overview of how to mimic State Machine behavior using sequential workflows developed in SharePoint Designer (SPD) 2007. This post is actually a walk-thru of the development process in SPD 2007.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Create Lists&lt;/u&gt;&lt;br /&gt;Create the following 2 lists (See description in previous post cited above):&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;Core.NET Content (Document Library)&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Core.NET Approval Workflows (Custom List with following columns)&lt;/li&gt;&lt;br /&gt;  &lt;ul&gt;&lt;br /&gt;&lt;br /&gt;    &lt;li&gt;Title: Single line of text&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;File URL: Hyperlink or Picture&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;li&gt;Workflow Status: Choice (with following choice values)&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;Content Analyst: User&lt;/li&gt;&lt;br /&gt;    &lt;ol&gt;&lt;br /&gt;      &lt;li&gt;Awaiting Approval&lt;/li&gt;&lt;br /&gt;      &lt;li&gt;Pending Analysis &amp; Review&lt;/li&gt;&lt;br /&gt;      &lt;li&gt;Awaiting Approval&lt;/li&gt;&lt;br /&gt;      &lt;li&gt;Approved&lt;/li&gt;&lt;br /&gt;    &lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/ul&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Create &#39;Approval Initiation Workflow&#39; on the &#39;Core.NET Content&#39; list&lt;/u&gt;&lt;br /&gt;Open an instance of SharePoint Designer 2007 on your machine. Go to &lt;b&gt;File &gt; Open Site...&lt;/b&gt; and enter the URL for the site you created the lists on.&lt;br /&gt;Go to &lt;b&gt;File &gt; New... &gt; Workflow...&lt;/b&gt;, enter &lt;b&gt;Approval Initiation Workflow&lt;/b&gt; as the name of the workflow, and select &lt;b&gt;Core.NET Content&lt;/b&gt; from the drop down list. Make sure that only the second checkbox (Automatically start this workflow when a new item is created) is checked, and click &lt;b&gt;Next&lt;/b&gt;&lt;br /&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_BTxLg4n6gwo/SAKyLE8qCiI/AAAAAAAAACw/_g_hbW1r2hU/s1600-h/spd01.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://3.bp.blogspot.com/_BTxLg4n6gwo/SAKyLE8qCiI/AAAAAAAAACw/_g_hbW1r2hU/s320/spd01.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5188905624060693026&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Create workflow action to insert an item into the second list&lt;/u&gt;&lt;br /&gt;Enter &lt;b&gt;Initiate Approval process for uploaded content&lt;/b&gt; as the Step Name. Click the &lt;b&gt;Actions&lt;/b&gt; dropdown button and select &lt;b&gt;Create List Item&lt;/b&gt;&lt;br /&gt; from the dropdown. Click the &lt;b&gt;this list&lt;/b&gt; link on the action, select the &lt;b&gt;Core.NET Approval Workflows&lt;/b&gt; list from the drop down at the top of the &#39;Create New List Item&#39; dialog, and specify the values for each of the columns as shown below:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Title = Core.NET Content:Name&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;File URL = Core.NET Content:URL Path&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Workflow Status = Awaiting Assignment&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Click the &lt;b&gt;Finish&lt;/b&gt; button to publish the workflow.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_BTxLg4n6gwo/SAKykk8qCjI/AAAAAAAAAC4/M98oawO9h20/s1600-h/spd02.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://1.bp.blogspot.com/_BTxLg4n6gwo/SAKykk8qCjI/AAAAAAAAAC4/M98oawO9h20/s320/spd02.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5188906062147357234&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The above step simply takes values from the document library (Core.NET Content) and inserts into the &lt;b&gt;Core.NET Approval Workflows&lt;/b&gt; list. We now turn our focus to the other list, and the second workflow.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Create &#39;Approval Process Workflow&#39; on the &#39;Core.NET Approval Workflows&#39; list&lt;/u&gt;&lt;br /&gt;Create the workflow as below; enter &lt;b&gt;Approval Process Workflow&lt;/b&gt; as the name of the workflow, and select &#39;Core.NET Approval Workflows&#39; list from the drop-down. Make usre that the last 2 checkboxes (Automatically start this workflow when a new item is created + Automatically start this workflow whenever an item is changed) are checked.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Create Variables for the workflow&lt;/u&gt;&lt;br /&gt;Click the &lt;b&gt;Variables...&lt;/b&gt; button in the Workflow Designer window, and create variables as below:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_BTxLg4n6gwo/SAKyrk8qCkI/AAAAAAAAADA/bx1ZMnZQB3c/s1600-h/spd03.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://1.bp.blogspot.com/_BTxLg4n6gwo/SAKyrk8qCkI/AAAAAAAAADA/bx1ZMnZQB3c/s320/spd03.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5188906182406441538&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The &#39;Approval Process Workflow&#39; will consist of the following 3 steps:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Get Workflow Data&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Process Workflow Status&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Process Approval/Rejection by Manager&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Update Workflow Status&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;u&gt;Note:&lt;/u&gt; By updating the list in the very last step, the subsequent instance of the workflow (started on item update) can kick off immediately. If the current workflow updates the list while it still has some more activities to perform, the second workflow fails.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;An explanation of each of the step follows:&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Step 0: Terminate Workflow if already approved&lt;/u&gt;&lt;br /&gt;This step is optional, hence I did not include it in the above list of steps. It simply checks to see if the item has already been approved, and if it is, terminates the workflow using the &lt;b&gt;Stop Workflow&lt;/b&gt; activity.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_BTxLg4n6gwo/SAKz608qClI/AAAAAAAAADI/3qSxgCx1Hls/s1600-h/spd04.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://2.bp.blogspot.com/_BTxLg4n6gwo/SAKz608qClI/AAAAAAAAADI/3qSxgCx1Hls/s320/spd04.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5188907543911074386&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Step 1: Get Workflow Data&lt;/u&gt;&lt;br /&gt;This step simply intializes the values of the variables and comprises the following 2 steps:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;Set the &lt;b&gt;ContentAnalyst&lt;/b&gt; variable to the value of the &lt;b&gt;Content Analyst&lt;/b&gt; column in the Current item. (This value will be empty when the first instance executes)&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Initialize the &lt;b&gt;UpdateStatus&lt;/b&gt; variable to &#39;No&#39;.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_BTxLg4n6gwo/SAK0ME8qCmI/AAAAAAAAADQ/OX0rzN7V0mo/s1600-h/spd05.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://3.bp.blogspot.com/_BTxLg4n6gwo/SAK0ME8qCmI/AAAAAAAAADQ/OX0rzN7V0mo/s320/spd05.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5188907840263817826&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Step 2: Process Workflow Status&lt;/u&gt;&lt;br /&gt;This step relies on IF condition activities to process the workflow according to the Workflow Status for that particular instance of the workflow. &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_BTxLg4n6gwo/SAK0Wk8qCnI/AAAAAAAAADY/Pu77m-8KbH8/s1600-h/spd06.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://1.bp.blogspot.com/_BTxLg4n6gwo/SAK0Wk8qCnI/AAAAAAAAADY/Pu77m-8KbH8/s320/spd06.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5188908020652444274&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Refer to the diagram above; starting from the top&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;The first time the workflow executes, the status is set to &lt;b&gt;Awaiting Assignment&lt;/b&gt;, causing ONLY the Actions for the first Condition to execute. The action themselves are pretty straight-forward and self-explanatory.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;The second condition (where status equals &#39;Pending Analysis &amp; Review&#39;) may be true a number of times, depending on the number of times the manager rejects the document.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;br /&gt;Just like the second condition, this may be true multiple times depending on the number of times the workflow was submitted to the manager for approval.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Alternatively, you can also add a condition here to check if the workflow status is set if &#39;Approved&#39;, and terminate the workflow (as shown below).&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_BTxLg4n6gwo/SAK08k8qCoI/AAAAAAAAADg/Jw-tS-RLuzc/s1600-h/spd07.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://1.bp.blogspot.com/_BTxLg4n6gwo/SAK08k8qCoI/AAAAAAAAADg/Jw-tS-RLuzc/s320/spd07.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5188908673487473282&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Note: You can get the user input for a &#39;Collect Data from a User&#39; action by simply referencing the column of the Tasks list named after that specific input you specified in the &#39;Custom Task Wizard&#39; dialog.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_BTxLg4n6gwo/SAK1Sk8qCpI/AAAAAAAAADo/SySy0ROsFbI/s1600-h/spd08.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://1.bp.blogspot.com/_BTxLg4n6gwo/SAK1Sk8qCpI/AAAAAAAAADo/SySy0ROsFbI/s320/spd08.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5188909051444595346&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Step 3: Process Approval/Rejection by Manager&lt;/u&gt;&lt;br /&gt;This step was included since its not possible to have a nested IF statement in the Actions sections of a step. &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_BTxLg4n6gwo/SAK1S08qCqI/AAAAAAAAADw/mMY_l2oZ9Ek/s1600-h/spd09.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://2.bp.blogspot.com/_BTxLg4n6gwo/SAK1S08qCqI/AAAAAAAAADw/mMY_l2oZ9Ek/s320/spd09.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5188909055739562658&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Either one of the conditions can only be true if and only if the workflow status is &lt;b&gt;Awaiting Approval&lt;/b&gt;. If the Manager APPROVED the document, the &lt;b&gt;NewStatus&lt;/b&gt; variable is set to Approved, if the Manager REJECTED the content document, the &lt;b&gt;NewStatus&lt;/b&gt; variable is set to &lt;b&gt;Pending Analysis &amp; Review&lt;/b&gt;, sending the workflow back to the Analyst specified by the Repository Manager.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Step 4: Update Workflow Status&lt;/u&gt;&lt;br /&gt;This step MUST execute at the very end, to allow the successful termination of the current workflow instance and initiation of the subsequent workflow instance. Also, the &lt;b&gt;UpdateStatus&lt;/b&gt; variable was explicitly set to &#39;No&#39; at the very start of the workflow instance, and unless a step hasn&#39;t set it to &#39;Yes&#39;, the update action in this step will not execute. &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_BTxLg4n6gwo/SAK1TE8qCrI/AAAAAAAAAD4/pssemcr9kzA/s1600-h/spd10.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://3.bp.blogspot.com/_BTxLg4n6gwo/SAK1TE8qCrI/AAAAAAAAAD4/pssemcr9kzA/s320/spd10.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5188909060034529970&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This step updates the &#39;Workflow Status&#39; column&lt;br /&gt; to the value in the &lt;b&gt;NewStatus&lt;/b&gt; variable, and the &#39;Content Analyst&#39; column to the value in the &lt;b&gt;ContentAnalyst&lt;/b&gt; variable (shown below).&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_BTxLg4n6gwo/SAK1TU8qCsI/AAAAAAAAAEA/AZx1za1Vykw/s1600-h/spd11.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://4.bp.blogspot.com/_BTxLg4n6gwo/SAK1TU8qCsI/AAAAAAAAAEA/AZx1za1Vykw/s320/spd11.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5188909064329497282&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/9188426566608195734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=9188426566608195734' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/9188426566608195734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/9188426566608195734'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2008/04/creating-state-machine-workflows-using.html' title='Creating State Machine Workflows using SharePoint Designer 2007: Addendum'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_BTxLg4n6gwo/SAKykk8qCjI/AAAAAAAAAC4/M98oawO9h20/s72-c/spd02.jpg" height="72" width="72"/><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-3034087381027785530</id><published>2008-03-31T06:57:00.005+05:00</published><updated>2008-04-20T10:02:17.712+05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MOSS"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint Designer 2007"/><category scheme="http://www.blogger.com/atom/ns#" term="State Machine Workflow"/><title type='text'>Creating State Machine Workflows using SharePoint Designer 2007</title><content type='html'>NOTE: This is a workaround to mimic state-machine behavior from a sequential workflow developed using SharePoint Designer 2007.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;To get up to speed with developing SharePoint workflows using Visual Studio 2005, watch the &lt;a href=&quot;http://www.sheltonblog.com/archive/2007/11/04/series-of-sharepoint-workflow-how-to-videos.aspx&quot;&gt;HOWTO: Series of SharePoint Workflow HOW-TO Videos&lt;/a&gt; by &lt;a href=&quot;http://www.sheltonblog.com&quot;&gt;Robert Shelton&lt;/a&gt;.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Sequential workflows are fairly straight forward to create whether you are developing in Visual Studio (VS) or SharePoint Designer (SPD) 2007 and can be used to model most single or multi-step approval workflows. The only downside to Sequential workflows is that you cannot make the workflow jump back to a previous step/activity that may or may not have already executed or, in other words, cannot move from being in one state to the other like a state machine workflow. For most workflow developers/creators, this is reason enough to go for workflow development in VS. While VS worksflows work just the same as those develped using SPD 2007, keep in mind that SPD 2007 is more suited for managers and/or business analysts (non-developers) who may be reluctant to assign workflow development task because of time, resource, and budgetary constraints. This is where the following intuitive solution may come in handy. Lets look at a hypothetical scenario in detail.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Scenario:&lt;/u&gt;&lt;br /&gt;A technical document needs to be analyzed, revised (if need be), and approved to exist in the repository.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Actors:&lt;/u&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;Repository Managers&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Content Analysts&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Managers&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;text-align:center&quot; src=&quot;http://3.bp.blogspot.com/_BTxLg4n6gwo/R_AMQhi-v_I/AAAAAAAAACg/bnp7l-20dbg/s1600/StateMachineWF.jpg&quot; border=&quot;0&quot; alt=&quot;Approval State Machine Workflow&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Workflow (see state-machine diagram above):&lt;/u&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Document Uploaded to MOSS 2007 Document Library. [Document Status updated to &lt;b&gt;Awaiting Assignment&lt;/b&gt;]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Repository Manager assigns document to &lt;b&gt;Content Analyst&lt;/b&gt;. [Document Status updated to &lt;b&gt;Pending Analysis &amp; Review&lt;/b&gt;]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Analyst views documents, makes required changes, and submits document to &lt;b&gt;Manager&lt;/b&gt; for approval. [Document Status updated to &lt;b&gt;Awaiting Approval&lt;/b&gt;]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;If &lt;b&gt;Manager&lt;/b&gt; rejects document, document routed to &lt;b&gt;Content Analyst&lt;/b&gt;. [Document Status updated to &lt;b&gt;Pending Analysis &amp; Review&lt;/b&gt;]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;If &lt;b&gt;Manager&lt;/b&gt; approves document, it is kept in the document library. [Document Status updated to &lt;b&gt;Approved&lt;/b&gt;]&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;The above workflow is pretty straight-forward, and could easily have been created using SharePoint Designer if it were not for step 4, which can happen any number of times until the document gets approved by the Manager. To create a State Machine behavior in a SPD 2007 workflow, create a separate list (say &lt;b&gt;&quot;Content Approval Workflows&quot;&lt;/b&gt;) to maintain the state of the workflow at any given point in time. A separate list also ensures that the user cannot go and manually change the status. Also, 2 workflows would need to be created; one on the actual document library (called &lt;b&gt;&quot;Core.NET Content&quot;&lt;/b&gt;) that houses the uploaded documents, and the other on the &lt;b&gt;Content Approval Workflows&lt;/b&gt; list. The 2 lists we are working with are summarized below:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Core.NET Content&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;List Type: Document Library&lt;br /&gt;Workflow Name: Approval Initiation Workflow&lt;br /&gt;Workflow Executed: On Item creation&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Core.NET Approval Workflows&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;List Type: Custom List&lt;br /&gt;Workflow Name: Approval Processing Workflow&lt;br /&gt;Workflow Executed: On Item creation&lt;br /&gt;; On Item update&lt;br /&gt;&lt;br /&gt;Columns: Title, Document Status (Choice Column with each of the workflow states), WorkflowInstance Id (Lookup column that references ID column in the &lt;b&gt;Core.NET Content&lt;/b&gt; document library)&lt;br /&gt;&lt;br /&gt;To get an even better idea, take a look at the following diagram.&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;text-align:center&quot; src=&quot;http://4.bp.blogspot.com/_BTxLg4n6gwo/R_AMVxi-wAI/AAAAAAAAACo/5lw24YlAU5Q/s1600/WorkflowLists.jpg&quot; border=&quot;0&quot; alt=&quot;Workflow Lists&quot; /&gt;&lt;br /&gt;&lt;br /&gt;The steps modeled in the diagram above are:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Document uploaded to &lt;b&gt;Core.NET Content&lt;/b&gt; Document Library.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Item creation in &lt;b&gt;Core.NET Content&lt;/b&gt; Document Library kicks off &lt;b&gt;Approval Initiation Workflow&lt;/b&gt; which creates an item in the &lt;b&gt;Content Approval Workflows&lt;/b&gt; list (with the &lt;b&gt;Document Status&lt;/b&gt; value set to &quot;Awaiting Assignment&quot;) and completes.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Creation of item in &lt;b&gt;Content Approval Workflows&lt;/b&gt; list kicks off the &lt;b&gt;Approval Processing Workflow&lt;/b&gt; that performs the following operations recursively i.e. completion of every step below updates the &lt;b&gt;Document Status&lt;/b&gt; column value and in-turn starts another &lt;b&gt;Approval Processing Workflow&lt;/b&gt; instance on the same item.&lt;/li&gt;&lt;br /&gt;  &lt;ol&gt;&lt;br /&gt;    &lt;li&gt;Start on item creation - If &lt;b&gt;Document Status&lt;/b&gt; is &quot;Awaiting Assignment&quot;, create a task in the Tasks list for &lt;b&gt;Repository Managers&lt;/b&gt;, using the &quot;Collect Feedback from user&quot; activity, assign the task to the username entered in the task, and set the &lt;b&gt;Document Status&lt;/b&gt; value to &quot;Pending Analysis &amp; Review&quot;.&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;Start on item update - If &lt;b&gt;Document Status&lt;/b&gt; is &quot;Pending Analysis &amp; Review&quot;, create a task in the Tasks list for the user in the &lt;b&gt;Content Analysts&lt;/b&gt; group who was assigned the Analysis &amp; Review task in the preceding step, using the &quot;Collect Feedback from user&quot; activity, and set the &lt;b&gt;Document Status&lt;/b&gt; value to &quot;Awaiting Approval&quot; when the user clicks the &quot;Complete Task&quot; button.&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;Start on item update - If &lt;b&gt;Document Status&lt;/b&gt; is &quot;Awaiting Approval&quot;, create an approval task in the Tasks list for &lt;b&gt;Managers&lt;/b&gt; using the &quot;Collect Feedback from user&quot; activity, to either approve or reject the document. If Manager approves the document, set the &lt;b&gt;Document Status&lt;/b&gt; value to &quot;Approved&quot;, else set the &lt;b&gt;Document Status&lt;/b&gt; value to &quot;Pending Review &amp; Analysis&quot; which re-starts the workflow from step 3-2.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/ol&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Note: The IF condition on every step ensures that the workflow takes only one path depending on the value for &lt;b&gt;Document Status&lt;/b&gt;. Also, using the &quot;Collect Feedback&quot; activity in SPD 2007 ensures that the workflow stay in the wait state until the actor specifies the required input, and clicks the &quot;Complete Task&quot; button.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[UPDATE: Read the process of creating the State-machine workflow using SharePoint Designer 2007 in the following post &lt;a href=&quot;http://coredotnet.blogspot.com/2008/04/creating-state-machine-workflows-using.html&quot;&gt;here&lt;/a&gt;]&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/3034087381027785530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=3034087381027785530' title='22 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/3034087381027785530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/3034087381027785530'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2008/03/creating-state-machine-workflows-using.html' title='Creating State Machine Workflows using SharePoint Designer 2007'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_BTxLg4n6gwo/R_AMQhi-v_I/AAAAAAAAACg/bnp7l-20dbg/s72-c/StateMachineWF.jpg" height="72" width="72"/><thr:total>22</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-870771640247872788</id><published>2007-05-13T09:34:00.000+05:00</published><updated>2007-05-13T09:45:02.719+05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Pakistan Developer Conference 2007"/><title type='text'>Pakistan Developer Conference 2007</title><content type='html'>With physical presence at Lahore and Islamabad in addition to Karachi, the &lt;a href=&quot;http://www.microsoft.com/pakistan/conference&quot; target=&quot;_blank&quot;&gt;Pakistan Developer Conference 2007&lt;/a&gt; would be the biggest annual developer event in the country.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_BTxLg4n6gwo/RkaWl8iqV0I/AAAAAAAAAAw/hwtvR3TJI0A/s1600-h/PDC2007_Ad.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://2.bp.blogspot.com/_BTxLg4n6gwo/RkaWl8iqV0I/AAAAAAAAAAw/hwtvR3TJI0A/s320/PDC2007_Ad.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5063900409675536194&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Register now!&lt;/strong&gt; I hope to see you there in Lahore and Karachi.</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/870771640247872788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=870771640247872788' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/870771640247872788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/870771640247872788'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2007/05/pakistan-developer-conference-2007.html' title='Pakistan Developer Conference 2007'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_BTxLg4n6gwo/RkaWl8iqV0I/AAAAAAAAAAw/hwtvR3TJI0A/s72-c/PDC2007_Ad.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-7863391849995745804</id><published>2007-04-01T23:35:00.000+05:00</published><updated>2007-04-02T00:33:39.932+05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oddcast"/><category scheme="http://www.blogger.com/atom/ns#" term="SitePal"/><category scheme="http://www.blogger.com/atom/ns#" term="Speech"/><category scheme="http://www.blogger.com/atom/ns#" term="Text-to-Speech"/><category scheme="http://www.blogger.com/atom/ns#" term="TTS"/><title type='text'>A Pal for Web 2.0</title><content type='html'>I &lt;a href=&quot;http://coredotnet.blogspot.com/2005/02/taking-tts-to-new-level.html&quot;&gt;blogged&lt;/a&gt; about &lt;a href=&quot;http://www.sitepal.com&quot;&gt;SitePal&lt;/a&gt; a long time ago. I am blogging about it again, since I now have a demo account. This post is more of a strategy guide than a technology roadmap. If you have a Flash player installed (or you are reading this post while the demo account is still valid and active), you will be able to see (and hear) it on the right sidebar of my blog.&lt;br /&gt;&lt;br /&gt;The technology news coming out of the World Economic Forum that concluded in Davos, Switzerland not very long ago, was abuzz with talk of &lt;a href=&quot;http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html&quot;&gt;Web 2.0&lt;/a&gt;. The essence of Web 2.0 are Rich Internet Applications that give users not only a rich user experience, but which may in fact comprise of data and services from many other 3rd party websites and online resouces. &lt;br /&gt;&lt;br /&gt;In the Web 2.0 world, businesses increasingly have to rely on setting themselves apart through a mixture of content and design to ensure a continued audience and user-base. While the SitePal you see on the right is just a small demonstration of what websites can achieve using this technology, a SitePal can achieve a lot more for your online service than just playing a welcome message. Apart from its obvious usage on Social Networking sites, a SitePal can be leveraged in teaching students online, and for assisting users on insurance, healthcare, or recruitment wesbites. Imagine a website where students learn chemistry from &lt;a href=&quot;http://en.wikipedia.org/wiki/Harry_Potter&quot;&gt;Harry Potter&lt;/a&gt;, physics from &lt;a href=&quot;http://en.wikipedia.org/wiki/Dexters_laboratory&quot;&gt;Dexter&lt;/a&gt;, and computer programming from &lt;a href=&quot;http://en.wikipedia.org/wiki/Jimmy_Neutron&quot;&gt;Jimmy Neutron&lt;/a&gt;; OR in a completely different scenario, allowing senior citizens to hear about diabetes, cancer, and health insurance benefits from a doctor SitePal, without having to read long text from a website or printed brochure.&lt;br /&gt;&lt;br /&gt;The process of creating a SitePal character is pretty straight forward too. The &lt;a href=&quot;http://www.sitepal.com/TutorialMovie/&quot;&gt;tutorial movie&lt;/a&gt; on the SitePal website provides an easy-to-follow walk-thru of setting up and hosting a SitePal character. An existing SitePal character can be modified literally within seconds. I modified the current SitePal character on this blog within minutes, and amazingly, she looked completely different (see picture below). [Since I am very fond of blondes with glasses, I ended up using the previous version].&lt;br /&gt;&lt;br /&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://4.bp.blogspot.com/_BTxLg4n6gwo/Rg_74g9E3BI/AAAAAAAAAAo/yo4UDAVMUcg/s1600-h/WndSitePal.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://4.bp.blogspot.com/_BTxLg4n6gwo/Rg_74g9E3BI/AAAAAAAAAAo/yo4UDAVMUcg/s200/WndSitePal.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5048530655642967058&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;SitePal is not just limited to webpages. You can also embed a SitePal character into your PowerPoint presentation, taking interactivity to a whole new level.&lt;br /&gt;&lt;br /&gt;Try it out for yourself. Certainly reminds one of &lt;a href=&quot;http://www.imdb.com/title/tt0258153/&quot;&gt;S1m0ne (Simone)&lt;/a&gt;, doesn&#39;t it?</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/7863391849995745804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=7863391849995745804' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/7863391849995745804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/7863391849995745804'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2007/04/pal-for-web-20.html' title='A Pal for Web 2.0'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_BTxLg4n6gwo/Rg_74g9E3BI/AAAAAAAAAAo/yo4UDAVMUcg/s72-c/WndSitePal.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-82402871406719535</id><published>2007-03-19T01:10:00.001+05:00</published><updated>2013-03-14T20:29:00.098+05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADO.NET Entity Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Code Generation"/><category scheme="http://www.blogger.com/atom/ns#" term="DAL"/><category scheme="http://www.blogger.com/atom/ns#" term="LINQ"/><category scheme="http://www.blogger.com/atom/ns#" term="O/R Mapper"/><category scheme="http://www.blogger.com/atom/ns#" term="SubSonic"/><title type='text'>DAL goes SubSonic</title><content type='html'>&lt;i&gt;Oh boy! I have a lot of things to blog about, mainly posts on &quot;Atlas [now ASP.NET AJAX Extensions] at last&quot; and &quot;MS Speech Application SDK&quot;. My reason for staying away from blogging was that I was buried in a project in Pakistan till December 2006, after I came back from the MVP Open Days in Turkey in September. Anyway, I have just shifted to USA, and will try to blog regularly from now on.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;As developers (and architects) come to terms with the changes that would come with &lt;a href=&quot;http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx&quot;&gt;LINQ&lt;/a&gt; and the &lt;a href=&quot;http://channel9.msdn.com/Showpost.aspx?postid=217633&quot;&gt;ADO.NET Entity Framework&lt;/a&gt;, and the impact it would have on business applications, many existing applications developed or ported to C# 2.0 or VB 8.0 from previous version would never be able to exploit its benefits. Architects and developers working on new software applications or application functionality, however, can make the wise choice of using the &lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/aa480534.aspx&quot;&gt;Web Service Software Factory&lt;/a&gt; to generate business entities, and expose them through web services. (more on that coming up in future posts, HOPEFULLY).&lt;br /&gt;&lt;br /&gt;Hardly any developer would want to be bogged down with writing business object classes to represent the entity tables in an enterprise application. The alterative for O/R Mapping, in most cases, is to turn to techniques for code generation, that allow generation of business object code for data access; NHibernate being one of the most popular ones.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.codeplex.com/actionpack&quot;&gt;SubSonic&lt;/a&gt; is yet another O/R Mapper or DAL code generator on the horizon, and does not involve using a separate application for code generation. All the developer needs to do to use SubSonic is add a reference to the actionpack.dll file and add some tags to the web.config file, and thats it. Even more amazing is the fact that SubSonic allows developers to swiftly generate web pages for inserting, updating, and deleting records in the table, kind of like the ones used in administration sections of most websites. Check out the &lt;a href=&quot;http://www.codeplex.com/actionpack&quot;&gt;SubSonic site&lt;/a&gt; to learn more.&lt;br /&gt;&lt;br /&gt;Without a doubt, code generation can give development teams a head-start, when it comes to rapidly generating business entities as soon as they have a database design in place. However, a fact that is often overlooked in enterprise applications, when there are literally hundreds of tables the code needs to be generated for, is that business entities seem to loose their original meaning, and instead exist only as code stubs for data access logic pertaining to the tables they were created for. The same thing happens if you use strongly typed datasets to represent business entities. &lt;br /&gt;&lt;br /&gt;A good data-access pattern within a good system architecture, would be to have a separate layer between the DAL (mainly stored procs and logic residing on the database), and the business logic layer (which includes business objects). This new layer would comprise the code generated using an O/R Mapper. While developers building a project from scratch, and trying to get it completed in the scheduled time, would very much want to overlook this important aspect, since it would need to done manually without any code generation. I will try to illustrate using an example. A typical &quot;Employee&quot; business entity generated using an O/R Mapper might have methods like &lt;code&gt;Insert()&lt;/code&gt; and &lt;code&gt;Update()&lt;/code&gt; for saving and updating a record in the Employee. For most development teams trying to meet the dealine, this is good enough. However, a great design would create the same &lt;code&gt;Employee&lt;/code&gt; class (in a different namespace) that would have methods like &lt;code&gt;Hire()&lt;/code&gt;, &lt;code&gt;Create()&lt;/code&gt;, &lt;code&gt;ChangeAddress()&lt;/code&gt;, &lt;code&gt;IncrementSalary()&lt;/code&gt; etc. calling the same &lt;code&gt;Insert()&lt;/code&gt; and &lt;code&gt;Update()&lt;/code&gt; methods under the covers. Not only does this make the code far more readable and self-explanatory, but also highly maintainable. The advantage of using this approach becomes even more profound when you are dealing with tables that do not necessarily represent real-life entities, and require methods like &lt;code&gt;Debit()&lt;/code&gt;, &lt;code&gt;Credit&lt;/code&gt;, &lt;code&gt;TakeBack()&lt;/code&gt;, &lt;code&gt;Adjust()&lt;/code&gt;, &lt;code&gt;Reconcile()&lt;/code&gt; etc.&lt;br /&gt;&lt;br /&gt;For now, I would recommend a &lt;a href=&quot;http://www.wekeroad.com/actionpackintro.html&quot;&gt;Webcast&lt;/a&gt; that should get you up and running with DAL generation at &lt;b&gt;SubSonic&lt;/b&gt; speeds.  &lt;img src=&quot;http://adnan.blob.core.windows.net/images/icon-database.png&quot; style=&quot;display: none&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/82402871406719535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=82402871406719535' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/82402871406719535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/82402871406719535'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2007/03/dal-goes-subsonic.html' title='DAL goes SubSonic'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-115760862237796442</id><published>2006-09-07T10:48:00.000+05:00</published><updated>2006-09-07T10:57:02.886+05:00</updated><title type='text'>I dream about Turkey!</title><content type='html'>That&#39;s the slogan of the Turkish tourism advertisement I saw on my flight from Istanbul to Antalya, on my way there for the Microsoft MVP Open Days event for MEA (Middleast and Africa) region this week, and let me tell you, &lt;b&gt;I dream about Turkey&lt;/b&gt; from now on too.&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;text-align:center&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/ViewFromHotel.gif&quot; border=&quot;0&quot; alt=&quot;View from my room at the Marmara Hotel, Antalya&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;text-align:center&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/MVPs.gif&quot; border=&quot;0&quot; alt=&quot;Better Together&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/115760862237796442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=115760862237796442' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115760862237796442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115760862237796442'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/09/i-dream-about-turkey.html' title='I dream about Turkey!'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-115580311311149049</id><published>2006-08-17T13:25:00.000+05:00</published><updated>2006-08-17T13:30:36.176+05:00</updated><title type='text'>Is this COOL or what?</title><content type='html'>&lt;p&gt;This is a test post to check Windows Live Writer. You can get more&amp;nbsp;information &lt;a href=&quot;http://windowslivewriter.spaces.live.com/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/115580311311149049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=115580311311149049' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115580311311149049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115580311311149049'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/08/is-this-cool-or-what.html' title='Is this COOL or what?'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-115501645395549200</id><published>2006-08-08T10:36:00.000+05:00</published><updated>2006-08-08T11:05:51.676+05:00</updated><title type='text'>Atlas at last! - Part III</title><content type='html'>Previously: &lt;br /&gt;&lt;a href=&quot;http://coredotnet.blogspot.com/2006/06/atlas-at-last-part-ii.html&quot;&gt;Atlas at last Part II: &lt;b&gt;Looking to the road ahead&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://coredotnet.blogspot.com/2006/03/atlas-at-last-part-i.html&quot;&gt;Atlas at last Part I: &lt;b&gt;Getting down and dirty with JavaScript&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Matt Gibbs has written an excellent &quot;Atlas at last&quot; article in the &lt;a href=&quot;http://msdn.microsoft.com/msdnmag/issues/06/07/default.aspx&quot;&gt;July 2006 issue&lt;/a&gt; of &lt;a href=&quot;http://msdn.microsoft.com/msdnmag/default.aspx&quot;&gt;MSDN Magazine&lt;/a&gt;. Check it out: &lt;a href=&quot;http://msdn.microsoft.com/msdnmag/issues/06/07/AtlasAtLast/default.aspx&quot;&gt;Atlas At Last: ASP.NET Atlas Powers the AJAX-Style Sites You’ve Been Waiting For&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So much can change between 2 posts is hard to imagine. For one, WinFX was renamed; now its called .NET 3.0 (combining WPF, WCF, WF, WCS). I touched upon the idea of WPF in the web browser in the &lt;a href=&quot;http://coredotnet.blogspot.com/2006/06/atlas-at-last-part-ii.html&quot;&gt;previous Atlas at last post&lt;/a&gt;. An article on MSDN titled &lt;a href=&quot;http://msdn.microsoft.com/winfx/default.aspx?pull=/library/en-us/dnlong/html/netfx30.asp&quot;&gt;&quot;Deploying Microsoft .NET Framework Version 3.0&quot;&lt;/a&gt; explains how to detect if .NET 3.0 is installed on a PC from within JavaScript/JScript code running inside a browser. Get ready; we would be seeing sites developed using .NET 3.0, with WPF on the presentation tier, very soon. The keyword to remember is &quot;Smart Client&quot;; browser-based applications lending a rich presentation to a SOA (Service-Oriented Architecture) strategy.&lt;br /&gt;&lt;br /&gt;There&#39;s more than one way to skin a cat, or so I heard, and that really depends on what you want to do after you&#39;ve done it. In the same way, you have a choice to develop with Microsoft &quot;Atlas&quot; using 2 different approaches, depending on the type of project you are building, the development time you have, and/or the amount of responsiveness and richness you want in your web app. The 2 approaches are: Server-Centric and Client-Centric Development. The diagram below provides a glimpse of what these 2 approaches encompass.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/AtlasProgrammingModel.gif&quot; align=&quot;center&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Very briefly, the Server-Centric approach primarily involves using Atlas Server Controls to achieve the desired result. This essentially means adding the &quot;UpdatePanel&quot; control, and enclosing all other server controls within it. Control Extenders, as the name implies, allow developes to add DHTML behaviors to existing server or client controls. Although the current online literature on Atlas does not classify the use of Control Extenders as a server-centric approach, it is easy to explain Control Extenders to developers in context of the server-centric approach, mainly because they encapsulate DHTML behaviors, shielding the user from the complexity of the JavaScript code, and are used pretty much like pre-developed ASP.NET server controls.&lt;br /&gt;&lt;br /&gt;The Client-Centric approach relies on client-side script (no surprises there) running inside the web browser to not only achieve most of the things possible with the server-centric approach, but to also create and add rich client-side interactivity within the webpage. Remember, these 2 approaches are not alternatives to each other. A single website, or even a single webpage, can have implementations of both approaches. The next 2 &quot;Atlas at last&quot; posts would look into more detail of both these approaches separately.&lt;br /&gt;&lt;br /&gt;It is incorrect to assume that only the client-centric approach involves scripting. There are no clear guidelines in existence that would mandate the use of one approach instead of the other. Many web/ASP.NET developers who are just getting started with Microsoft &quot;Atlas&quot; would want to go with the UpdatePanel control since it requires the least effort and development time. However, the UpdatePanel might not hold the answer to what you wanted to achieve in the first place. I received a couple of queries from people who wanted to know which approach they should follow for their projects, and my answer was always the same: it depends. Its better to choose the approach for each webpage accordingly instead of making a choice of the approach to follow at the beginning of the project and adhereing to it throughout. Let me elaborate through some scenarios.&lt;br /&gt;&lt;br /&gt;&lt;ul type=&quot;square&quot;&gt;&lt;br /&gt;  &lt;li&gt;The webpage comprises of static information.&lt;br/&gt;&lt;b&gt;Recommended approach:&lt;/b&gt; &lt;i&gt;None; Since the data contained in the page does not change, it is pointless to use Atlas in it.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;The webpage is used to present dynamic information stored on the server in a database/XML file, and loads inside a particular region of the page depending on the query string value.&lt;br/&gt;&lt;b&gt;Recommended approach:&lt;/b&gt; &lt;i&gt;Server-Centric; The UpdatePanel would only change a portion of the page after a response is received from the server, while static portions of the page like header images, logos, menus etc. would not reload.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;The webpage lists information from a database table, and the user should not have to navigate to a different webform page to enter new, or modify existing data from that table.&lt;br/&gt;&lt;b&gt;Recommended approach:&lt;/b&gt; &lt;i&gt;Control Extenders; The &#39;Modal Popup Control Extender&#39; provides an easy-to-implement mechanism to dislay a webform in a modal popup window, graying-out the rest of the portion of the screen outside the popup window, allowing the user to enter new, or change existing, information; When the modal popup closes, the portion of the page that lists the data from the table refreshes to show the updated information from the server (without a full postback).&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;The webpage consists of multiple dropdown lists (combo-boxes), and each one after the first dropdown list populates with values based on the value selected in a previous dropdown, like a City dropdown populating everytime for the Country seleted from another dropdown list.&lt;br/&gt;&lt;b&gt;Recommended approach:&lt;/b&gt; &lt;i&gt;Control Extenders; The &#39;Cascading DropDown Control Extender&#39; allows a  dropdown list to call and web service in response to a selection made into it and populate the next dropdown list in the sequence.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;You want to give the user the ability to either enter a new value into a textbox or else select from a list of values already stored in the database.&lt;br/&gt;&lt;b&gt;Recommended approach:&lt;/b&gt; &lt;i&gt;Both Client-Centric and Server-Centric approaches support the Auto-Complete behavior (Also see next point).&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;You want to give the user the ability to either enter a new value into a textbox or else select from a list of values already stored in the database, based on a selection or preference specified ealier.&lt;br/&gt;&lt;b&gt;Recommended approach:&lt;/b&gt; &lt;i&gt;Client-Centric; Only JavaScript would allow the Auto-complete list to be populated based on a condition, since XML-Script and the AutoComplete Control Extender only attach a web service (hard-code) to an autocomplete list, whereas JavaScript code provides the flexibility to select from a list of web services depending on a condition.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The above does not (and cannot possibly) cover all the scenarios that Microsoft &quot;Atlas&quot; is designed for. Stick around for more &quot;Atlas at last&quot; posts.</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/115501645395549200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=115501645395549200' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115501645395549200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115501645395549200'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/08/atlas-at-last-part-iii.html' title='Atlas at last! - Part III'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-115311430570664452</id><published>2006-07-17T10:23:00.000+05:00</published><updated>2006-07-17T10:34:42.526+05:00</updated><title type='text'>EID Presentation Upload</title><content type='html'>I apologize for not uploading the &quot;Building Next Generation GUIs using Microsoft Expression Interactive Designer&quot; presentation earlier. I just uploaded it to the &lt;a href=&quot;http://groups.yahoo.com/group/coredotnet&quot;&gt;Core.NET Yahoo Group&lt;/a&gt; in the &quot;Files &gt; PDC 2006 Slides and Demos &gt; EID&quot; Folder.&lt;br /&gt;&lt;br /&gt;For samples and application demos, check out these URLs.&lt;br /&gt;&lt;ul type=&quot;square&quot;&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href=&quot;http://blogs.msdn.com/expression&quot;&gt;Microsoft Expression Blog&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href=&quot;http://blogs.msdn.com/wpfsdk&quot;&gt;WPF SDK Blog&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href=&quot;http://blogs.msdn.com/tims&quot;&gt;Tim Sneath&#39;s Blog&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href=&quot;http://wpf.netfx3.com/files/default.aspx&quot;&gt;WPF Samples from the .NET 3.0 community website&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href=&quot;http://www.thewpfblog.com&quot;&gt;The WPF Blog&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/115311430570664452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=115311430570664452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115311430570664452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115311430570664452'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/07/eid-presentation-upload.html' title='EID Presentation Upload'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-115177726341118769</id><published>2006-07-01T23:00:00.000+05:00</published><updated>2006-07-01T23:27:46.703+05:00</updated><title type='text'>&quot;Atlas&quot; Presentation Slides and Demo Code</title><content type='html'>&lt;img style=&quot;text-align:center&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/pdc06.gif&quot; border=&quot;0&quot; alt=&quot;Pakistan Developer Conference 2006&quot; /&gt;&lt;br /&gt;&lt;br /&gt;I got an overwhelming response from both of my presentations during the 3-day &lt;a href=&quot;http://www.microsoft.com/pakistan/conference&quot;&gt;Pakistan Developer Conference 2006&lt;/a&gt;, or PDC 2006 as we like to call it. I have uploaded my presentation slides and demo code for all applications I demonstrated at &lt;a href=&quot;http://groups.yahoo.com/group/coredotnet&quot;&gt;Core.NET&#39;s Yahoo! Group account&lt;/a&gt;. Download away!&lt;br /&gt;&lt;br /&gt;The three files pertaining to the presentation uploaded in the &quot;Files &gt; PDC 2006 Slides and Demos &gt; AJAX &amp; Atlas&quot; folder are&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Atlas_AdnanHashmi.PDF&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;PDC06.Demos.NaukriAtlas.ZIP&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;PDC06.Session.Demos.ZIP&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;* The term &#39;Naukri&#39; in &lt;a href=&quot;http://en.wikipedia.org/wiki/Urdu&quot;&gt;Urdu&lt;/a&gt; means &#39;Job&#39;. NaukriAtlas.NET is an AJAX-enabled job portal.&lt;/i&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/115177726341118769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=115177726341118769' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115177726341118769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115177726341118769'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/07/atlas-presentation-slides-and-demo.html' title='&quot;Atlas&quot; Presentation Slides and Demo Code'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-115023418741544627</id><published>2006-06-14T02:13:00.000+05:00</published><updated>2006-06-14T02:45:27.606+05:00</updated><title type='text'>More on .NET 3.0</title><content type='html'>Good to see things getting clearer as Tech Ed 2006 approaches. These two articles provide a good understanding about what .NET 3.0 is all about.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.ftponline.com/channels/net/reports/tech-ed/2006/rlhotka/&quot;&gt;Realize New Functionality in .NET 3.0&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.ftponline.com/channels/net/reports/tech-ed/2006/bhollissmartclient/&quot;&gt;New Technology Offers Dev Challenges, UI Improvements&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;At a glance, &lt;a href=&quot;http://www.netfx3.com/&quot;&gt;.NET 3.0 [http://www.netfx3.com/]&lt;/a&gt; includes&lt;br /&gt;&lt;ul type=&quot;square&quot;&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;.NET Framework 2.0&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;ul type=&quot;square&quot;&gt;&lt;br /&gt;&lt;li&gt;The 2.0 Common Language Runtime (CLR)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The 2.0 Base Class Library&lt;/li&gt;&lt;br /&gt;&lt;li&gt;ADO.NET 2.0, ASP.NET 2.0, Windows Forms 2.0&lt;/li&gt;&lt;br /&gt;&lt;li&gt;VB 8.0 and C# 2.0&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;WinFX&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;ul type=&quot;square&quot;&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://wcf.netfx3.com/&quot;&gt;Windows Communication Foundation (WCF) [http://wcf.netfx3.com/]&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://wpf.netfx3.com/&quot;&gt;Windows Presentation Foundation (WPF) [http://wpf.netfx3.com/]&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://wf.netfx3.com/&quot;&gt;Windows Workflow Foundation (WF) [http://wf.netfx3.com/]&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;InfoCard&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;ul type=&quot;square&quot;&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://wcs.netfx3.com/&quot;&gt;Renamed to Windows CardSpace (WCS) [http://wcs.netfx3.com/]&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Interestingly, the &lt;a href=&quot;http://blogs.msdn.com/somasegar/archive/2006/06/09/624300.aspx&quot;&gt;announcement made about .NET 3.0&lt;/a&gt; on June 9 by &lt;a href=&quot;http://blogs.msdn.com/somasegar/&quot;&gt;Somasegar&lt;/a&gt; on his blog was exactly what I had forecasted and &lt;a href=&quot;http://www.pkblogs.com/coredotnet/2006/06/atlas-at-last-part-ii.html&quot;&gt;blogged about&lt;/a&gt; in my post just 3 days prior, and I had absolutely no idea at that time that it would come so soon.</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/115023418741544627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=115023418741544627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115023418741544627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/115023418741544627'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/06/more-on-net-30.html' title='More on .NET 3.0'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-114997266401778741</id><published>2006-06-11T01:48:00.000+05:00</published><updated>2006-06-11T01:51:04.226+05:00</updated><title type='text'>.NET: 2 Fast, 3 Furious</title><content type='html'>I am not sure how the &lt;a href=&quot;http://blogs.msdn.com/somasegar/archive/2006/06/09/624300.aspx&quot;&gt;decision to rename WinFX (which encompasses WPF, WCF, and WF) to .NET 3.0&lt;/a&gt; will go down with developers who are still in the process of trying to explore, and gradually coming to terms with the changes that new technologies like Atlas and WinFX brought to .NET 2.0. Developers, however, were content, knowing that WinFX was built on top of .NET 2.0 and will be supported for the next decade. This new change, in addition to creating a lot of confusion, will also raise a number of questions; Will existing investments in .NET 2.0 go down the drain soon? Should we wait for the new 3.0 platform to mature before we implement it? Is .NET 2.0 gone?&lt;br /&gt;&lt;br /&gt;Hopefully, Microsoft would move swiftly to allay a lot of fears in the coming days. My best guess is that .NET 2.0 (along with its underlying technologies) would be a subset of .NET 3.0 along with Orcas/C# 3.0, WinFX, and LINQ. For now, I am keeping my fingers crossed.</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/114997266401778741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=114997266401778741' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114997266401778741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114997266401778741'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/06/net-2-fast-3-furious.html' title='.NET: 2 Fast, 3 Furious'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-114953969853541771</id><published>2006-06-06T01:31:00.000+05:00</published><updated>2006-06-06T01:34:58.943+05:00</updated><title type='text'>Atlas at last! - Part II</title><content type='html'>Previously: &lt;br /&gt;&lt;a href=&quot;http://www.pkblogs.com/coredotnet/2006/03/atlas-at-last-part-i.html&quot;&gt;Atlas at last-Part I: &lt;b&gt;Getting down and dirty with JavaScript&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;The following text is my own take on the AJAX/Atlas future, and DOES NOT reflect any future Microsoft strategy.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Lets face it; web sites today, regardless of the technology they&#39;ve been built on, do not come even close to providing the utility envisaged and hyped about in the Dot Com era. Though the future outlook initially looked very promising for e-learning, e-business, and e-everything, the reality has been very different. And so, as it happens, once in a while a technology comes along that holds the promise of changing something that we have become so accustomed to that we don&#39;t realize needs fixing. Question is, does &lt;a href=&quot;&quot; target=&quot;_blank&quot;&gt;AJAX&lt;/a&gt; fall under that category? Certainly not. AJAX, as time will tell, is not an end, but a means to an end. AJAX (and all its implementation frameworks) will do nothing more then allow the idea of asynchronous call-backs to the server without mandating a page refresh to gain acceptance. This would enable a much richer class of web applications then ever before. The trade-off to this, however, is a much longer inital loading time for the page.&lt;br /&gt;&lt;br /&gt;Imagine having to tune your television to the channel you want to watch everytime you want to watch it. Isn&#39;t that what has been going on for so many years the internet has been in existence; the whole page refreshing just to display a message on a small portion of the webpage.&lt;br /&gt;&lt;br /&gt;Going with the analogy of television, imagine turning on your television and seeing a &quot;Loading...Please wait&quot; message on the screen. Isn&#39;t that what AJAX would put web surfers through when the page loads for the first time? If you happen to have a slow internet connection as I do, it would take a couple of &quot;manual&quot; page refreshes just to see the whole UI on the screen, hopefully without a JavaScript error appearing in the web browser&#39;s status bar. Thankfully, such considerations will not slow the buzz that has been generated in web developer circles since the advent of the AJAX approach.&lt;br /&gt;&lt;br /&gt;Getting back to the point I made about asynchronous call-backs and initial loading time above, developers and users/surfers alike would attune to the idea of longer initial loading times just so they get fast responses and a richer experience once the UI has loaded; communicating with web services asynchronously without whole round-trips to the server and complete page refreshes.&lt;br /&gt;&lt;br /&gt;For the time being, that looks like the change we will be seeing in websites. However, if you think that the story ends there, think again. For the Web 2.0 idea to become a reality, and not fade into oblivion after a while, the web has to be a platform. That would put more pressure on the web browsers, since no one would want to see one website work on IE and FireFox but break down in Opera. &lt;a href=&quot;http://searchvb.techtarget.com/infoCenter/originalContent/0,294292,sid8_gci1186182_iid2657,00.html&quot;&gt;These unresolved issues&lt;/a&gt; are still in abundance as companies move to invest in web applications that would make use of the AJAX approach.&lt;br /&gt;&lt;br /&gt;How do we move forward then? What does the future hold for AJAX and Atlas? Well, to answer these questions, architects and developers would need to focus on the Smart Client paradigm. The biggest benefit Smart Clients have is that they only need to be installed once on the client PC after being downloaded from the Internet (Click Once deployment). This would allow the application to be used without visiting any website again and wait for the UI to load. The reason the Smart Client model was sidelined (by AJAX) was because it killed the web browsing experience; it did not function inside the web browser, but instead appeared as a stand-alone application. To cut a long story short, for the next generation of web applications, 3 things are of utmost importance:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Responsiveness (brought about using communication with web services)&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Rich User Experience and UI&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Least or No download time&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Uptill now, only the first of the 3 above has been addresed by the AJAX approach. The only way I see 2 and 3 (along with 1) becoming a reality is with XAML and Windows Presentation Foundation (WPF). XAML or eXtensible Application Markup Language in its current form still has a long way to go, but it does hold a promise, simply because it has the capacity to encompass a lot of UI logic declaratively (using tags) without any scripting language. Hence, the next generation web applications UI&#39;s would be developed in tools such as Microsoft Expression Interactive Designer, and exist as WPF Express applications. The third point of least or no download time can be made possible by caching the XAML UI after it has loaded into the web-browser so that it does not need to download the next time the user visits the site. Webpages are kept in the browser&#39;s cache even now, but that serves no purpose in making the next visit to that page more responsive. Some might argue the need for keeping large amount of UI data in the web-browser&#39;s cache even if the surfer may be visiting the site for the first and last time; to which my answer would be: You keep the phone number of the people you call frequently stored in your cellphone so that you dont have to memorize them, or even dial them everytime. However, even if you make a call to someone for the first (and possibly last) time, even then, that number remains in your cellphone&#39;s memory for some time. So, web-browsers may prompt the users if they want to keep the UI cached so they dont have to download it again in the next visit. Ideally (and for good reason), web surfers would keep the websites they visit frequently cached in their browsers. What a surfing experience that would be?!&lt;br /&gt;&lt;br /&gt;For now, the idea of declarative programming will gain wider acceptance in the web developer community as they use tags in Atlas to bind UI elements to data or extend existing web controls with control extenders. If nothing else, one thing is certain; JavaScript is back from her death-bed (if not her grave), and has become something for companies to explore and take seriously for the next couple of years.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;See you at the &lt;a href=&quot;http://www.microsoft.com/pakistan/conference&quot;&gt;Pakistan Developers Conference 2006&lt;/a&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/114953969853541771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=114953969853541771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114953969853541771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114953969853541771'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/06/atlas-at-last-part-ii.html' title='Atlas at last! - Part II'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-114875492641926578</id><published>2006-05-27T23:32:00.000+05:00</published><updated>2006-05-27T23:35:33.403+05:00</updated><title type='text'>Pakistan Developers Conference (PDC) 2006</title><content type='html'>&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/pdc2006.gif&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Awright! Its that time of the year again which developers in Pakistan look forward to; the annual &lt;a href=&quot;www.microsoft.com/pakistan/conference&quot;&gt;Microsoft Pakistan Developers Conference 2006&lt;/a&gt; (June 28 ~ June 30). This year, the conference would be bigger and better then previous years, since it would take place in Karachi and Lahore simultaneously. The event in Karachi would be 3 day long, whereas in Lahore, it would only be a single day event. Check out the agendas for both cities &lt;a href=&quot;http://www.microsoft.com/middleeast/pakistan/conference/agenda.aspx&quot;&gt;here&lt;/a&gt;. I will be speaking in 2 sessions this time around; &lt;b&gt;&quot;Developing Rich Internet Applications using AJAX and Atlas&quot;&lt;/b&gt; and &lt;b&gt;&quot;Building Next Generation GUI&#39;s using Microsoft Expression Interactive Designer&quot;&lt;/b&gt;. I will be posting more about my demos in the coming weeks. &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.fillforms.com/middleeast/pakistan/conference/registration.aspx&quot;&gt;Register online&lt;/a&gt; NOW! I hope to see you there.</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/114875492641926578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=114875492641926578' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114875492641926578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114875492641926578'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/05/pakistan-developers-conference-pdc.html' title='Pakistan Developers Conference (PDC) 2006'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-114750249940055512</id><published>2006-05-13T11:33:00.002+05:00</published><updated>2011-03-27T11:58:57.431+05:00</updated><title type='text'>WPF Data Binding Tutorial</title><content type='html'>&lt;table cellpadding=&quot;10&quot; cellspacing=&quot;0&quot; style=&quot;border: 1px #b5b5b5 solid; border-style: solid; background: #edf0f1&quot;&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://www.inetapakistan.org&quot;&gt;&lt;img src=&quot;http://inetapakistan.org/pics/inetaPakistan.png&quot; border=&quot;0&quot; alt=&quot;INETA Pakistan&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;        &lt;td style=&quot;font-family: Verdana; text-align: center&quot;&gt;&lt;br /&gt;         &lt;div style=&quot;font-size: 9pt; color: gray; font-weight: bold&quot;&gt;WPF Databinding Tutorial&lt;/div&gt;&lt;br /&gt;         &lt;div style=&quot;font-size: 8pt&quot;&gt;Watch the screencast for this tutorial/post &lt;a target=&quot;_blank&quot; href=&quot;http://www.inetapakistan.org/post/2011/03/26/WPF-Data-Binding-Tutorial.aspx&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;br /&gt;        &lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;As promised, I am posting the code and explanation of the WPF Data Binding example I showed at the &quot;Introduction to Windows Presentation Foundation&quot; &lt;a href=&quot;http://groups.yahoo.com/group/neddotnet&quot;&gt;NED.NET&lt;/a&gt; user group event this Saturday.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;A developer typically creates a class to represent an entity (table) in the database, whereby CRUD operations are performed by calling methods on the objects, e.g; for class &lt;code&gt;Employee&lt;/code&gt;, &lt;code&gt;objEmployee.Save()&lt;/code&gt;, &lt;code&gt;objEmployee.Load()&lt;/code&gt;,  &lt;code&gt;objEmployee.Update()&lt;/code&gt;, &lt;code&gt;objEmployee.Delete()&lt;/code&gt; etc. Also, everytime the values in the object change, the developer has to manually write code to update each of the UI elements that display the values stored in the object&#39;s members. The same holds true when the values on the UI change. With WPF, you can lessen your code greatly by binding the object directly with the UI (each of object&#39;s members data-bound to individual UI elements) using XAML syntax. I will be covering 3 different approaches for displaying data in the object onto the UI.&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Typical&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Using only C# [&lt;code&gt;INotifyPropertyChanged&lt;/code&gt;]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Using C# and XAML [&lt;code&gt;INotifyPropertyChanged&lt;/code&gt; and XAML]&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;I am going to use the same &quot;Examinee&quot; table I used at several demos earlier this year for the HEC (Higher Education Commission) Web Service example. The columns for the table are&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;RollNo (PK, nvarchar(5), not null)&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;FirstName (nvarchar(10), not null)&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;LastName (nvarchar(10), not null)&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;University (nvarchar(50), not null)&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;MarksObtained (int, not null)&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Exam (nvarchar(15), not null)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Typical Approach&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;The following provides a glimpse of what goes on in code with the typical approach. The developer creates the &lt;code&gt;Examinee&lt;/code&gt; class for the table as follows: [For clarity, code has been colored and lines numbered. Also, ignore the SqlDataReader use for fetching a single row; it was done to lessen code ;)]&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-size: 7.5pt&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: green&quot;&gt;     // =========================&lt;br /&gt;     //   Code Listing 1&lt;br /&gt;     // =========================&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  1:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  2:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  3:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  4:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Data;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  5:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Data.SqlClient;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  6:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  7:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;namespace&lt;/span&gt; Demos.WPF.Binding.PropertyChangeNotNotified&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  8:&lt;/span&gt; {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  9:&lt;/span&gt;     &lt;span style=&quot;color: blue&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;Examinee&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 10:&lt;/span&gt;     {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 11:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; _RollNo;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 12:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; RollNo&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 13:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 14:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _RollNo; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 15:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt; { _RollNo = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 16:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 17:&lt;/span&gt;         &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 18:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; _FirstName;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 19:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; FirstName&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 20:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 21:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _FirstName; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 22:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt; { _FirstName = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 23:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 24:&lt;/span&gt;         &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 25:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; _LastName;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 26:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; LastName&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 27:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 28:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _LastName; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 29:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt; { _LastName = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 30:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 31:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 32:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; _University;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 33:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; University&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 34:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 35:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _University; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 36:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt; { _University = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 37:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 38:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 39:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;int&lt;/span&gt; _MarksObtained;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 40:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;int&lt;/span&gt; MarksObtained&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 41:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 42:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _MarksObtained; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 43:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt; { _MarksObtained = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 44:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 45:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 46:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; _Exam;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 47:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; Exam&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 48:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 49:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _Exam; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 50:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt; { _Exam = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 51:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 52:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 53:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; Examinee()&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 54:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 55:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 56:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 57:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;void&lt;/span&gt; Load()&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 58:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 59:&lt;/span&gt;             if (_RollNo.Trim().Length == 0)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 60:&lt;/span&gt;                &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: teal&quot;&gt;Exception&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;Roll Number not specified.&quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 61:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 62:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;SqlConnection&lt;/span&gt; oConnection = &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlConnection&lt;/span&gt;(&lt;span title=&quot;Connection String&quot; style=&quot;color: gainsboro&quot;&gt;[...]&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 63:&lt;/span&gt;             oConnection.Open();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 64:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 65:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; str = &quot;&quot;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 66:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;SELECT * &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 67:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;FROM Examinee &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 68:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;WHERE RollNo = @RollNo&quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 69:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;SqlCommand&lt;/span&gt; oCommand = &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlCommand&lt;/span&gt;(str, oConnection);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 70:&lt;/span&gt;             oCommand.CommandType = &lt;span style=&quot;color: teal&quot;&gt;CommandType&lt;/span&gt;.Text;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 71:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@RollNo&quot;&lt;/span&gt;, _RollNo));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 72:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;SqlDataReader&lt;/span&gt; oDR = oCommand.ExecuteReader();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 73:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 74:&lt;/span&gt;             if (oDR.Read())&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 75:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 76:&lt;/span&gt;                 _FirstName = oDR[&lt;span style=&quot;color: maroon&quot;&gt;&quot;FirstName&quot;&lt;/span&gt;].ToString();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 77:&lt;/span&gt;                 _LastName = oDR[&lt;span style=&quot;color: maroon&quot;&gt;&quot;LastName&quot;&lt;/span&gt;].ToString();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 78:&lt;/span&gt;                 _University = oDR[&lt;span style=&quot;color: maroon&quot;&gt;&quot;University&quot;&lt;/span&gt;].ToString();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 79:&lt;/span&gt;                 _MarksObtained = &lt;span style=&quot;color: teal&quot;&gt;Convert&lt;/span&gt;.ToInt32(oDR[&lt;span style=&quot;color: maroon&quot;&gt;&quot;MarksObtained&quot;&lt;/span&gt;]);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 80:&lt;/span&gt;                 _Exam = oDR[&lt;span style=&quot;color: maroon&quot;&gt;&quot;Exam&quot;&lt;/span&gt;].ToString();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 81:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 82:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 83:&lt;/span&gt;             oCommand.Dispose();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 84:&lt;/span&gt;             oConnection.Close();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 85:&lt;/span&gt;             oConnection.Dispose();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 86:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 87:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 88:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;void&lt;/span&gt; Update()&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 89:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 90:&lt;/span&gt;             if (_RollNo.Trim().Length == 0)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 91:&lt;/span&gt;                &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: teal&quot;&gt;Exception&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;Roll Number not specified.&quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 92:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 93:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;SqlConnection&lt;/span&gt; oConnection = &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlConnection&lt;/span&gt;(&lt;span title=&quot;Connection String&quot; style=&quot;color: gainsboro&quot;&gt;&quot;[...]&quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 94:&lt;/span&gt;             oConnection.Open();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 95:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 96:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; str = &quot;&quot;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 97:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;UPDATE Examinee &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 98:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;SET FirstName = @FirstName, &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 99:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;LastName = @LastName, &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;100:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;University = @University, &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;101:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;MarksObtained = @Marks &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;102:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;SqlCommand&lt;/span&gt; oCommand = &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlCommand&lt;/span&gt;(str, oConnection);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;103:&lt;/span&gt;             oCommand.CommandType = &lt;span style=&quot;color: teal&quot;&gt;CommandType&lt;/span&gt;.Text;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;104:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@FirstName&quot;&lt;/span&gt;, _FirstName));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;105:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@LastName&quot;&lt;/span&gt;, _LastName));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;106:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@University&quot;&lt;/span&gt;, _University));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;107:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@Marks&quot;&lt;/span&gt;, _MarksObtained));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;108:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@RollNo&quot;&lt;/span&gt;, _RollNo));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;109:&lt;/span&gt;             oCommand.ExecuteNonQuery();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;110:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;111:&lt;/span&gt;             oCommand.Dispose();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;112:&lt;/span&gt;             oConnection.Close();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;113:&lt;/span&gt;             oConnection.Dispose();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;114:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;115:&lt;/span&gt;     }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;116:&lt;/span&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#808080&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;I figured that since it is XAML that we are demonstrating, might as well develop the UI in Microsoft Cider, the Visual Studio 2005 add-in visual designer for XAML. So, to use the above class, the UI would be something like this.&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/WPF_DataBinding_UI.gif&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;&lt;br /&gt;The resulting XAML for the window shown above is&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-size: 7.5pt&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: green&quot;&gt;&lt;br /&gt; &amp;lt;!-- &lt;br /&gt; =========================&lt;br /&gt;    Code Listing 2&lt;br /&gt;    Simple.xaml&lt;br /&gt; =========================&lt;br /&gt; --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Window&lt;/span&gt; &lt;br /&gt; &lt;span style=&quot;color: red&quot;&gt;x:Class&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Demos.WPF.Binding.Simple&lt;/span&gt;&quot;&lt;br /&gt; &lt;span style=&quot;color: red&quot;&gt;xmlns&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation&lt;/span&gt;&quot;&lt;br /&gt; &lt;span style=&quot;color: red&quot;&gt;xmlns:x&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;http://schemas.microsoft.com/winfx/2006/xaml&lt;/span&gt;&quot;&lt;br /&gt; &lt;span style=&quot;color: red&quot;&gt;Title&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Demos.WPF.Binding&lt;/span&gt;&quot; &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;209&lt;/span&gt;&quot; &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;371&lt;/span&gt;&quot;&lt;br /&gt; &lt;span style=&quot;color: red&quot;&gt;Background&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;WhiteSmoke&lt;/span&gt;&quot; &lt;span style=&quot;color: red&quot;&gt;WindowStartupLocation&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;CenterScreen&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Grid&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Top&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Left&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;21.37,23,0,0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;76.63&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;23.2766666666667&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;label1&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Roll Number:&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Top&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Left&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;20.37,42.7233333333333,0,0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;76.63&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;23.2766666666667&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;label2&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;First Name:&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Top&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Left&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;20.37,66,0,0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;75.63&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;23.2766666666667&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;label3&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Last Name:&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Top&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Left&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;21.37,89,0,0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;62.63&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;23.2766666666667&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;label4&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;University:&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Top&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Left&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;21.37,112.723333333333,0,0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;62.63&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;23.276666666666671&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;label5&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Marks:&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Top&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Stretch&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;134,23,56,0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;NaN&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;20&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;txtRollNo&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;BorderBrush&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;#FF000000&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Foreground&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;#FF336699&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Top&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Stretch&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;134,46,56,0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;NaN&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;20&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;txtFirstName&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Foreground&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;#FF336699&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;BorderBrush&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;#FF000000&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Top&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Stretch&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;134,69.2766666666667,56,0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;NaN&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;20&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;txtLastName&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Foreground&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;#FF336699&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;BorderBrush&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;#FF000000&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Top&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Stretch&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;134,92.2766666666667,56,0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;NaN&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;20&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;txtUniversity&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Foreground&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;#FF336699&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;BorderBrush&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;#FF000000&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Top&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Stretch&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;134,114,56,0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;NaN&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;20&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;txtMarks&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Foreground&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;#FF336699&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;BorderBrush&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;#FF000000&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Bottom&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Left&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;134,0,0,11&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;51&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;23&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;btnLoad&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Click&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;btnLoad_Click&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Load&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Bottom&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Right&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0,0,128.5625,11&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;48.4375&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;23&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;btnUpdate&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Click&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;btnUpdate_Click&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Update&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Bottom&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Right&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0,0,56,11&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;55&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;23&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;btnCheck&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Click&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;btnCheck_Click&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Check&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;VerticalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Top&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;HorizontalAlignment&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Right&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Column&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.ColumnSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.Row&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Grid.RowSpan&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;1&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Margin&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;0,115,12,0&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;39&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;19&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;btnAddTen&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Click&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;btnAddTen_Click&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;+10&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Grid&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Window&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#808080&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;The app lets the user enter the Roll Number for a student, and dislays the Examinee&#39;s stats when the &quot;Load&quot; button is clicked. The user can then make any changes in values if required (except for the Roll Number), and click &quot;Update&quot; to make the changes in the database. Nothing fancy here. The code-behind file is pretty straight-forward as well. I have placed a &quot;Check&quot; button on the form to let the user view and compare the values in both, the &lt;code&gt;Examinee&lt;/code&gt; object and on the UI.&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-size: 7.5pt&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: green&quot;&gt;     // =========================&lt;br /&gt;     //   Code Listing 3&lt;br /&gt;     //   Simple.xaml.cs&lt;br /&gt;     // =========================&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  1:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  2:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  3:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Controls;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  4:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Data;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  5:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Documents;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  6:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Media;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  7:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Media.Imaging;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  8:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Shapes;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  9:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; Demos.WPF.Binding.PropertyChangeNotNotified;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 10:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 11:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;namespace&lt;/span&gt; Demos.WPF.Binding&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 12:&lt;/span&gt; {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 13:&lt;/span&gt;     &lt;span style=&quot;color: blue&quot;&gt;public partial class&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;Simple&lt;/span&gt; : &lt;span style=&quot;color: teal&quot;&gt;Window&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 14:&lt;/span&gt;     {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 15:&lt;/span&gt;         &lt;span style=&quot;color: teal&quot;&gt;Examinee&lt;/span&gt; oExaminee = &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;Examinee&lt;/span&gt;();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 16:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 17:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public &lt;/span&gt; Simple()&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 18:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 19:&lt;/span&gt;             InitializeComponent();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 20:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 21:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 22:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnLoad_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 23:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 24:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;try&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 25:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 26:&lt;/span&gt;                 oExaminee.RollNo = txtRollNo.Text;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 27:&lt;/span&gt;                 oExaminee.Load();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 28:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 29:&lt;/span&gt;                 &lt;span style=&quot;color: green&quot;&gt;// tedious code to update UI with object&#39;s properties&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 30:&lt;/span&gt;                 txtFirstName.Text = oExaminee.FirstName;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 31:&lt;/span&gt;                 txtLastName.Text = oExaminee.LastName;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 32:&lt;/span&gt;                 txtUniversity.Text = oExaminee.University;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 33:&lt;/span&gt;                 txtMarks.Text = oExaminee.MarksObtained.ToString();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 34:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 35:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: teal&quot;&gt;Exception&lt;/span&gt; oEx)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 36:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 37:&lt;/span&gt;                 &lt;span style=&quot;color: teal&quot;&gt;MessageBox&lt;/span&gt;.Show(oEx.Message);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 38:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 39:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 40:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 41:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnUpdate_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 42:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 43:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;try&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 44:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 45:&lt;/span&gt;                 &lt;span style=&quot;color: green&quot;&gt;// tedious code to set object&#39;s properties from UI elements&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 46:&lt;/span&gt;                 oExaminee.FirstName = txtFirstName.Text;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 47:&lt;/span&gt;                 oExaminee.LastName = txtLastName.Text;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 48:&lt;/span&gt;                 oExaminee.University = txtUniversity.Text;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 49:&lt;/span&gt;                 oExaminee.MarksObtained = &lt;span style=&quot;color: teal&quot;&gt;Convert&lt;/span&gt;.ToInt32(txtMarks.Text);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 50:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 51:&lt;/span&gt;                 oExaminee.Update();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 52:&lt;/span&gt;                 MessageBox.Show(&lt;span style=&quot;color: maroon&quot;&gt;&quot;Information Updated.&quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon&quot;&gt;&quot;Update&quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 53:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 54:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: teal&quot;&gt;Exception&lt;/span&gt; oEx)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 55:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 56:&lt;/span&gt;                 &lt;span style=&quot;color: teal&quot;&gt;MessageBox&lt;/span&gt;.Show(oEx.Message);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 57:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 58:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 59:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 60:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnCheck_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 61:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 62:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; str = &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt;.Format(&lt;span style=&quot;color: maroon&quot;&gt;&quot;OBJECT:\nFirstName: {0}&quot;&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 63:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nLastName: {1}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 64:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nUniversity: {2}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 65:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nMarksObtained: {3}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 66:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\n\nUI:&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 67:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nFirst Name: {4}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 68:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nLast Name: {5}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 69:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nUniversity: {6}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 70:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nMarksObtained: {7}&quot;&lt;/span&gt;, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 71:&lt;/span&gt;                 oExaminee.FirstName, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 72:&lt;/span&gt;                 oExaminee.LastName, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 73:&lt;/span&gt;                 oExaminee.University, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 74:&lt;/span&gt;                 oExaminee.MarksObtained.ToString(), &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 75:&lt;/span&gt;                 txtFirstName.Text, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 76:&lt;/span&gt;                 txtLastName.Text, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 77:&lt;/span&gt;                 txtUniversity.Text, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 78:&lt;/span&gt;                 txtMarks.Text);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 79:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;MessageBox&lt;/span&gt;.Show(str);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 80:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 81:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 82:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnAddTen_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 83:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 84:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;if&lt;/span&gt; ((oExaminee.MarksObtained + 10) &gt; 100)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 85:&lt;/span&gt;                 oExaminee.MarksObtained = 100;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 86:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;else&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 87:&lt;/span&gt;                 oExaminee.MarksObtained += 10;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 88:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 89:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 90:&lt;/span&gt;     }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 91:&lt;/span&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#808080&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;Notice that in the event handlers for both, the &quot;Load&quot; (lines 29 to 33) and &quot;Update&quot; (lines 45 to 49) buttons, the values need to be shuttled between the object and the UI elements to keep them synchronized. If the form had, lets say, 30+ UI elements, the developer would have to write atleast 60 additional lines of code to achieve this synchronization. Ironically, this is what usually happens.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Using only C# [&lt;code&gt;INotifyPropertyChanged&lt;/code&gt;]&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;The typical approach is pretty cumbersome. The same result can be achieved by implementing the INotifyPropertyChanged interface in the &lt;code&gt;Examinee&lt;/code&gt; class to generate an event everytime the value in the object&#39;s property changes. I have highlighted portions in code listing 4 that need to be added to implement INotifyPropertyChanged.&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-size: 7.5pt&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: green&quot;&gt;     // =========================&lt;br /&gt;     //   Code Listing 4&lt;br /&gt;     // =========================&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  1:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  2:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  3:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  4:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Data;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  5:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Data.SqlClient;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  6:&lt;/span&gt; &lt;span style=&quot;background-color: #D4D5D8; border: 1px solid #0A246A&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.ComponentModel;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  7:&lt;/span&gt;  &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  8:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;namespace&lt;/span&gt; Demos.WPF.Binding.PropertyChangeNotified&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  9:&lt;/span&gt; {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 10:&lt;/span&gt;     &lt;span style=&quot;color: blue&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;Examinee&lt;/span&gt; &lt;span style=&quot;background-color: #D4D5D8; border: 1px solid #0A246A&quot;&gt;: &lt;span style=&quot;color: teal&quot;&gt;INotifyPropertyChanged&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 11:&lt;/span&gt;     {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 12:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; _RollNo;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 13:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; RollNo&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 14:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 15:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _RollNo; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 16:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 17:&lt;/span&gt;             { &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 18:&lt;/span&gt;                _RollNo = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 19:&lt;/span&gt;                &lt;span style=&quot;color: green&quot;&gt;// Notify Property Change&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 20:&lt;/span&gt;                &lt;span style=&quot;background-color: #D4D5D8; border: 1px solid #0A246A&quot;&gt;OnPropertyChanged(&lt;span style=&quot;color: maroon&quot;&gt;&quot;RollNo&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 21:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 22:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 23:&lt;/span&gt;        &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 24:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; _FirstName;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 25:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; FirstName&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 26:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 27:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _FirstName; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 28:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 29:&lt;/span&gt;             { &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 30:&lt;/span&gt;                _FirstName = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 31:&lt;/span&gt;                &lt;span style=&quot;color: green&quot;&gt;// Notify Property Change&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 32:&lt;/span&gt;                &lt;span style=&quot;background-color: #D4D5D8; border: 1px solid #0A246A&quot;&gt;OnPropertyChanged(&lt;span style=&quot;color: maroon&quot;&gt;&quot;FirstName&quot;&lt;/span&gt;);&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 33:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 34:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 35:&lt;/span&gt;         &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 36:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; _LastName;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 37:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; LastName&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 38:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 39:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _LastName; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 40:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 41:&lt;/span&gt;             { &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 42:&lt;/span&gt;                _LastName = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 43:&lt;/span&gt;                &lt;span style=&quot;color: green&quot;&gt;// Notify Property Change&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 44:&lt;/span&gt;                &lt;span style=&quot;background-color: #D4D5D8; border: 1px solid #0A246A&quot;&gt;OnPropertyChanged(&lt;span style=&quot;color: maroon&quot;&gt;&quot;LastName&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 45:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 46:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 47:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 48:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; _University;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 49:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; University&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 50:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 51:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _University; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 52:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 53:&lt;/span&gt;             { &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 54:&lt;/span&gt;                _University = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 55:&lt;/span&gt;                &lt;span style=&quot;color: green&quot;&gt;// Notify Property Change&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 56:&lt;/span&gt;                &lt;span style=&quot;background-color: #D4D5D8; border: 1px solid #0A246A&quot;&gt;OnPropertyChanged(&lt;span style=&quot;color: maroon&quot;&gt;&quot;University&quot;&lt;/span&gt;);&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 57:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 58:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 59:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 60:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;int&lt;/span&gt; _MarksObtained;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 61:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;int&lt;/span&gt; MarksObtained&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 62:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 63:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _MarksObtained; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 64:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 65:&lt;/span&gt;             { &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 66:&lt;/span&gt;                _MarksObtained = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 67:&lt;/span&gt;                &lt;span style=&quot;color: green&quot;&gt;// Notify Property Change&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 68:&lt;/span&gt;                &lt;span style=&quot;background-color: #D4D5D8; border: 1px solid #0A246A&quot;&gt;OnPropertyChanged(&lt;span style=&quot;color: maroon&quot;&gt;&quot;MarksObtained&quot;&lt;/span&gt;);&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 69:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 70:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 71:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 72:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; _Exam;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 73:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; Exam&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 74:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 75:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue&quot;&gt;return&lt;/span&gt; _Exam; }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 76:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;set&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 77:&lt;/span&gt;             { &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 78:&lt;/span&gt;                _Exam = &lt;span style=&quot;color: blue&quot;&gt;value&lt;/span&gt;; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 79:&lt;/span&gt;                &lt;span style=&quot;color: green&quot;&gt;// Notify Property Change&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 80:&lt;/span&gt;                &lt;span style=&quot;background-color: #D4D5D8; border: 1px solid #0A246A&quot;&gt;OnPropertyChanged(&lt;span style=&quot;color: maroon&quot;&gt;&quot;Exam&quot;&lt;/span&gt;);&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 81:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 82:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 83:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 84:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; Examinee()&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 85:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 86:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 87:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 88:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;void&lt;/span&gt; Load()&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 89:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 90:&lt;/span&gt;             if (_RollNo.Trim().Length == 0)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 91:&lt;/span&gt;                &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: teal&quot;&gt;Exception&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;Roll Number not specified.&quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 92:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 93:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;SqlConnection&lt;/span&gt; oConnection = &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlConnection&lt;/span&gt;(&lt;span title=&quot;Connection String&quot; style=&quot;color: gainsboro&quot;&gt;[...]&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 94:&lt;/span&gt;             oConnection.Open();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 95:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 96:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; str = &quot;&quot;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 97:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;SELECT * &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 98:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;FROM Examinee &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 99:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;WHERE RollNo = @RollNo&quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;100:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;SqlCommand&lt;/span&gt; oCommand = &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlCommand&lt;/span&gt;(str, oConnection);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;101:&lt;/span&gt;             oCommand.CommandType = &lt;span style=&quot;color: teal&quot;&gt;CommandType&lt;/span&gt;.Text;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;102:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@RollNo&quot;&lt;/span&gt;, _RollNo));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;103:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;SqlDataReader&lt;/span&gt; oDR = oCommand.ExecuteReader();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;104:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;105:&lt;/span&gt;             if (oDR.Read())&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;106:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;107:&lt;/span&gt;                 _FirstName = oDR[&lt;span style=&quot;color: maroon&quot;&gt;&quot;FirstName&quot;&lt;/span&gt;].ToString();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;108:&lt;/span&gt;                 _LastName = oDR[&lt;span style=&quot;color: maroon&quot;&gt;&quot;LastName&quot;&lt;/span&gt;].ToString();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;109:&lt;/span&gt;                 _University = oDR[&lt;span style=&quot;color: maroon&quot;&gt;&quot;University&quot;&lt;/span&gt;].ToString();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;110:&lt;/span&gt;                 _MarksObtained = &lt;span style=&quot;color: teal&quot;&gt;Convert&lt;/span&gt;.ToInt32(oDR[&lt;span style=&quot;color: maroon&quot;&gt;&quot;MarksObtained&quot;&lt;/span&gt;]);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;111:&lt;/span&gt;                 _Exam = oDR[&lt;span style=&quot;color: maroon&quot;&gt;&quot;Exam&quot;&lt;/span&gt;].ToString();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;112:&lt;/span&gt;                 &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;113:&lt;/span&gt;                 &lt;span style=&quot;color: green&quot;&gt;// following code raises onPropertyChanged event because &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;114:&lt;/span&gt;                 // properties are being set from within the class itself.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;115:&lt;/span&gt;                 &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-top:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;OnPropertyChanged(&lt;span style=&quot;color: maroon&quot;&gt;&quot;FirstName&quot;&lt;/span&gt;);    &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;116:&lt;/span&gt;                 &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;OnPropertyChanged(&lt;span style=&quot;color: maroon&quot;&gt;&quot;LastName&quot;&lt;/span&gt;);     &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;117:&lt;/span&gt;                 &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;OnPropertyChanged(&lt;span style=&quot;color: maroon&quot;&gt;&quot;University&quot;&lt;/span&gt;);   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;118:&lt;/span&gt;                 &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;OnPropertyChanged(&lt;span style=&quot;color: maroon&quot;&gt;&quot;MarksObtained&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;119:&lt;/span&gt;                 &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-bottom:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;OnPropertyChanged(&lt;span style=&quot;color: maroon&quot;&gt;&quot;Exam&quot;&lt;/span&gt;);         &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;120:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;121:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;122:&lt;/span&gt;             oCommand.Dispose();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;123:&lt;/span&gt;             oConnection.Close();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;124:&lt;/span&gt;             oConnection.Dispose();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;125:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;126:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;127:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;void&lt;/span&gt; Update()&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;128:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;129:&lt;/span&gt;             if (_RollNo.Trim().Length == 0)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;130:&lt;/span&gt;                &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: teal&quot;&gt;Exception&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;Roll Number not specified.&quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;131:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;132:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;SqlConnection&lt;/span&gt; oConnection = &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlConnection&lt;/span&gt;(&lt;span title=&quot;Connection String&quot; style=&quot;color: gainsboro&quot;&gt;&quot;[...]&quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;133:&lt;/span&gt;             oConnection.Open();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;134:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;135:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; str = &quot;&quot;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;136:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;UPDATE Examinee &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;137:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;SET FirstName = @FirstName, &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;138:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;LastName = @LastName, &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;139:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;University = @University, &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;140:&lt;/span&gt;             str += &lt;span style=&quot;color: maroon&quot;&gt;&quot;MarksObtained = @Marks &quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;141:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;SqlCommand&lt;/span&gt; oCommand = &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlCommand&lt;/span&gt;(str, oConnection);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;142:&lt;/span&gt;             oCommand.CommandType = &lt;span style=&quot;color: teal&quot;&gt;CommandType&lt;/span&gt;.Text;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;143:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@FirstName&quot;&lt;/span&gt;, _FirstName));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;144:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@LastName&quot;&lt;/span&gt;, _LastName));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;145:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@University&quot;&lt;/span&gt;, _University));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;146:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@Marks&quot;&lt;/span&gt;, _MarksObtained));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;147:&lt;/span&gt;             oCommand.Parameters.Add(&lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;SqlParameter&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;&quot;@RollNo&quot;&lt;/span&gt;, _RollNo));&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;148:&lt;/span&gt;             oCommand.ExecuteNonQuery();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;149:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;150:&lt;/span&gt;             oCommand.Dispose();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;151:&lt;/span&gt;             oConnection.Close();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;152:&lt;/span&gt;             oConnection.Dispose();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;153:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;154:&lt;/span&gt;         &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;155:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-top:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt; &lt;span style=&quot;color: blue&quot;&gt;public event&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;PropertyChangedEventHandler&lt;/span&gt; PropertyChanged;                &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;156:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt; &lt;span style=&quot;color: blue&quot;&gt;protected void&lt;/span&gt; OnPropertyChanged(&lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; propertyName)                    &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;157:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt; {                                                                        &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;158:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;     if (&lt;span style=&quot;color: blue&quot;&gt;this&lt;/span&gt;.PropertyChanged != &lt;span style=&quot;color: blue&quot;&gt;null&lt;/span&gt;)                                    &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;159:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;        PropertyChanged(&lt;span style=&quot;color: blue&quot;&gt;this&lt;/span&gt;, &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;PropertyChangedEventArgs&lt;/span&gt;(propertyName));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;160:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-bottom:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt; }                                                                        &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;161:&lt;/span&gt;     }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;162:&lt;/span&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#808080&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;Changes made to class &lt;code&gt;Examinee&lt;/code&gt; of listing 1 are given in code listing 4 above. The &lt;code&gt;INotifyPropertyChanged&lt;/code&gt; interface implementation allows the class to raise the PropertyChanged event everytime a property value changes. The above class can now be instanitated in the code-behind file (see code listing 5 below) of another XAML file (WithoutXAML.xaml) which is similar to that of code listing 2.&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-size: 7.5pt&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: green&quot;&gt;     // =========================&lt;br /&gt;     //   Code Listing 5&lt;br /&gt;     //   WithoutXAML.xaml.cs&lt;br /&gt;     // =========================&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  1:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  2:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  3:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Controls;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  4:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Data;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  5:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Documents;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  6:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Media;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  7:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Media.Imaging;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  8:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Shapes;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  9:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; Demos.WPF.Binding.PropertyChangeNotified;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 10:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 11:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;namespace&lt;/span&gt; Demos.WPF.Binding&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 12:&lt;/span&gt; {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 13:&lt;/span&gt;     &lt;span style=&quot;color: blue&quot;&gt;public partial class&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;WithoutXAML&lt;/span&gt; : &lt;span style=&quot;color: teal&quot;&gt;Window&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 14:&lt;/span&gt;     {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 15:&lt;/span&gt;         &lt;span style=&quot;color: teal&quot;&gt;Examinee&lt;/span&gt; oExaminee = &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;Examinee&lt;/span&gt;();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 16:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 17:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public &lt;/span&gt; Simple()&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 18:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 19:&lt;/span&gt;             InitializeComponent();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 20:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 21:&lt;/span&gt;         &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 22:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-top:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; WithoutXAML_Load(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 23:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;{                                                         &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 24:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;   oExaminee.PropertyChanged += oExaminee_PropertyChanged;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 25:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-bottom:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;}                                                         &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 26:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 27:&lt;/span&gt;         &lt;span style=&quot;color: green&quot;&gt;// Property Changed Event Handler [Pathetic Code!]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 28:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-top:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; oExaminee_PropertyChanged(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender,          &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 29:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;                    &lt;span style=&quot;color: teal&quot;&gt;PropertyChangedEventArgs&lt;/span&gt; e)                &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 30:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;{                                                              &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 31:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;    &lt;span style=&quot;color: blue&quot;&gt;switch&lt;/span&gt;(e.PropertyName)                                     &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 32:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;    {                                                          &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 33:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;        &lt;span style=&quot;color: blue&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: maroon&quot;&gt;&quot;FirstName&quot;&lt;/span&gt;:                                      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 34:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;            txtFirstName.Text = oExaminee.FirstName;           &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 35:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;            break;                                             &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 36:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;        &lt;span style=&quot;color: blue&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: maroon&quot;&gt;&quot;LastName&quot;&lt;/span&gt;:                                       &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 37:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;            txtLastName.Text = oExaminee.LastName;             &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 38:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;            break;                                             &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 39:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;        &lt;span style=&quot;color: blue&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: maroon&quot;&gt;&quot;University&quot;&lt;/span&gt;:                                     &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 40:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;            txtUniversity.Text = oExaminee.University;         &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 41:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;            break;                                             &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 42:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;        &lt;span style=&quot;color: blue&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: maroon&quot;&gt;&quot;MarksObtained&quot;&lt;/span&gt;:                                  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 43:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;            txtMarks.Text = oExaminee.MarksObtained.ToString();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 44:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;            break;                                             &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 45:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;    }                                                          &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 46:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-bottom:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;}                                                              &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 47:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 48:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnLoad_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 49:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 50:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;try&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 51:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 52:&lt;/span&gt;                 oExaminee.RollNo = txtRollNo.Text;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 53:&lt;/span&gt;                 oExaminee.Load();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 54:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 55:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: teal&quot;&gt;Exception&lt;/span&gt; oEx)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 56:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 57:&lt;/span&gt;                 &lt;span style=&quot;color: teal&quot;&gt;MessageBox&lt;/span&gt;.Show(oEx.Message);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 58:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 59:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 60:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 61:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnUpdate_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 62:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 63:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;try&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 64:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 65:&lt;/span&gt;                 oExaminee.Update();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 66:&lt;/span&gt;                 MessageBox.Show(&lt;span style=&quot;color: maroon&quot;&gt;&quot;Information Updated.&quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon&quot;&gt;&quot;Update&quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 67:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 68:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: teal&quot;&gt;Exception&lt;/span&gt; oEx)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 69:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 70:&lt;/span&gt;                 &lt;span style=&quot;color: teal&quot;&gt;MessageBox&lt;/span&gt;.Show(oEx.Message);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 71:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 72:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 73:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 74:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnCheck_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 75:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 76:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; str = &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt;.Format(&lt;span style=&quot;color: maroon&quot;&gt;&quot;OBJECT:\nFirstName: {0}&quot;&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 77:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nLastName: {1}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 78:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nUniversity: {2}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 79:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nMarksObtained: {3}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 80:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\n\nUI:&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 81:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nFirst Name: {4}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 82:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nLast Name: {5}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 83:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nUniversity: {6}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 84:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nMarksObtained: {7}&quot;&lt;/span&gt;, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 85:&lt;/span&gt;                 oExaminee.FirstName, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 86:&lt;/span&gt;                 oExaminee.LastName, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 87:&lt;/span&gt;                 oExaminee.University, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 88:&lt;/span&gt;                 oExaminee.MarksObtained.ToString(), &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 89:&lt;/span&gt;                 txtFirstName.Text, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 90:&lt;/span&gt;                 txtLastName.Text, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 91:&lt;/span&gt;                 txtUniversity.Text, &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 92:&lt;/span&gt;                 txtMarks.Text);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 93:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;MessageBox&lt;/span&gt;.Show(str);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 94:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 95:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 96:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnAddTen_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 97:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 98:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;if&lt;/span&gt; ((oExaminee.MarksObtained + 10) &gt; 100)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 99:&lt;/span&gt;                 oExaminee.MarksObtained = 100;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;100:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;else&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;101:&lt;/span&gt;                 oExaminee.MarksObtained += 10;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;102:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;103:&lt;/span&gt;         &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;104:&lt;/span&gt;         &lt;span style=&quot;color: green&quot;&gt;///////////////////////////////////&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;105:&lt;/span&gt;         // WARNING: Pathetic Code below! //&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;106:&lt;/span&gt;         // Event-handlers for text-boxes //&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;107:&lt;/span&gt;         ///////////////////////////////////&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;108:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;109:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-top:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; txtRollNo_TextChanged(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender,   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;110:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;  &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;111:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;{      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;112:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;    oExaminee.RollNo = txtRollNo.Text;   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;113:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-bottom:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;}      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;114:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;115:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-top:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; txtFirstName_TextChanged(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender,  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;116:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;  &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;117:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;{      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;118:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;    oExaminee.FirstName = txtFirstName.Text;  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;119:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-bottom:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;}      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;120:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;121:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-top:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; txtLastName_TextChanged(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender,  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;122:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;  &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;123:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;{      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;124:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;    oExaminee.LastName = txtLastName.Text;  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;125:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-bottom:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;}      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;126:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;127:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-top:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; txtUniversity_TextChanged(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender,  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;128:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;  &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;129:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;{      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;130:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;    oExaminee.University = txtUniversity.Text;  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;131:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-bottom:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;}      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;132:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;133:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-top:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; txtMarks_TextChanged(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender,   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;134:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;  &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;135:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;{      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;136:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;    &lt;span style=&quot;color: blue&quot;&gt;int&lt;/span&gt; marks = 0;     &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;137:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;    &lt;span style=&quot;color: blue&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: blue&quot;&gt;int&lt;/span&gt;.TryParse(txtMarks.Text, &lt;span style=&quot;color: blue&quot;&gt;out&lt;/span&gt; marks))  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;138:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;        oExaminee.MarksObtained = marks;   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;139:&lt;/span&gt;         &lt;span style=&quot;border-left:1px solid #0A246A; border-right:1px solid #0A246A; border-bottom:1px solid #0A246A; background-color: #D4D5D8;&quot;&gt;}      &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;140:&lt;/span&gt;     }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;141:&lt;/span&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#808080&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;Notice that the &lt;code&gt;oExaminee_PropertyChanged&lt;/code&gt; event handler (lines 27 to 46) updates the UI with object values everytime a PropertyChanged event occurs on the &lt;code&gt;Examinee&lt;/code&gt; object. To update the object with UI values, &lt;code&gt;TextChanged&lt;/code&gt; event handlers were added for all the textboxes (see lines 104 to 139).&lt;br /&gt;&lt;br /&gt;Notice also that the &quot;Load&quot; and &quot;Update&quot; button event handlers do not contain the Object-to-UI and UI-to-Object update code as that is now being handles by the event handlers.&lt;br /&gt;&lt;br /&gt;However, just because we implemented the &lt;code&gt;INotifyPropertyChanged&lt;/code&gt; interface in our &lt;code&gt;Examinee&lt;/code&gt; class, we were not absolved of the responsibility to write custom event handlers for the object and UI update logic. The whole point of all the above code is to show the tedious coding required to keep the object and UI in sync.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Using C# and XAML [&lt;code&gt;INotifyPropertyChanged&lt;/code&gt; and XAML]&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;Both the approaches described above were used with typical Windows applications, although I created the form using XAML. The final approach (and the right one at that) uses the Data Binding syntax in XAML, and would show you how easy it is to bind UI elements directly to an object that implements &lt;code&gt;INotifyPropertyChanged&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;To see WPF Data Binding in action, the Binding sytax in the textboxes&#39; &quot;Text&quot; property values. The XAML file would not look something like code listing 6. [Changes from previous XAML file have been highlighted.]&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-size: 7.5pt&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: green&quot;&gt;&lt;br /&gt; &amp;lt;!-- &lt;br /&gt; =========================&lt;br /&gt;    Code Listing 6&lt;br /&gt;    WithXAML.xaml&lt;br /&gt; =========================&lt;br /&gt; --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Window&lt;/span&gt; &lt;br /&gt; &lt;span style=&quot;color: red&quot;&gt;x:Class&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Demos.WPF.Binding.WithXAML&lt;/span&gt;&quot;&lt;br /&gt; &lt;span style=&quot;color: red&quot;&gt;xmlns&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation&lt;/span&gt;&quot;&lt;br /&gt; &lt;span style=&quot;color: red&quot;&gt;xmlns:x&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;http://schemas.microsoft.com/winfx/2006/xaml&lt;/span&gt;&quot;&lt;br /&gt; &lt;span style=&quot;color: red&quot;&gt;Title&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;Binding - Using XAML Binding Syntax&lt;/span&gt;&quot; &lt;br /&gt; &lt;span style=&quot;color: red&quot;&gt;Height&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;209&lt;/span&gt;&quot; &lt;span style=&quot;color: red&quot;&gt;Width&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;371&lt;/span&gt;&quot; &lt;span style=&quot;color: red&quot;&gt;Background&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;WhiteSmoke&lt;/span&gt;&quot;&lt;br /&gt; &lt;span style=&quot;color: red&quot;&gt;WindowStartupLocation&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;CenterScreen&lt;/span&gt;&quot; &lt;span style=&quot;color: red&quot;&gt;Loaded&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;WithXAML_Load&lt;/span&gt;&quot; &lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Grid&lt;/span&gt; &lt;span style=&quot;background-color: #FFFF99; border: 1px solid #CC9900&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;x:Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: red&quot;&gt;myGrid&lt;/span&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt; ...&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Roll Number:&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt; ...&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;First Name:&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt; ...&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Last Name:&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt; ...&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;University:&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt; ...&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Marks:&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;br /&gt;     ...&lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;txtRollNo&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;background-color: #FFFF99; border: 1px solid #CC9900&quot;&gt;&lt;span style=&quot;color: red&quot;&gt;Text&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;{Binding Path=RollNo}&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt; &lt;br /&gt;     ...&lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;txtFirstName&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;background-color: #FFFF99; border: 1px solid #CC9900&quot;&gt;&lt;span style=&quot;color: red&quot;&gt;Text&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;{Binding Path=FirstName}&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;br /&gt;     ...&lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;txtLastName&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;background-color: #FFFF99; border: 1px solid #CC9900&quot;&gt;&lt;span style=&quot;color: red&quot;&gt;Text&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;{Binding Path=LastName}&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;br /&gt;     ...&lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;txtUniversity&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;background-color: #FFFF99; border: 1px solid #CC9900&quot;&gt;&lt;span style=&quot;color: red&quot;&gt;Text&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;{Binding Path=University}&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;br /&gt;     ... &lt;br /&gt;     &lt;span style=&quot;color: red&quot;&gt;Name&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;txtMarks&lt;/span&gt;&quot; &lt;br /&gt;     &lt;span style=&quot;background-color: #FFFF99; border: 1px solid #CC9900&quot;&gt;&lt;span style=&quot;color: red&quot;&gt;Text&lt;/span&gt;=&quot;&lt;span style=&quot;color: blue&quot;&gt;{Binding Path=MarksObtained}&lt;/span&gt;&quot;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;TextBox&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt; ...&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Load&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt; ...&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Update&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt; ...&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;Check&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt; ...&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;+10&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Button&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Grid&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;span style=&quot;color: maroon&quot;&gt;Window&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#808080&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;The Binding statement added to the XAML above allows you to discard all the event-handlers in the code-behind that were needed before. The function that we wanted from our app is now achievable with a lot less code.&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-size: 7.5pt&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: green&quot;&gt;     // =========================&lt;br /&gt;     //   Code Listing 7&lt;br /&gt;     //   WithXAML.xaml.cs&lt;br /&gt;     // =========================&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  1:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  2:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  3:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Controls;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  4:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Data;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  5:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Documents;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  6:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Media;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  7:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Media.Imaging;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  8:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; System.Windows.Shapes;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  9:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;using&lt;/span&gt; Demos.WPF.Binding.PropertyChangeNotified;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt;  10:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 11:&lt;/span&gt; &lt;span style=&quot;color: blue&quot;&gt;namespace&lt;/span&gt; Demos.WPF.Binding&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 12:&lt;/span&gt; {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 13:&lt;/span&gt;     &lt;span style=&quot;color: blue&quot;&gt;public partial class&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;WithXAML&lt;/span&gt; : &lt;span style=&quot;color: teal&quot;&gt;Window&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 14:&lt;/span&gt;     {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 15:&lt;/span&gt;         &lt;span style=&quot;color: teal&quot;&gt;Examinee&lt;/span&gt; oExaminee = &lt;span style=&quot;color: blue&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal&quot;&gt;Examinee&lt;/span&gt;();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 16:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 17:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;public&lt;/span&gt; WithXAML()&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 18:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 19:&lt;/span&gt;             InitializeComponent();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 20:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 21:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 22:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; WithXAML_Load(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 23:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 24:&lt;/span&gt;             &lt;span style=&quot;background-color: #D4D5D8; border: 1px solid #0A246A&quot;&gt;myGrid.DataContext = oExaminee;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 25:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 26:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 27:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnAddTen_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 28:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 29:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;if&lt;/span&gt; ((oExaminee.MarksObtained + 10) &gt; 100)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 30:&lt;/span&gt;                 oExaminee.MarksObtained = 100;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 31:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 32:&lt;/span&gt;                 oExaminee.MarksObtained += 10;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 33:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 34:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 35:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnLoad_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 36:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 37:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;try&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 38:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 39:&lt;/span&gt;                 oExaminee.Load();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 40:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 41:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: teal&quot;&gt;Exception&lt;/span&gt; oEx)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 42:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 43:&lt;/span&gt;                 &lt;span style=&quot;color: teal&quot;&gt;MessageBox&lt;/span&gt;.Show(oEx.Message);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 44:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 45:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 46:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 47:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnUpdate_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 48:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 49:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;try&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 50:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 51:&lt;/span&gt;                 oExaminee.Update();&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 52:&lt;/span&gt;                 &lt;span style=&quot;color: teal&quot;&gt;MessageBox&lt;/span&gt;.Show(&lt;span style=&quot;color: maroon&quot;&gt;&quot;Information Updated.&quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon&quot;&gt;&quot;Update&quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 53:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 54:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: teal&quot;&gt;Exception&lt;/span&gt; oEx)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 55:&lt;/span&gt;             {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 56:&lt;/span&gt;                 &lt;span style=&quot;color: teal&quot;&gt;MessageBox&lt;/span&gt;.Show(oEx.Message);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 57:&lt;/span&gt;             }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 58:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 59:&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 60:&lt;/span&gt;         &lt;span style=&quot;color: blue&quot;&gt;private void&lt;/span&gt; btnCheck_Click(&lt;span style=&quot;color: blue&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: teal&quot;&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 61:&lt;/span&gt;         {&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 62:&lt;/span&gt;             &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt; str = &lt;span style=&quot;color: blue&quot;&gt;string&lt;/span&gt;.Format(&lt;span style=&quot;color: maroon&quot;&gt;&quot;OBJECT:\nFirstName: {0}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 63:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nLastName: {1}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 64:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nUniversity: {2}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 65:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nMarksObtained: {3}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 66:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\n\nUI:&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 67:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nFirst Name: {4}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 68:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nLast Name: {5}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 69:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nUniversity: {6}&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 70:&lt;/span&gt;                 + &lt;span style=&quot;color: maroon&quot;&gt;&quot;\nMarksObtained: {7}&quot;,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 71:&lt;/span&gt;                 oExaminee.FirstName,&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 72:&lt;/span&gt;                 oExaminee.LastName,&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 73:&lt;/span&gt;                 oExaminee.University,&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 74:&lt;/span&gt;                 oExaminee.MarksObtained.ToString(),&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 75:&lt;/span&gt;                 txtFirstName.Text,&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 76:&lt;/span&gt;                 txtLastName.Text,&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 77:&lt;/span&gt;                 txtUniversity.Text,&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 78:&lt;/span&gt;                 txtMarks.Text);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 79:&lt;/span&gt;             &lt;span style=&quot;color: teal&quot;&gt;MessageBox&lt;/span&gt;.Show(str);&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 80:&lt;/span&gt;         }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 81:&lt;/span&gt;     }&lt;br /&gt;&lt;span style=&quot;color: gray&quot;&gt; 82:&lt;/span&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#808080&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;The only change occured in line 24 in the &lt;code&gt;WithXAML_Load&lt;/code&gt; event handler; the &lt;code&gt;Examinee&lt;/code&gt; object was assigned to the main Grid&#39;s DataContext property. The highlighted statement in code listing 7 above defines a data context for the Grid, the UI element that encloses all the other UI controls. WPF introduces the concept of &quot;Dependency Properties&quot; that enables a XAML UI element to inherit a value from its parent UI control (in this case the grid). Once the data context is set in the form load event, the &lt;code&gt;{Binding Path=...}&lt;/code&gt; statements in XAML simply retrieve the values from the bound object or resource and place them in the target textbox. If you run the application now, everytime you change the value in a textbox, the corresponding value in the object changes (You can test this by clicking the &quot;Check&quot; button after you update the value in a textbox). Same holds true for the object. If you click the &quot;+10&quot; (btnAddTen) button, the value in the object is incremented by 10. However, you will also see that the value is automatically updated in the textbox as well.&lt;br /&gt;&lt;br /&gt;Try the above, and feel free to ask any questions that you may have. I have really outdone myself with this post. I guess I am all set to write a book now.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Download source code from &lt;a href=&quot;http://groups.yahoo.com/group/coredotnet/files/Window%20Presentation%20Foundation/Demos.WPF.Binding.zip&quot;&gt;here&lt;/a&gt;.&lt;/i&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/114750249940055512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=114750249940055512' title='60 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114750249940055512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114750249940055512'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/05/wpf-data-binding-tutorial.html' title='WPF Data Binding Tutorial'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>60</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-114657078001769829</id><published>2006-05-02T16:41:00.000+05:00</published><updated>2006-05-02T21:32:08.250+05:00</updated><title type='text'>Developing Speech Applications - Part II</title><content type='html'>ASP.NET Speech applications developed using the Microsoft Speech Application SDK (SASDK) resemble typical ASP.NET applications in terms of their programming and exection model. Hence, it is extremely easy for web developers to use their existing skill set to develop speech applications from scratch, or use their existing ASP.NET code to speech enable a previously developed project.&lt;br /&gt;&lt;br /&gt;In &lt;a href=&quot;http://www.pkblogs.com/coredotnet/2006/03/developing-speech-applications-part-i_27.html&quot;&gt;Part I&lt;/a&gt;, I slightly touched upon the type of speech applications i.e. Voice-Only and Multi-modal, that you can develop using the SASDK. The diagram below would give you some idea about how ASP.NET Speech apps differ from the traditional ASP.NET web apps.&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/SpeechAppTypes.gif&quot; border=&quot;0&quot; alt=&quot;Application Types&quot; /&gt;&lt;br /&gt;The only difference between a typical web app, a voice-only speech app, and a multi-modal speech app is the top layer that the user interacts with. In the typical ASP.NET web application (left-most in the figure), the GUI simply comprises one or more web forms containing text-boxes, combo-boxes, images, plain-text etc.  In a multi-modal speech applicaion (right-most), the user, although interacts with the application through the GUI (web forms displayed in a browser), can also use voice commands to make selections in combo-boxes, speak text into a text-box, etc. In both of these scenarios (typical web application and multi-modal speech application), the web form loads into the user&#39;s browser in response to a request sent by the client to the web server. A voice-only speech app (middle of diagram), is different from the previous two in that it does not have a GUI that a user can interact with; nor does it load into a web browser on the client user&#39;s PC. The voice-only application user interacts with the app through a telephone using her voice or touch-tone (DTMF), with the speech application running on a remote server. The output is also in the form of voice, which the user hears on her phone. It is important to note that in the voice-only application scenario, the speech app is infact running in a web browser (like all ASP.NET applications) on the server, but the loaded web pages are composed of &lt;a href=&quot;http://www.saltforum.org&quot;&gt;SALT&lt;/a&gt; instead of HTML tags. Also, while the ASP.NET portion of the application is hosted in IIS, the task of receiving the call and transferring voice commands and responses between the telephone line and the app rests with Microsoft Speech Server (MSS).&lt;br /&gt;&lt;br /&gt;To start off, lets look at a typical ASP.NET application first. The figure below provides an overview of how your everyday ASP.NET web app works.&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/AppTypicalWeb.gif&quot; border=&quot;0&quot; alt=&quot;Typical ASP.NET Application&quot; /&gt;&lt;br /&gt;The series of steps/events shown in the above diagram are:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Request sent from a web form loaded into the client&#39;s web browser.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Request processed.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Query sent to database.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Query results returned to the application.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Response generated and sent to the requesting web browser.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Keeping the above in mind, lets take a look at our FlightEnquiry.NET voice-only ASP.NET speech application. &lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/AppSpeech.gif&quot; border=&quot;0&quot; alt=&quot;Voice Only ASP.NET Speech Application&quot; /&gt;&lt;br /&gt;On an abstract level,  the application works like this.&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;The user calls the FlightEnquiry.NET application from her phone. The app picks up the phone, plays a welcome prompt, and asks the user for the Flight she wants to enquire about.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;The caller speaks the flight number.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;[...]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;[...]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;[...]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;[...]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;[...]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;[...]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;[...]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;[...]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;[...]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;The application tells the caller the status of the flight and the call is disconnected.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;The reason I left out points 3 to 11 was because they are hidden from the caller and mainly involve processing done by the application. Lets now look at the technical details of the FlightEnquiry.NET speech demo.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Step 1:&lt;/u&gt;&lt;br /&gt;When the phone call is received, Microsoft Speech Server answers the phone by playing a pre-recorded prompt. This prompt could be a recorded voice or that coming from a Text-to-Speech (TTS) Engine.&lt;br /&gt;&lt;i&gt;The FightEnquiry.NET application played the prompt, &quot;Welcome to FlightEnquiry Dot Net. Please say the Airline Name and Flight Number.&quot;&lt;/i&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#C0C0C0&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;&lt;u&gt;Step 2:&lt;/u&gt;&lt;br /&gt;The caller speaks the flight name and number she wants to enquire about.&lt;br /&gt;&lt;i&gt;Depending on how flexible your have built your app, the caller can say the Flight Name and Number in a number of ways; Pakistan International Airlines PK 347, Pakistan International Airlines 347, PIA 347, PK 347, PIA Flight 347, PIA Flight PK 347, etc.&lt;/i&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#C0C0C0&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;&lt;u&gt;Step 3:&lt;/u&gt;&lt;br /&gt;The spoken input is validated against a grammar rule. All grammar rules exist inside a separate *.srgs file that contains the XML for the grammar. In order to allow the caller to answer in a number of possible ways, the grammar should take into consideration the maximum number of possibilities that the caller can say in response to a played prompt. The result of the grammar validation is plain XML within a SML (Semantic Markup Language) tag.&lt;br /&gt;&lt;i&gt;The resultant SML for the FlightEnquiry.NET app looks like this:&lt;/i&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;SML&amp;gt;&lt;br /&gt;  &amp;lt;FlightNumber&amp;gt;PK347&amp;lt;/FlightNumber&amp;gt;&lt;br /&gt;&amp;lt;/SML&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#C0C0C0&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;&lt;u&gt;Step 4:&lt;/u&gt;&lt;br /&gt;Values can be extracted from the generated SML using an XPath query that you specified during application development. The extracted value is then stored in an object variable called a semantic item. Each semantic item can hold only one value. A semantic item is simply a server control that can be shared between the browser and ASP.NET application.&lt;br /&gt;&lt;i&gt;The value &quot;PK347&quot; we got from the generated SML is stored in a semantic item called &quot;siFlightNumber&quot;.&lt;/i&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#C0C0C0&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;&lt;u&gt;Step 5:&lt;/u&gt;&lt;br /&gt;Once the value is stored in the semantic item, it is submitted to the server. The value of the semantic item can be accessed inside the browser using JavaScript through its value property, i.e. siFlightNumber.value. However, on the server, the semantic item&#39;s value is accessed using the Text property, i.e. siFlightNumber.Text.&lt;br /&gt;&lt;hr noshade color=&quot;#C0C0C0&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;&lt;u&gt;Step 6:&lt;/u&gt;&lt;br /&gt;As with any typical ASP.NET web application, the request is processed.&lt;br /&gt;&lt;hr noshade color=&quot;#C0C0C0&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;&lt;u&gt;Step 7:&lt;/u&gt;&lt;br /&gt;The database is queried for the flight&#39;s status.&lt;br /&gt;&lt;hr noshade color=&quot;#C0C0C0&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;&lt;u&gt;Step 8:&lt;/u&gt;&lt;br /&gt;Query results are returned back to the application.&lt;br /&gt;&lt;hr noshade color=&quot;#C0C0C0&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;&lt;u&gt;Step 9:&lt;/u&gt;&lt;br /&gt;The Flight status is now returned, again as a semantic item back to the client.&lt;br /&gt;&lt;hr noshade color=&quot;#C0C0C0&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;&lt;u&gt;Step 10:&lt;/u&gt;&lt;br /&gt;In order to play the Flight&#39;s status back to the caller, a client-side JavaScript code written at the time of development formats the status it receives in the form of a semantic item from the server. This JavaScript code resides inside a prompt function (*.pf) file  that contains both XML and JavaScript, and converts the status into a form that can be spoken back to the caller.&lt;br /&gt;&lt;hr noshade color=&quot;#C0C0C0&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;&lt;u&gt;Step 11:&lt;/u&gt;&lt;br /&gt;The prompt function returns a string that would be spoken either by the TTS or would be generated from pre-recorded prompts and played to the caller i.e. &lt;i&gt;Pakistan International Airlines Flight P K three four seven from Karachi to Lahore departing six thirty and arriving wight fourty is on schedule. Thank you for calling Flight Enquiry Dot Net.&lt;/i&gt;&lt;br /&gt;&lt;hr noshade color=&quot;#C0C0C0&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;&lt;u&gt;Step 12:&lt;/u&gt;&lt;br /&gt;The callers hears the TTS/prompt voice and the call ends.&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Whew! Hopefully, I have been able to explain how my FlightEnquiry.NET demo works in this post. I would be covering the steps for speech-enabling the FlightEnquiry.NET application in my next post, the last of this series on developing speech application using Microsoft SASDK. Comments and feedback are always welcome.</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/114657078001769829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=114657078001769829' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114657078001769829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114657078001769829'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/05/developing-speech-applications-part-ii.html' title='Developing Speech Applications - Part II'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-114582264136404642</id><published>2006-04-24T00:52:00.000+05:00</published><updated>2006-04-24T01:04:01.376+05:00</updated><title type='text'>In all its Glory!</title><content type='html'>&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/isb_PMSecretariat.gif&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Pakistan&#39;s capital Islamabad is ranked as the most beautiful capital city in the region. The picture above show the Prime Minister&#39;s Secretariat decorated with lights (as were many buildings in Islamabad) because of a religious holiday; Eid Milad-un-Nabi, Prophet Muhammad&#39;s birthday.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Last week was monumental. Firstly, fellow MVP, Country Leader INETA Pakistan, and good friend &lt;a href=&quot;http://msaqib.blogspot.com&quot;&gt;Saqib Ilyas&lt;/a&gt; got married. I couldn&#39;t attend because I was in Islamabad. Anyway, best wishes for him and his wife. My reason for visiting Islamabad  was to conduct events at 4 universities; Mohammad Ali Jinnah University (MAJU), FAST, Allama Iqbal Open University (AIOU), and COMSATS Institute of Information Technology (CIIT); all in a span of 1 week. This time around, I was fortunate to be presenting with some very talented and young individuals from Islamabad. Tenoon Raza and Salma Nasir from Microsoft Islamabad office presented at the first 2 presentations each, and the latest edition to the Pakistani MVP Community, Ahmed Salam, presented at the remaining two.&lt;br /&gt;&lt;br /&gt;Islamabad always charges me up. I look forward to going back soon.&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/isb_MVP_CMS.1.jpg&quot; border=&quot;0&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/114582264136404642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=114582264136404642' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114582264136404642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114582264136404642'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/04/in-all-its-glory.html' title='In all its Glory!'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-114418052716196533</id><published>2006-04-05T00:49:00.000+05:00</published><updated>2006-12-20T13:07:49.123+05:00</updated><title type='text'>UX Article</title><content type='html'>My article on User eXperience published in &lt;a href=&quot;http://www.microsoft.com/betaexperience/en/newsletter.aspx&quot;&gt;The Beta Experience&lt;/a&gt; Newsletter 2.&lt;br /&gt;&lt;br /&gt;Check it out &lt;a target=&quot;_blank&quot; href=&quot;http://www.microsoft.com/betaexperience/nlarchive/bexp2/issue_2/userexperience.aspx&quot;&gt;here&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/114418052716196533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=114418052716196533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114418052716196533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114418052716196533'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/04/ux-article.html' title='UX Article'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-114340463351475099</id><published>2006-03-27T01:20:00.001+05:00</published><updated>2006-03-27T01:23:53.536+05:00</updated><title type='text'>Developing Speech Applications - Part I</title><content type='html'>&lt;i&gt;Haven&#39;t blogged, or conducted a session, about Speech Technologies (my second love) and the Microsoft Speech Application SDK (SASDK) for quite sometime. However, I have received a lot of requests for the SASDK tutorial on FlightEnquiry.NET Speech Demo that I showed at the Microsoft ISV Community Days in March 2005, Pakistan Developer Conference 2005 in June 2005, and at various &lt;a href=&quot;http://mea.ineta.org/pakistan/&quot;&gt;INETA Pakistan&lt;/a&gt; user group events last year. I have figured that it is better to blog about something in a series of posts, as opposed to trying to type one HUGE post and be absent from the blogging world for days and weeks. So, if time and old age permit, I will hopefully try to blog about the SASDK tutorial in 3 posts. (I will try to keep the &quot;Atlas at last&quot; posts coming during this time too.)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;NOTE: Most of the following text had been written about 8 months ago.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;BACKGROUND&lt;/b&gt;&lt;br /&gt;When ASP.NET first appeared on the horizon, most of us heaved a sigh a relief; No more having to work with ASP&#39;s two separate languages, VBScript on the server and JavaScript on the client; no spaghetti code; and most importantly, no need to worry about posting data back on to the form when it reloaded. With a number of cool ASP.NET server controls, life had been made simpler for the Web Developer. In a sense, for a brief moment in time, ASP Developers (who had shifted to ASP.NET) forgot all about JavaScript, since all ASP.NET controls had client-side logic built into it. The burden of writing JavaScript (or JScript) code had shifted from the Web Application Developer to the ASP.NET Server Control developer.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;INTRODUCTION&lt;/b&gt;&lt;br /&gt;Enter Microsoft Speech Application SDK (SASDK). Suddenly, client-side scripting became relevant again. Speech Applications built with the SASDK were browser-based ASP.NET applications with much of the handling done at the client i.e. web-browser. In making their Speech platform compatible with ASP.NET, Microsoft had 2 objectives: (1) to allow companies to use their existing ASP.NET code infrastructure in developing Speech apps; and (2) to make use of SALT (Speech Application Language Tags), a standard for providing speech input and output in the web-browser using tags. In various talks and speaker session, I have repeatedly been asked if the Microsoft SASDK would speech-enable websites or allow voice-activated web browsing. My answer: yes and no, depending on the type of platform you are developing the speech application for. &lt;br /&gt;&lt;br /&gt;A Speech Application developed using the Microsoft SASDK can be in either one of two categories; (1) Voice-only (2) Multi-Modal. Both application types leverage existing ASP.NET code but differ in implementation. Voice-only applications have a VUI (Voice User Interface) and no GUI i.e. all communication between the app and the user is by means of voice or DTMF (Dual-Tone Multi-Frequency) that may be transferred over a telephone line or any other voice carrier medium. Multi-Modal applications, on the other hand, have a VUI as well as a GUI. This allows the user to interact with the application using voice as well as with the mouse and keyboard. The use of Voice-only telephony applications is understandable, but why use Multi-Modal? Fact of the matter is that the bulk of Multi-Modal applications that would be developed within the next few years won&#39;t be for the desktop PC, but would instead be for Mobile and Smart Clients. PC users typically have all the hardware they need, namely the keyboard and mouse, to interact with their applications. However, it is difficult to use Mobile/Smart Client application because of the small keypad or even stylus while on the road. Microsoft&#39;s release of the Mobile Internet Toolkit did not really bring about increased development of Mobile applications as many would have expected because mobile or smart client applications are extremely difficult to use because of the small size of the device they are running on. Speech-enabled Mobile or Smart Client applications require minimal use of the keypad or stylus and rely more on speech for input (and even output), thus providing increased ease-of-use. &lt;b&gt;[NOTE: Multi-modal applications failed to take-off in a way that Microsoft had exepected. The Speech API (SAPI) 5.3 that comes built into Windows Vista would allow development of desktop speech applications and DOES NOT make use of SALT. You can download a video of the Multi-modal Speech Application (Sublime Demo) running on a hand-held device from &lt;a href=&quot;http://www.cs.cmu.edu/~jsherwan/&quot;&gt;Jahanzeb Sherwani&#39;s web page&lt;/a&gt;.]&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The execution model followed by an application developed using the SASDK is somewhat the same as any ASP.NET application, consisting mainly of a certain number of requests and responses. However, the client-side processing done for a speech application is different. In a typical web form (non-speech app) scenario, information is submitted to the server through form controls (textboxes, checkboxes, radio buttons etc.) which form the GUI. In speech applications, input is received by the a speech control that is not visually rendered but is in fact hosted inside a web page using the tag from SALT specification. When a voice input is received, it is processed on the client by JScript, meaningful information is extracted and sent to the server by means of a variable known in the SASDK domain as a &quot;semantic item&quot;. The importance of JScript that I highlighted at the start of this article stems from this client side processing of the speech input. This scenario is valid for both, Voice-only and Multi-modal Speech applications. For more information on SALT, check out the &lt;a href=&quot;http://www.saltforum.org&quot;&gt;SALT Forum&lt;/a&gt; web site. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Please note that in order for Internet Explorer to interpret SALT tags, you need to have Microsoft Enterprise Instrumentation Framework (EIF) installed on your PC. EIF is a pre-requisite and comes with the SASDK. Also, SASDK v1.0 and v1.1 work only with .NET Framework 1.1 and Visual Studio.NET 2003.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the second part of this 3 part series of posts, I will briefly discuss the series of functions performed during the execution of a typical Voice-only application.</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/114340463351475099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=114340463351475099' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114340463351475099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114340463351475099'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/03/developing-speech-applications-part-i_27.html' title='Developing Speech Applications - Part I'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-114305931027697198</id><published>2006-03-23T01:23:00.000+05:00</published><updated>2006-03-23T01:33:20.033+05:00</updated><title type='text'>Atlas at last! - Part I</title><content type='html'>&lt;i&gt;The great thing about being a Microsoft MVP is that you are always out to learn new tools, technologies, tips, and tricks, in anticipation of being asked a technical question on any forum regardless of what your competencies actually are. Not only does gaining knowledge benefit MVPs themselves; it also lets them share that knowledge, expertise, and experience to the developer community at large. I simply love doing it, and I am glad that I too am finally blogging about AJAX and Atlas after so many of my fellow -MVPs and -bloggers around the world have already done so. I hope to blog about Atlas, as I have understood it, in a series of posts.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;You might have been hearing and reading a lot about Web 2.0 lately. If you haven&#39;t heard about it, and you apparently live in a cave (as the saying goes) check out an indepth article on it &lt;a href=&quot;http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;AJAX is all about JavaScript as it involves using the &lt;a href=&quot;http://en.wikipedia.org/wiki/Xmlhttp&quot;&gt;XmlHTTP&lt;/a&gt; object built into your web browser, and has been a part of the browser since 1998. I dont think a lot web developers would want to get down to writing AJAX apps using directly the XmlHttp object, and would instead rely on pre-built libraries that leverage XmlHTTP. If you happen to be an ASP.NET developer (and you probably are), you need to get hold of &lt;a href=&quot;http://atlas.asp.net&quot;&gt;Atlas&lt;/a&gt;, the client and server-side libraries and controls for building AJAX applications from Microsoft. Since Atlas has not been finally released, you might have to do a lot of JavaScript coding yourself. The thing with working with JavaScript is that when you are getting down and dirty writing code in a language that you usually do not program in, and reluctantly learning many of the details of client-side scripting that you are not accustomed to or atleast did not care about previously, you are bound to get an error once in a while. Many times, the line of code that is marked as being the culprit for the error is not actually the one that has something wrong with it. Since you might not get a lot of Intellisense and debugging support in the VS IDE for client-side scripts (although Microsoft is working to change that in future), there are a couple of things that I recommend you do when you encounter a JavaScript error.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Pray that you are able to solve the problem within the next hour. [Optional]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Go and have a glass of water. [Mandatory]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Take a deep breath and relax. [Mandatory]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Empty your web-browser&#39;s cache. [Optional]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Go over your script&#39;s code, one statement at a time, to ensure that you did not mis-spell anything. Check variable and function names. Do not assume that your typing skills are excellent. You could be great, but that changes when you are typing JavaScript code. DO IT! [Mandatory]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;REMEMBER, JavaScript is case-sensitive, so &lt;code&gt;textbox&lt;/code&gt; is not the same as &lt;code&gt;textBox&lt;/code&gt;. [Mandatory]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Use the JavaScript &#39;alert&#39; function judiciously to display values in a browser dialog box, to ensure variable values are what you think they are at a particular point in your code. [Mandatory]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;There is NOTHING wrong with the Atlas client libraries (*.js files inserted into the project when an Atlas website is created); so if you get an error at, lets say, line no. 1554, check to see if you have closed all Atlas tags correctly. [Mandatory]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;IE would do just so much to let you know the line of code that has the error. It is highly likely that the line marked with having the error is perfectly alright. Check to see if that line in followed by a function-call statement. If it is, go to point no. 5 and start debugging that function. [Mandatory]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;REMEMBER, AJAX/Atlas involves calling web services asynchronously. Every web service call must also specify a call-back function, which is executed when the service finishes executing and returns data back to the browser.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;When you get an error on the JavaScript statement calling a web service, be sure to debug the call-back function (the function that executes once the web service returns the results of its execution). [Mandatory]&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;There are more indepth tutorials and technical stuff that I would cover in my future &quot;Atlas at last&quot; posts.</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/114305931027697198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=114305931027697198' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114305931027697198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/114305931027697198'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/03/atlas-at-last-part-i.html' title='Atlas at last! - Part I'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-113973898315187206</id><published>2006-02-12T15:06:00.000+05:00</published><updated>2006-02-12T15:09:43.173+05:00</updated><title type='text'>Book on MS Speech Server</title><content type='html'>I can hardly wait.&lt;br /&gt;&lt;a href=&quot;http://msmvps.com/blogs/williamryan/archive/2006/01/25/81837.aspx&quot;&gt;http://msmvps.com/blogs/williamryan/archive/2006/01/25/81837.aspx&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/113973898315187206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=113973898315187206' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/113973898315187206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/113973898315187206'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/02/book-on-ms-speech-server.html' title='Book on MS Speech Server'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9006641.post-113933174092671901</id><published>2006-02-07T21:53:00.000+05:00</published><updated>2006-02-07T22:04:57.613+05:00</updated><title type='text'>Google on IE7 NOW!</title><content type='html'>It literally took ages for the good people at Microsoft to realize the importance of search, and they only came out with their search engine once Google&#39;s domination of the search market was complete; their time to respond to this reality being horribly slow.&lt;br /&gt;&lt;br /&gt;I had (finally) started using MSN Search for the past few days, ever since I downloaded and installed Internet Explorer 7 Beta 2, as it provided the MSN Search textbox on the top-right side of the window without having to visit a particular webpage to enter the search query. Not any more. Today, as I typed www.google.com.pk in my IE7 web browser, the Google search page had a new addition on the top-right hand corner of the page, prompting me to make Google the search engine in IE. I clicked the &quot;Make Google my search&quot; button and the 13.6 KB download instantly added the Google search option to a web browser that is still in its Beta. Talk about quick response. What&#39;s in-store for Web 2.0, I wonder? The good people of Google are swift.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://photos1.blogger.com/blogger/3715/638/1600/googleIE.2.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/320/googleIE.2.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;&quot; src=&quot;http://photos1.blogger.com/blogger/3715/638/1600/googleIE2.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://coredotnet.blogspot.com/feeds/113933174092671901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9006641&amp;postID=113933174092671901' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/113933174092671901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9006641/posts/default/113933174092671901'/><link rel='alternate' type='text/html' href='http://coredotnet.blogspot.com/2006/02/google-on-ie7-now.html' title='Google on IE7 NOW!'/><author><name>Adnan Farooq Hashmi</name><uri>http://www.blogger.com/profile/02084186570374676836</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://4.bp.blogspot.com/-6vyGpDYVe1w/UBSP5-ZqZmI/AAAAAAAAAW0/A4UqAwOA-I4/s220/afh.jpg'/></author><thr:total>2</thr:total></entry></feed>