<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3154678905522700970</id><updated>2012-01-25T13:13:29.461-05:00</updated><category term='WebServices'/><category term='Architecture'/><category term='State Management'/><category term='Deployment'/><category term='SQL Server'/><category term='VB.NET'/><category term='.NET Framework 3.5'/><category term='dotnetthread Articles'/><category term='Ajax'/><category term='ASP.NET'/><category term='Visual Studio 2008'/><category term='General'/><category term='Events and Delegates'/><category term='OOPS'/><category term='Framework'/><category term='Puzzles'/><category term='Debugging'/><category term='Design Patterns'/><category term='LINQ'/><category term='Framework 3.5'/><category term='Sql Server Management Studio'/><category term='jQuery'/><category term='MySQL'/><category term='XSLT'/><category term='Visual Studio IDE'/><category term='SQL Server 2008'/><category term='CSS'/><category term='Software Development'/><category term='Others'/><category term='SharePoint'/><category term='MSMQ'/><category term='Jobs'/><category term='UML'/><category term='ASP'/><category term='VS 2010 and .NET 4.0'/><category term='XML'/><category term='Certification Dumps'/><category term='Caching'/><category term='IIS'/><category term='Latest News'/><category term='Best Practices'/><category term='VisualBasic'/><category term='ADO.NET'/><category term='C#'/><category term='Remoting'/><category term='Syntax'/><category term='Assembly'/><category term='WCF'/><category term='MVC Framework'/><category term='Bug Fixing'/><category term='.Net Framework Tools'/><category term='HTML'/><category term='Tools'/><category term='JavaScript'/><category term='ASP.NET 3.5'/><category term='Anouncements'/><category term='Silverlight'/><category term='Serialization'/><category term='Solutions For Errors'/><category term='C# 4.0'/><title type='text'>.Net Interview Questions, Resources, Tips &amp; Tricks.</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default?start-index=101&amp;max-results=100'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>771</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2094749612885932565</id><published>2011-10-19T14:33:00.001-04:00</published><updated>2011-10-19T14:36:49.631-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SQL most efficient way to query xml nodes</title><content type='html'>Most efficient way to query nodes in XML is to use XQuery methods like .value, .nodes, .query and .exists methods&lt;br /&gt;&lt;br /&gt;For Examples, check below articles.&lt;br /&gt;&lt;a href="http://www.dotnetthread.com/articles/8-Querying-from-XML-datatype-table-column-in-SQL-Server.aspx"&gt;http://www.dotnetthread.com/articles/8-Querying-from-XML-datatype-table-column-in-SQL-Server.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2094749612885932565?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2094749612885932565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2011/10/sql-most-efficient-way-to-query-xml.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2094749612885932565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2094749612885932565'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2011/10/sql-most-efficient-way-to-query-xml.html' title='SQL most efficient way to query xml nodes'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-4929551014855463369</id><published>2011-10-19T14:25:00.001-04:00</published><updated>2011-10-19T14:28:41.685-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>How to use Variable in SQL IN Clause</title><content type='html'>DECLARE @EmpID VARCHAR(8000)  &lt;br /&gt;SET @EmpID = '''Emp1'',''Emp2'''&lt;br /&gt;&lt;br /&gt;Select * from emp&lt;br /&gt;where empid in(@empid) - This doesnt work...&lt;br /&gt;&lt;br /&gt;For solution check the below URL.&lt;br /&gt;&lt;a href="http://www.dotnetthread.com/tips/25-Using-variable-in-SQL-IN-statement.aspx"&gt;http://www.dotnetthread.com/tips/25-Using-variable-in-SQL-IN-statement.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-4929551014855463369?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/4929551014855463369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2011/10/how-to-use-variable-in-sql-in-clause.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4929551014855463369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4929551014855463369'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2011/10/how-to-use-variable-in-sql-in-clause.html' title='How to use Variable in SQL IN Clause'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-589250656025604481</id><published>2011-01-17T13:26:00.001-05:00</published><updated>2011-01-17T13:29:17.545-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dotnetthread Articles'/><title type='text'>Parallel Computing in .NET Framework 4.0</title><content type='html'>&lt;a href="http://www.dotnetthread.com/articles/1-ParallelComputinginNET40TaskParallelLibraryPLINQ.aspx"&gt;Parallel Computing in .NET 4.0 – Task Parallel Library &amp; PLINQ&lt;/a&gt;&lt;br /&gt;on Dec 05, 2010 by Anil Kumar Reddy Perugu&lt;br /&gt;.NET 4 introduces various parallel-programming primitives that abstract away some of the messy details that developers have to deal with when implementing parallel programs from scratch.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetthread.com/articles/4-ParallelComputinginNET40-ConcurrentCollections.aspx"&gt;Parallel Computing in .NET 4.0 - Concurrent Collections&lt;/a&gt;&lt;br /&gt;on Jan 14, 2011 by Anil Kumar Reddy Perugu&lt;br /&gt;When working on Multi Threaded programs the most important point is to make sure that object that is accessed by multiple threads and operations performed on the object are thread safe. If not we need to protect the object with proper locks to avoid incorrect results and exceptions.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetthread.com/articles/3-ParallelComputinginNET40-ParallelLINQ.aspx"&gt;Parallel Computing in .NET 4.0 - Parallel LINQ&lt;/a&gt;&lt;br /&gt;on Jan 14, 2011 by Anil Kumar Reddy Perugu&lt;br /&gt;.NET Framework 4.0 introduces Parallel Task Library and Parallel LINQ to Objects. This article is the continuation of Parallel Computing in .NET 4.0 – Task Parallel Library &amp; PLINQ.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetthread.com/articles/2-AgileSoftwareDevelopment.aspx"&gt;Agile: Software Development&lt;/a&gt;&lt;br /&gt;on Dec 05, 2010 by Anil Kumar Reddy Perugu&lt;br /&gt;This artcle discuss about agile software development and its advantages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-589250656025604481?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/589250656025604481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2011/01/parallel-computing-in-net-framework-40.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/589250656025604481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/589250656025604481'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2011/01/parallel-computing-in-net-framework-40.html' title='Parallel Computing in .NET Framework 4.0'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3420637995261886490</id><published>2010-07-15T01:59:00.001-04:00</published><updated>2010-07-15T02:43:46.272-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Latest News'/><title type='text'>WebMatrix - Microsoft new IDE (Free Tool)</title><content type='html'>Have a look at WebMatrix a new IDE for Web Development. (Simplifies Web development)&lt;br /&gt;&lt;a href="http://www.microsoft.com/web/webmatrix"&gt;http://www.microsoft.com/web/webmatrix&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Introduction and First application.&lt;br /&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2010/07/06/introducing-webmatrix.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2010/07/06/introducing-webmatrix.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Simple IDE for website development uses inbuilt lightweight file based database and the new cshtml is amazing (similar to Coldfusion).&lt;br /&gt;- SQL Server Compact Edition&lt;br /&gt;- Cshtml (ASP.NET Razor)&lt;br /&gt;- IIS Express with all required developer features.&lt;br /&gt;- Web Server&lt;br /&gt;- Open source application gallery (Web Apps)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-3420637995261886490?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/3420637995261886490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/07/webmatrix-microsoft-new-ide-free-tool.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3420637995261886490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3420637995261886490'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/07/webmatrix-microsoft-new-ide-free-tool.html' title='WebMatrix - Microsoft new IDE (Free Tool)'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2571485228526238161</id><published>2010-07-15T01:25:00.003-04:00</published><updated>2010-07-15T01:59:12.081-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jobs'/><title type='text'>Microsoft Jobs</title><content type='html'>1. SR Software Development Engineer&lt;br /&gt;&lt;br /&gt;SQL 2005/2008&lt;br /&gt;.NET Framework 3.5/4.0&lt;br /&gt;ASP.NET/ASP/C#&lt;br /&gt;WCF/WPF/WF/Silverlight&lt;br /&gt;SharePoint 2007/2010&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Apply Now: &lt;a href="http://www.jobthread.com/jt/jobs/widget_click.php?id=85794d&amp;job_id=541131"&gt;http://www.jobthread.com/jt/jobs/widget_click.php?id=85794d&amp;job_id=541131&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. Software Development Engineer (SDE)&lt;br /&gt;&lt;br /&gt;and formulate recommendations clearly. Technical horsepower and critical thinking are required.&lt;br /&gt;6+ years of software development experience with C#, Silverlight, .Net programming, WCF Web services , SQL and VSTF 2008\2010.&lt;br /&gt;&lt;br /&gt;Apply Now: &lt;a href="http://www.jobthread.com/jt/jobs/widget_click.php?id=85794d&amp;job_id=541135"&gt;http://www.jobthread.com/jt/jobs/widget_click.php?id=85794d&amp;job_id=541135&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2571485228526238161?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2571485228526238161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/07/microsoft-jobs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2571485228526238161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2571485228526238161'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/07/microsoft-jobs.html' title='Microsoft Jobs'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-472719539669297207</id><published>2010-04-09T14:21:00.001-04:00</published><updated>2010-04-09T14:21:26.615-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>What is Method Hiding?</title><content type='html'>Method hiding is to hide/mask method in base class by creating a similar function in derived class and by using new keyword in the derived class.&lt;br /&gt;Unlike Method overriding, When we refer base class object created by casting derived class object a method in base class will be called.&lt;br /&gt;Also we can change the return type while masking the base class method.&lt;br /&gt;Using new keyword is not compulsory, however a warning will be displayed if we wont specify new keyword while masking.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Example:&lt;br /&gt; &lt;br /&gt;Base Class:&lt;br /&gt;--------------&lt;br /&gt;public class BaseClass&lt;br /&gt;{&lt;br /&gt; public virtual void Method1()&lt;br /&gt; {&lt;br /&gt; Print("Base Class Method");&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Derived class&lt;br /&gt;---------------&lt;br /&gt;public class DerivedClass: BaseClass&lt;br /&gt;{&lt;br /&gt; public override void Method1()&lt;br /&gt; {&lt;br /&gt; Print("Derived Class Method");&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Usage&lt;br /&gt;-------------------&lt;br /&gt;public class Sample&lt;br /&gt;{&lt;br /&gt; public void TestMethod()&lt;br /&gt; {&lt;br /&gt;      DerivedClass objDC = new DerivedClass();&lt;br /&gt;      objDC.Method1();&lt;br /&gt;      BaseClass objBC = (BaseClass)objDC;&lt;br /&gt;      objDC.Method1();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;Result&lt;br /&gt;-----------------------------------&lt;br /&gt;Derived Class Method&lt;br /&gt;Base Class Method&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-472719539669297207?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/472719539669297207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/04/what-is-method-hiding.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/472719539669297207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/472719539669297207'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/04/what-is-method-hiding.html' title='What is Method Hiding?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2854872629777566869</id><published>2010-04-09T14:20:00.002-04:00</published><updated>2010-04-09T14:21:02.031-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Difference Between Function Overloading and Overriding  ?</title><content type='html'>Overloading means having functions with the same name but with different signature.Signature includes method name and Parameters. These functions can be part of base class or derived class.&lt;br /&gt; &lt;br /&gt;Whereas Overriding means changing the functionality of a method without changing the signature. We can override a funtion in base class by creating a similar function in derived class and by use virtual/override keywords.&lt;br /&gt;&lt;br /&gt;Base class method has to be marked with virtual keyword and we can override it in derived class using override keyword.&lt;br /&gt;&lt;br /&gt;Derived class method will completly overrides base class method i.e when we refer base class object created by casting derived class object a method in derived class will be called.&lt;br /&gt; &lt;br /&gt;Example:&lt;br /&gt; &lt;br /&gt;Base Class:&lt;br /&gt;-------------------------------&lt;br /&gt;public class BaseClass&lt;br /&gt;{&lt;br /&gt; public virtual void Method1()&lt;br /&gt; {&lt;br /&gt; Print("Base Class Method");&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Derived class&lt;br /&gt;---------------&lt;br /&gt;public class DerivedClass: BaseClass&lt;br /&gt;{&lt;br /&gt; public override void Method1()&lt;br /&gt; {&lt;br /&gt; Print("Derived Class Method");&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Usage&lt;br /&gt;--------------------------&lt;br /&gt;public class Sample&lt;br /&gt;{&lt;br /&gt; public void TestMethod()&lt;br /&gt; {&lt;br /&gt;      DerivedClass objDC = new DerivedClass();&lt;br /&gt;      objDC.Method1();&lt;br /&gt;      BaseClass objBC = (BaseClass)objDC;&lt;br /&gt;      objDC.Method1();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Result&lt;br /&gt;---------------------&lt;br /&gt;Derived Class Method&lt;br /&gt;Derived Class Method&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2854872629777566869?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2854872629777566869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/04/difference-between-function-overloading.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2854872629777566869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2854872629777566869'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/04/difference-between-function-overloading.html' title='Difference Between Function Overloading and Overriding  ?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-5692393207014726822</id><published>2010-04-09T14:20:00.001-04:00</published><updated>2010-04-09T14:20:23.651-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>What is the difference between int.Parse and int.TryParse methods?</title><content type='html'>int.Parse is a simple method used to convert string to integer. It throws exception when null or invalid input is provided. Hence it is slow.&lt;br /&gt;&lt;br /&gt;int.TryParse does not thow any exception instead we must describe second parameter as out  parameter which holds result. And it returns boolean value representing success or failure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-5692393207014726822?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/5692393207014726822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/04/what-is-difference-between-intparse-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5692393207014726822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5692393207014726822'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/04/what-is-difference-between-intparse-and.html' title='What is the difference between int.Parse and int.TryParse methods?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2497681959964488952</id><published>2010-04-09T14:19:00.001-04:00</published><updated>2010-04-09T14:19:54.986-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>What is the difference between System.Text.StringBuilder and System.String?</title><content type='html'>String is immutable and string builder is mutable.&lt;br /&gt;String is useful as some costly operations for copying and comparing can be omitted making program simple.&lt;br /&gt;&lt;br /&gt;However, making an object immutable is usually inappropriate if the object contains a large amount of changeable data.&lt;br /&gt;&lt;br /&gt;So String is not suggested to hold huge data as replacements or concatinations will be costly and time consuming.&lt;br /&gt; &lt;br /&gt;Copying is simple using reference. Whereas reference copying technique (Copying data without pointing to the same reference) is difficult in case of StringBuilder.&lt;br /&gt;&lt;br /&gt;String will allocate only what is needed. When we concatinate strings, it sums up the length of all and creates buffer to fit that.&lt;br /&gt;&lt;br /&gt;Whereas string builder allocates capacity of 16 initially and increases capacity in the multiples of 2.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2497681959964488952?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2497681959964488952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/04/what-is-difference-between.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2497681959964488952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2497681959964488952'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/04/what-is-difference-between.html' title='What is the difference between System.Text.StringBuilder and System.String?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-1925454598492844983</id><published>2010-04-09T14:18:00.000-04:00</published><updated>2010-04-09T14:19:14.112-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>What do you mean by String objects are immutable?</title><content type='html'>String objects are immutable as its state cannot be modified once created. &lt;br /&gt;Every time when we perform any operation like copy, replace, case conversion or when we pass a string object as a parameter to a method a new object will be created.&lt;br /&gt; &lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;String s = "ABC";&lt;br /&gt;s.Replace("A","X");&lt;br /&gt; &lt;br /&gt;Here Replace() method will not change data that s contains, instead a new string object is created to hold data "XBC" and the reference to this object is returned by Replace() method.&lt;br /&gt;&lt;br /&gt;So in order to point s to this object we need to write below line.&lt;br /&gt;s = s.Replace("A","X");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-1925454598492844983?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/1925454598492844983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/04/what-do-you-mean-by-string-objects-are.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1925454598492844983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1925454598492844983'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/04/what-do-you-mean-by-string-objects-are.html' title='What do you mean by String objects are immutable?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2746487068915257961</id><published>2010-04-08T14:20:00.000-04:00</published><updated>2010-04-08T14:25:46.864-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Best Practices'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Broken Authentication and Session Management</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link rel="File-List" href="file:///C:%5CUsers%5Cchinnu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;&lt;link rel="themeData" href="file:///C:%5CUsers%5Cchinnu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cchinnu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-IN&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="--"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face 	{font-family:"Segoe UI"; 	panose-1:2 11 5 2 4 2 4 2 2 3; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-536861953 -1073733541 9 0 479 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0cm; 	margin-right:0cm; 	margin-bottom:10.0pt; 	margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman"; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} a:link, span.MsoHyperlink 	{mso-style-priority:99; 	color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{mso-style-noshow:yes; 	mso-style-priority:99; 	color:purple; 	mso-themecolor:followedhyperlink; 	text-decoration:underline; 	text-underline:single;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	font-size:10.0pt; 	mso-ansi-font-size:10.0pt; 	mso-bidi-font-size:10.0pt; 	mso-ascii-font-family:Calibri; 	mso-fareast-font-family:Calibri; 	mso-hansi-font-family:Calibri;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 72.0pt 72.0pt 72.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:1175614637; 	mso-list-type:hybrid; 	mso-list-template-ids:-1013523118 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:Symbol;} @list l0:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:"Courier New";} @list l0:level3 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:Wingdings;} ol 	{margin-bottom:0cm;} ul 	{margin-bottom:0cm;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Calibri","sans-serif";} &lt;/style&gt; &lt;![endif]--&gt;  &lt;ul style="margin-top: 0cm;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span lang="EN-US"&gt;As HTTP      is a state less protocol and we need to maintain the information to      authenticate the users. &lt;span style=""&gt; &lt;/span&gt;Below are      the precaution the we need to follow &lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0cm;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;We can use one of the below suggested methods       for authentication&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;ul style="margin-top: 0cm;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Forms Authentication&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Windows Authentication&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Passport&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Change Password Controls&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;ul style="margin-top: 0cm;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Always we need to ask for old password and new        password.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;If we are sending reset password links to users        email we need to re-authenticate the user when he tries to change his        email address.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;All passwords should be stored in database in       encrypted format. &lt;span style=""&gt; &lt;/span&gt;Use       System.Security.Cryptography in .NET &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;  &lt;table class="MsoNormalTable" style="width: 95.56%; margin-left: 66.65pt; border-collapse: collapse; border: medium none;" width="95%" border="1" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 15pt;"&gt;   &lt;td style="border: 1pt solid rgb(187, 187, 187); background: none repeat scroll 0% 0% rgb(229, 229, 229); padding: 3pt; height: 15pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-size: 11.5pt; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;Symmetric Algorithms&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: rgb(187, 187, 187) rgb(187, 187, 187) rgb(187, 187, 187) -moz-use-text-color; background: none repeat scroll 0% 0% rgb(229, 229, 229); padding: 3pt; height: 15pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-size: 11.5pt; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;Asymmetric Algorithms&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: rgb(187, 187, 187) rgb(187, 187, 187) rgb(187, 187, 187) -moz-use-text-color; background: none repeat scroll 0% 0% rgb(229, 229, 229); padding: 3pt; height: 15pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-size: 11.5pt; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;Hash Algorithms&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 37.1pt;"&gt;   &lt;td style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187); background: none repeat scroll 0% 0% white; padding: 3pt; height: 37.1pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;DES (Data Encryption   Standard)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187) -moz-use-text-color; background: none repeat scroll 0% 0% white; padding: 3pt; height: 37.1pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;DSA (Digital Signature   Algorithm)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187) -moz-use-text-color; background: none repeat scroll 0% 0% white; padding: 3pt; height: 37.1pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;HMAC SHA1 (Hash-based   Message Authentication Code using the SHA1 hash algorithm)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 37.1pt;"&gt;   &lt;td style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187); background: none repeat scroll 0% 0% white; padding: 3pt; height: 37.1pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;TripleDES (Triple Data   Encryption Standard)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187) -moz-use-text-color; background: none repeat scroll 0% 0% white; padding: 3pt; height: 37.1pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;RSA&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187) -moz-use-text-color; background: none repeat scroll 0% 0% white; padding: 3pt; height: 37.1pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;MAC Triple DES   (Message Authentication Code using Triple DES)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 19.25pt;"&gt;   &lt;td style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187); background: none repeat scroll 0% 0% white; padding: 3pt; height: 19.25pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;Rijndael&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187) -moz-use-text-color; background: none repeat scroll 0% 0% white; padding: 3pt; height: 19.25pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187) -moz-use-text-color; background: none repeat scroll 0% 0% white; padding: 3pt; height: 19.25pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;MD5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 37.1pt;"&gt;   &lt;td style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187); background: none repeat scroll 0% 0% white; padding: 3pt; height: 37.1pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;RC2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187) -moz-use-text-color; background: none repeat scroll 0% 0% white; padding: 3pt; height: 37.1pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color rgb(187, 187, 187) rgb(187, 187, 187) -moz-use-text-color; background: none repeat scroll 0% 0% white; padding: 3pt; height: 37.1pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin: 0.75pt; line-height: 140%;"&gt;&lt;span style="font-size: 10pt; line-height: 140%; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; color: black;" lang="EN-US"&gt;SHA1, SHA256, SHA384,   SHA512&lt;br /&gt;  (Secure Hash Algorithm using various hash sizes)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-left: 72pt;"&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 72pt;"&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Source: &lt;a href="http://msdn.microsoft.com/en-us/library/aa302378.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa302378.aspx&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0cm;" type="disc"&gt;&lt;ul style="margin-top: 0cm;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Protection during transmit:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;ul style="margin-top: 0cm;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;In order to protect the passwords or        transaction session Ids it is suggested to use SSL. Try to use SSL for        all login pages so that credentials will be protected.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;SessionIds should not be transferred in        querystrings. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Session Ids should be long and complex to        decode. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Session Id can be formed by encrypting it along        with IP Address, so that we can check for the IP Address and compare it        in server side.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Session IDs must be changed when switching to        SSL, authenticating, or other major transitions. Session IDs chosen by a        user should never be accepted.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;We need to make sure that session is timed out       when user clicks on logout button.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Application timeout should be set properly so       that sessions are abandoned when user closes the browser instead of       clicking on logout.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2746487068915257961?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2746487068915257961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/04/broken-authentication-and-session.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2746487068915257961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2746487068915257961'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/04/broken-authentication-and-session.html' title='Broken Authentication and Session Management'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-7972123978237302372</id><published>2010-03-20T07:22:00.003-04:00</published><updated>2010-03-20T07:23:55.657-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><title type='text'>SharePoint Architecture Diagram</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6Mc_4x_N2E/S6SwRMnPvXI/AAAAAAAABNc/X99EeLPBikk/s1600-h/sharepoint-products-technology.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 291px;" src="http://2.bp.blogspot.com/_U6Mc_4x_N2E/S6SwRMnPvXI/AAAAAAAABNc/X99EeLPBikk/s400/sharepoint-products-technology.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5450675258515242354" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-7972123978237302372?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/7972123978237302372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/03/sharepoint-architecture-diagram.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7972123978237302372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7972123978237302372'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/03/sharepoint-architecture-diagram.html' title='SharePoint Architecture Diagram'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_U6Mc_4x_N2E/S6SwRMnPvXI/AAAAAAAABNc/X99EeLPBikk/s72-c/sharepoint-products-technology.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-6595851810283204224</id><published>2010-03-20T07:14:00.002-04:00</published><updated>2010-03-20T07:16:39.637-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><title type='text'>SharePoint Coding Practices</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link rel="File-List" href="file:///C:%5CUsers%5Cchinnu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;&lt;link rel="Edit-Time-Data" href="file:///C:%5CUsers%5Cchinnu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_editdata.mso"&gt;&lt;!--[if !mso]&gt; &lt;style&gt; v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} &lt;/style&gt; &lt;![endif]--&gt;&lt;link rel="themeData" href="file:///C:%5CUsers%5Cchinnu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cchinnu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves&gt;false&lt;/w:TrackMoves&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-IN&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="&amp;#45;-"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="0" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:1; 	mso-generic-font-family:roman; 	mso-font-format:other; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-520092929 1073786111 9 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0cm; 	margin-right:0cm; 	margin-bottom:10.0pt; 	margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman"; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} h4 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-link:"Heading 4 Char"; 	mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0cm; 	margin-bottom:3.0pt; 	margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:4; 	font-size:14.0pt; 	font-family:"Times New Roman","serif"; 	mso-fareast-font-family:Calibri; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph 	{mso-style-priority:34; 	mso-style-unhide:no; 	mso-style-qformat:yes; 	margin-top:0cm; 	margin-right:0cm; 	margin-bottom:10.0pt; 	margin-left:36.0pt; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman"; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst 	{mso-style-priority:34; 	mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-type:export-only; 	margin-top:0cm; 	margin-right:0cm; 	margin-bottom:0cm; 	margin-left:36.0pt; 	margin-bottom:.0001pt; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman"; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle 	{mso-style-priority:34; 	mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-type:export-only; 	margin-top:0cm; 	margin-right:0cm; 	margin-bottom:0cm; 	margin-left:36.0pt; 	margin-bottom:.0001pt; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman"; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast 	{mso-style-priority:34; 	mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-type:export-only; 	margin-top:0cm; 	margin-right:0cm; 	margin-bottom:10.0pt; 	margin-left:36.0pt; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman"; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} span.Heading4Char 	{mso-style-name:"Heading 4 Char"; 	mso-style-unhide:no; 	mso-style-locked:yes; 	mso-style-link:"Heading 4"; 	mso-ansi-font-size:14.0pt; 	mso-bidi-font-size:14.0pt; 	font-family:"Times New Roman","serif"; 	mso-ascii-font-family:"Times New Roman"; 	mso-fareast-font-family:Calibri; 	mso-hansi-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman"; 	mso-ansi-language:EN-US; 	font-weight:bold;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:EN-US;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:595.3pt 841.9pt; 	margin:72.0pt 72.0pt 72.0pt 72.0pt; 	mso-header-margin:35.4pt; 	mso-footer-margin:35.4pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:833836565; 	mso-list-type:hybrid; 	mso-list-template-ids:-695144026 69009409 69009411 69009413 69009409 69009411 69009413 69009409 69009411 69009413;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:Symbol; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman";} @list l1 	{mso-list-id:1145506859; 	mso-list-type:hybrid; 	mso-list-template-ids:86513234 69009409 69009411 69009413 69009409 69009411 69009413 69009409 69009411 69009413;} @list l1:level1 	{mso-level-start-at:0; 	mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:Symbol; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman";} ol 	{margin-bottom:0cm;} ul 	{margin-bottom:0cm;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin-top:0cm; 	mso-para-margin-right:0cm; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:EN-US;} &lt;/style&gt; &lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:shapedefaults ext="edit" spidmax="1028"&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:shapelayout ext="edit"&gt;   &lt;o:idmap ext="edit" data="1"&gt;  &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;Memory used by some SharePoint objects, primarily the SPSite and SPWeb objects, cannot be automatically freed up by the runtime. This can cause problems, since every such object may account for 1-2 MB. Also, these objects are often created automatically and more or less intuitively. Therefore, we need to always manually dispose some of the SharePoint objects.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;For most objects, this can be done by&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="margin-bottom: 0.0001pt; text-indent: -18pt; line-height: normal;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;" lang="EN-US"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Calling Dispose():&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt; This works in most scenarios and are considered best practice. Ideally, this should be put within a “final” clause so we are sure it is always run even if preceding code fails. &lt;i style=""&gt;If possible, use “using” instead of calling Dispose()!&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="margin-bottom: 0.0001pt; text-indent: -18pt; line-height: normal;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;" lang="EN-US"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Declaring the disposable object with “using”:&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt; This is also considered best practice. The compiler converts this into a try-catch-finally clause and puts a Dispose() call in the finally clause. “Using” is also best practice just like calling Dispose(), but because of the automatic creation of a “finally” clause, and because it makes the code slightly more readable, &lt;i style=""&gt;“using” is preferred over calling Dispose()!&lt;/i&gt; However, “using” is not applicable in all cases, such as when looping through a SPSiteCollection or SPWebCollection. The examples throughout this document use “using” whenever possible.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="margin-bottom: 0.0001pt; text-indent: -18pt; line-height: normal;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;" lang="EN-US"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Calling Close():&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt; This May work fine for many objects, but it is &lt;i style=""&gt;not&lt;/i&gt; recommended in any scenario where Dispose() or “using” is available.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h4 style="margin: 18pt 0cm 6pt 43.2pt; text-indent: -43.2pt; line-height: normal;"&gt;&lt;span lang="EN-US"&gt;Methods and properties&lt;/span&gt;&lt;/h4&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;The following declarations, methods and properties create or returns new objects which &lt;b style=""&gt;must&lt;/b&gt; be disposed before they leave their scope to avoid leaking memory. Note that when accessing properties (RootWeb, Parent, etc), new objects are automatically created.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 416.5pt; border-collapse: collapse;" width="555" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 182.6pt;" valign="top" width="243"&gt;   &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Method   or property:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 233.9pt;" valign="top" width="312"&gt;   &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;What   to dispose?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 182.6pt;" valign="top" width="243"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;new SPSite()&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 233.9pt;" valign="top" width="312"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;The returned SPSite&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 182.6pt;" valign="top" width="243"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;new SPGlobalAdmin()&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 233.9pt;" valign="top" width="312"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;The returned SPGlobalAdmin&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 182.6pt;" valign="top" width="243"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;new SPLimitedWebPartManager()&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 233.9pt;" valign="top" width="312"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;The returned SPLimitedWebPartManager&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 182.6pt;" valign="top" width="243"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;SPSite.OpenWeb()&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 233.9pt;" valign="top" width="312"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;The returned SPWeb&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 182.6pt;" valign="top" width="243"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;SPSite.SelfServiceCreateSite()&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 233.9pt;" valign="top" width="312"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;The returned SPSite&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 182.6pt;" valign="top" width="243"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;SPList.ParentWeb&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 233.9pt;" valign="top" width="312"&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span lang="EN-US"&gt;The returned   SPWeb&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 182.6pt;" valign="top" width="243"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;SPWeb.ParentWeb&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 233.9pt;" valign="top" width="312"&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span lang="EN-US"&gt;The returned   SPWeb&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 182.6pt;" valign="top" width="243"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;SPSite.RootWeb&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 233.9pt;" valign="top" width="312"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;The returned SPWeb&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 182.6pt;" valign="top" width="243"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;WebPartPage.RootWeb&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 233.9pt;" valign="top" width="312"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;The returned SPWeb&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;The following properties and methods returns references to existing objects, and &lt;b style=""&gt;must not&lt;/b&gt; be disposed.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 416.5pt; border-collapse: collapse;" width="555" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 303.1pt;" valign="top" width="404"&gt;   &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;Method   or property:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 4cm;" valign="top" width="151"&gt;   &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 303.1pt;" valign="top" width="404"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;SPControl.GetContextSite()&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 4cm;" valign="top" width="151"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 303.1pt;" valign="top" width="404"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;SPControl.GetContextWeb()&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 4cm;" valign="top" width="151"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 303.1pt;" valign="top" width="404"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;SPContext.Current.Site&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 4cm;" valign="top" width="151"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 303.1pt;" valign="top" width="404"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;SPContext.Current.Web&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 4cm;" valign="top" width="151"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 303.1pt;" valign="top" width="404"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;SPContext.Site&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 4cm;" valign="top" width="151"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0cm 5.4pt; width: 303.1pt;" valign="top" width="404"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;SPContext.Web&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 4cm;" valign="top" width="151"&gt;   &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;The lists above are far from complete; When any SharePoint object is accessed or returned, consideration should always be taken to whether the returned object should be disposed or not.&lt;/span&gt;&lt;span style="font-size: 10pt; line-height: 115%;" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style="border: 1pt solid windowtext; padding: 1pt 4pt;"&gt;  &lt;p class="MsoNormal" style="border: medium none ; padding: 0cm;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:formulas&gt;  &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;  &lt;o:lock ext="edit" aspectratio="t"&gt; &lt;/v:shapetype&gt;&lt;v:shape id="Picture_x0020_1" spid="_x0000_s1027" type="#_x0000_t75" style="'position:absolute;margin-left:-53.35pt;margin-top:21.35pt;width:39.3pt;"&gt;  &lt;v:imagedata src="file:///C:\Users\chinnu\AppData\Local\Temp\msohtmlclip1\01\clip_image001.wmz" title=""&gt;  &lt;w:wrap type="square"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="color: red;" lang="EN-US"&gt;Warning:&lt;/span&gt;&lt;/b&gt;&lt;span style="color: red;" lang="EN-US"&gt; &lt;/span&gt;&lt;span lang="EN-US"&gt;New objects are created even when not storing the reference to them. In the lines below, new objects are created, which must - but cannot - be disposed:&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="border: medium none ; padding: 0cm;"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="border: medium none ; padding: 0cm;"&gt;&lt;span lang="EN-US"&gt;str = site.&lt;b style=""&gt;OpenWeb()&lt;/b&gt;.Title;&lt;span style=""&gt;         &lt;/span&gt;// do not do this!&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="border: medium none ; padding: 0cm;"&gt;&lt;span lang="EN-US"&gt;str = site.&lt;b style=""&gt;RootWeb&lt;/b&gt;.url;&lt;span style=""&gt;                  &lt;/span&gt;// do not do this!&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style="border: 1pt solid windowtext; padding: 1pt 4pt;"&gt;  &lt;p class="MsoNormal" style="border: medium none ; padding: 0cm;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1026" type="#_x0000_t75" style="'position:absolute;margin-left:-53.35pt;"&gt;  &lt;v:imagedata src="file:///C:\Users\chinnu\AppData\Local\Temp\msohtmlclip1\01\clip_image001.wmz" title=""&gt;  &lt;w:wrap type="square"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="color: red;" lang="EN-US"&gt;Warning:&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt; Accessing RootWeb or ParentWeb on any of the SPContext subobjects, still requires RootWeb/ParentWeb to be disposed. For example,&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="border: medium none ; padding: 0cm;"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="border: medium none ; padding: 0cm;"&gt;&lt;span lang="EN-US"&gt;If you access:&lt;span style=""&gt;                                     &lt;/span&gt;SPContext.Current.Site.RootWeb&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="border: medium none ; padding: 0cm;"&gt;&lt;span lang="EN-US"&gt;You &lt;b style=""&gt;should&lt;/b&gt; dispose:&lt;span style=""&gt;                       &lt;/span&gt;SPContext.Current.Site.RootWeb&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="border: medium none ; padding: 0cm;"&gt;&lt;span lang="EN-US"&gt;But &lt;b style=""&gt;should NOT&lt;/b&gt; dispose: &lt;span style=""&gt;             &lt;/span&gt;SPContext.Current.Site&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;It is safe to dispose an object which has already been disposed. &lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="border: medium none ; width: 460.75pt; margin-left: -8.8pt; border-collapse: collapse;" width="614" border="1" cellpadding="0" cellspacing="0"&gt;  &lt;thead&gt;   &lt;tr style="page-break-inside: avoid;"&gt;    &lt;td style="border: 1pt solid black; padding: 0cm 5.4pt; width: 212.65pt;" valign="top" width="284"&gt;    &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="" lang="EN-GB"&gt;Bad practice (leaks!)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;    &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="" lang="EN-GB"&gt;Best practice (no leaks)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;   &lt;tr style="page-break-inside: avoid;"&gt;    &lt;td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 212.65pt;" valign="top" width="284"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;Public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;   &lt;/span&gt;SPSite &lt;b style=""&gt;&lt;span style="color: red;"&gt;site&lt;/span&gt;&lt;/b&gt;    = new SPSite();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;   &lt;/span&gt;SPWeb &lt;b style=""&gt;&lt;span style="color: red;"&gt;web&lt;/span&gt;&lt;/b&gt; =    site.OpenWeb();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;// ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;} // both web and site leaked!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;Public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;using&lt;/span&gt;&lt;/b&gt;    (SPSite site = new SPSite()) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;using&lt;/span&gt;&lt;/b&gt;    (SPWeb web = site.OpenWeb()) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;         &lt;/span&gt;//    ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;      &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;   &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;   &lt;tr style="page-break-inside: avoid;"&gt;    &lt;td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 212.65pt;" valign="top" width="284"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: rgb(13, 13, 13);" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: rgb(13, 13, 13);" lang="EN-GB"&gt;Public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: rgb(13, 13, 13);" lang="EN-GB"&gt;&lt;span style=""&gt;       &lt;/span&gt;// this SPSite leaks:&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: rgb(13, 13, 13);" lang="EN-GB"&gt;&lt;span style=""&gt;       &lt;/span&gt;using (SPWeb web = new &lt;/span&gt;&lt;b style=""&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: red;" lang="EN-GB"&gt;SPSite(...)&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: rgb(13, 13, 13);" lang="EN-GB"&gt;.OpenWeb(...)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: rgb(13, 13, 13);" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;// ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: rgb(13, 13, 13);" lang="EN-GB"&gt;&lt;span style=""&gt;       &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: rgb(13, 13, 13);" lang="EN-GB"&gt;} &lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: rgb(84, 141, 212);" lang="EN-GB"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;Public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;using&lt;/span&gt;&lt;/b&gt;    (SPSite site = new SPSite(...)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;using&lt;/span&gt;&lt;/b&gt;    (SPWeb web = site.OpenWeb(...)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;               &lt;/span&gt;// ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;   &lt;tr style="page-break-inside: avoid;"&gt;    &lt;td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 212.65pt;" valign="top" width="284"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;SPSite site;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;while    (...) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: red;"&gt;site &lt;/span&gt;&lt;/b&gt;=    new SPSite();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;//    ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: red;"&gt;site.Dispose();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;// every    object except the last one leaked!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;SPSite    site;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;while    (...) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;site    = new SPSite();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;//    ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;       &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;site.Dispose();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;   &lt;tr style="page-break-inside: avoid;"&gt;    &lt;td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 212.65pt;" valign="top" width="284"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;using    (SPSite site = &lt;b style=""&gt;&lt;span style="color: red;"&gt;SPContext.Current.Site&lt;/span&gt;&lt;/b&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;//    ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;} //    oups, we disposed a shared object!!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: rgb(0, 176, 80);" lang="EN-US"&gt;&lt;span style=""&gt;    &lt;/span&gt;SPSite site = SPContext.Current.Site;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-US"&gt;&lt;span style=""&gt;    &lt;/span&gt;// ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;   &lt;tr style="page-break-inside: avoid;"&gt;    &lt;td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 212.65pt;" valign="top" width="284"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;using    (SPSite site = new SPSite()) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;site.&lt;b style=""&gt;&lt;span style="color: red;"&gt;RootWeb&lt;/span&gt;&lt;/b&gt;.Url    = “New Title”;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;} // site disposed properly, but ParentWeb leaked!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;using&lt;/span&gt;&lt;/b&gt;    (SPSite site = new SPSite()) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;using&lt;/span&gt;&lt;/b&gt;    (SPWeb rootWeb = site.RootWeb) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;               &lt;/span&gt;rootWeb.title = “New Title”;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;   &lt;tr style="page-break-inside: avoid;"&gt;    &lt;td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 212.65pt;" valign="top" width="284"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public string anyMethod(SPListItem item) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;     &lt;/span&gt;// ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;return    item.ParentList.&lt;b style=""&gt;&lt;span style="color: red;"&gt;ParentWeb&lt;/span&gt;&lt;/b&gt;.Url;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;} // ParentWeb leaked!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public string anyMethod(SPListItem item) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;  &lt;/span&gt;string returnValue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;using&lt;/span&gt;&lt;/b&gt;    (SPWeb parentWeb = item.ParentList.ParentWeb) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;         &lt;/span&gt;returnValue = parentWeb.Url;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;  &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;  &lt;/span&gt;return    returnValue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;   &lt;tr style="page-break-inside: avoid;"&gt;    &lt;td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 212.65pt;" valign="top" width="284"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public string anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;return    SPContext.Current.Site.&lt;b style=""&gt;&lt;span style="color: red;"&gt;RootWeb&lt;/span&gt;&lt;/b&gt;.Url;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public string anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;  &lt;/span&gt;string    returnValue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;using&lt;/span&gt;&lt;/b&gt;    (SPWeb parentWeb = SPContext.Current.Site.RootWeb) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;         &lt;/span&gt;returnValue = parentWeb.Url;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;  &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;  &lt;/span&gt;return    returnValue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;  &lt;/thead&gt; &lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h4 style="margin: 18pt 0cm 6pt 43.2pt; text-indent: -43.2pt; line-height: normal;"&gt;&lt;span style="" lang="EN-GB"&gt;Collections&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;Many methods and properties has types of SPSiteCollection or SPWebCollection, such as:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; text-indent: -18pt; line-height: normal;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;" lang="EN-GB"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="" lang="EN-GB"&gt;SPSite.AllWebs (Field: SPWebCollection)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -18pt; line-height: normal;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;" lang="EN-GB"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="" lang="EN-GB"&gt;SPWeb.Webs (Field: SPWebCollection)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; text-indent: -18pt; line-height: normal;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;" lang="EN-GB"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="" lang="EN-GB"&gt;SPWeb.GetSubwebsForCurrentUser (Return value: SPWebCollection)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;It is easy to believe those returned collections contain existing SPSite and SPWeb objects, but these are actually created upon access on individual items. This must be remembered when using for each to loop through the collection, accessing a specific index, or adding an item to the collection – in all cases, the accessed or added object must be disposed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="border: medium none ; width: 496.2pt; margin-left: -15.9pt; border-collapse: collapse;" width="662" border="1" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid black; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;   &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="" lang="EN-GB"&gt;Bad practice (leaks!)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;   &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="" lang="EN-GB"&gt;Best practice (no leaks)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod(SPWeb web) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;foreach   (SPWeb &lt;b style=""&gt;&lt;span style="color: red;"&gt;web&lt;/span&gt;&lt;/b&gt;   in web.GetSubWebsForCurrentUser(...)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;// ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;b style=""&gt;&lt;span style="color: red;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;} // every web leaked!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod(SPWeb web) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;foreach   (SPWeb web in site.GetSubWebsForCurrentUser(...)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;//   ....&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;web.Dispose();&lt;/span&gt;&lt;/b&gt;   // we can’t use “using” here&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;      &lt;/span&gt;SPSiteCollection siteColl = ...;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: red;"&gt;siteColl[0]&lt;/span&gt;&lt;/b&gt;.Title   = “New Title”;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;} // siteColl [0] was created but never disposed!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;      &lt;/span&gt;SPSiteCollection siteColl = ...;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;using&lt;/span&gt;&lt;/b&gt;   (SPSite web = siteColl[0]) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;          &lt;/span&gt;web.Title = “New Title”;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;SPSite   site = SPControl.GetContextSite(...);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 8pt; line-height: 115%; color: red;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;site.AllWebs.Add( ... );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 248.1pt;" valign="top" width="331"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;public void anyMethod() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;SPSite   site = SPControl.GetContextSite(...);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;b style=""&gt;&lt;span style="color: rgb(0, 176, 80);"&gt;using&lt;/span&gt;&lt;/b&gt;(SPWeb   web = site.AllWebs.Add( ... )) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;        &lt;/span&gt;// ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; line-height: 115%;" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;span style="font-size: 11pt; line-height: 115%; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;;" lang="EN-GB"&gt;&lt;br /&gt; &lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h4 style="margin: 18pt 0cm 6pt 43.2pt; text-indent: -43.2pt; line-height: normal;"&gt;&lt;span style="" lang="EN-GB"&gt;Special cases&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;  &lt;p class="MsoListParagraph"&gt;&lt;span style="" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;There are a number of members and methods which will create new objects, whos disposal must be made in an unusual way. Here is a list which should cover most of them:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 451.95pt; border-collapse: collapse;" width="603" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="page-break-inside: avoid;"&gt;   &lt;td style="padding: 0cm 5.4pt; width: 147.15pt;" valign="top" width="196"&gt;   &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="" lang="EN-GB"&gt;Type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 123.95pt;" valign="top" width="165"&gt;   &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="" lang="EN-GB"&gt;Method/field&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 180.85pt;" valign="top" width="241"&gt;   &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="" lang="EN-GB"&gt;Requires&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="page-break-inside: avoid;"&gt;   &lt;td style="padding: 0cm 5.4pt; width: 147.15pt;" valign="top" width="196"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;SPLimitedWebPartManager&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 123.95pt;" valign="top" width="165"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;(Any use)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 180.85pt;" valign="top" width="241"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;(object).&lt;b style=""&gt;web&lt;/b&gt;.Dispose();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="page-break-inside: avoid;"&gt;   &lt;td style="padding: 0cm 5.4pt; width: 147.15pt;" valign="top" width="196"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;SPList&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 123.95pt;" valign="top" width="165"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;BreakRoleInheritance()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 180.85pt;" valign="top" width="241"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;(object).&lt;b style=""&gt;ParentWeb&lt;/b&gt;.Dispose();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="page-break-inside: avoid;"&gt;   &lt;td style="padding: 0cm 5.4pt; width: 147.15pt;" valign="top" width="196"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;SPWeb&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 123.95pt;" valign="top" width="165"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;LockIssue&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 180.85pt;" valign="top" width="241"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;(object).&lt;b style=""&gt;RootWeb&lt;/b&gt;.Dispose();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="page-break-inside: avoid;"&gt;   &lt;td style="padding: 0cm 5.4pt; width: 147.15pt;" valign="top" width="196"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;SPWeb&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 123.95pt;" valign="top" width="165"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;Owner&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 180.85pt;" valign="top" width="241"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;(object).&lt;b style=""&gt;RootWeb&lt;/b&gt;.Dispose();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="page-break-inside: avoid;"&gt;   &lt;td style="padding: 0cm 5.4pt; width: 147.15pt;" valign="top" width="196"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;SPWeb&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 123.95pt;" valign="top" width="165"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;SecondaryContact&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 180.85pt;" valign="top" width="241"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;(object).&lt;b style=""&gt;RootWeb&lt;/b&gt;.Dispose();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="page-break-inside: avoid;"&gt;   &lt;td style="padding: 0cm 5.4pt; width: 147.15pt;" valign="top" width="196"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;PublishingWeb&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 123.95pt;" valign="top" width="165"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;GetPublishingWebs()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 180.85pt;" valign="top" width="241"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;Each   accessed item must be disposed by calling its Close().&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="page-break-inside: avoid;"&gt;   &lt;td style="padding: 0cm 5.4pt; width: 147.15pt;" valign="top" width="196"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;PublishingWebCollection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 123.95pt;" valign="top" width="165"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;Add()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0cm 5.4pt; width: 180.85pt;" valign="top" width="241"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-GB"&gt;Returned   object must be disposed by calling Close().&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-6595851810283204224?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/6595851810283204224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/03/sharepoint-coding-practices.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6595851810283204224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6595851810283204224'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/03/sharepoint-coding-practices.html' title='SharePoint Coding Practices'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-8058015093023062769</id><published>2010-02-26T05:33:00.000-05:00</published><updated>2010-02-26T05:34:17.439-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>MS Excel like Ceiling function in c#.</title><content type='html'>- EXcel Ceiling function returns a number rounded up based on a multiple of significance.&lt;br /&gt;- Example Ceiling(41.88, 10) will give 50 and Ceiling of 41.88 to 5 will give 45.&lt;br /&gt;- Below is the C# function which gives the same result as Ceiling in MS Excel.&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;&lt;br /&gt;       public int Ceiling(double input, int ceilTo)&lt;br /&gt;        {&lt;br /&gt;            if ((input % ceilTo) != 0)&lt;br /&gt;            {&lt;br /&gt;                return ((int)(input / ceilTo) * ceilTo) + ceilTo;&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                return Convert.ToInt32(input);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-8058015093023062769?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/8058015093023062769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/02/ms-excel-like-ceiling-function-in-c.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/8058015093023062769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/8058015093023062769'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/02/ms-excel-like-ceiling-function-in-c.html' title='MS Excel like Ceiling function in c#.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-6536235147839658239</id><published>2010-02-26T05:28:00.002-05:00</published><updated>2010-02-26T05:33:03.517-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>MS Excel like Round function in c#.</title><content type='html'>1. Excel Round function behaves differently when we compare with C# Math.Round() method. &lt;br /&gt;2. Also Excel Round allows Round to -1, -2... example Round(121,-1) = 120. This is not allowed in Math.Round()&lt;br /&gt;3. Say if we want to Round 1234.5678 to nearest integer value then Math.Round() returns 1234 where as MS Excel Round gives 12345.&lt;br /&gt;4. Below is a C# function that gives similar result as MS Excel Round and also allows negative rounding.&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;   public double roundNum(double num, int place)&lt;br /&gt;   { &lt;br /&gt;     double n; &lt;br /&gt;     n = num * Math.Pow(10, place); &lt;br /&gt;     n = Math.Sign(n) * Math.Abs(Math.Floor(n + .5)); &lt;br /&gt;     return n / Math.Pow(10, place); &lt;br /&gt;   } &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note: Visual Studio 2005 allows us to mention Round Up or Round down for Math.Round() method.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-6536235147839658239?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/6536235147839658239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2010/02/ms-excel-like-round-function-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6536235147839658239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6536235147839658239'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2010/02/ms-excel-like-round-function-in-c.html' title='MS Excel like Round function in c#.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3207939254424443374</id><published>2009-11-03T10:23:00.001-05:00</published><updated>2009-11-03T10:23:47.126-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Solution: How to change css class for an element in jquery?</title><content type='html'>In order to change the CSS class applied to an element using jQuery we can use methods like &lt;br /&gt;addClass() and .removeClass()&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;$("#divId").addClass("classname");&lt;br /&gt;&lt;br /&gt;$("#divId").removeClass("classname");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;But if we want to change or toggle CSS class between two classes during some events like button click we can use method toggleClass() like below. &lt;br /&gt;&lt;br /&gt;Say on click we need to change class from "btn_submit" and "btn_submit_active" or vise versa&lt;br /&gt;if element has class "btn_submit_active" toggle to use "btn_submit". here we use toggleClass() method twise.&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;  $("#divId").toggleClass("btn_submit");&lt;br /&gt;  $("#divId").toggleClass("btn_submit_active");&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-3207939254424443374?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/3207939254424443374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/11/solution-how-to-change-css-class-for.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3207939254424443374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3207939254424443374'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/11/solution-how-to-change-css-class-for.html' title='Solution: How to change css class for an element in jquery?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-1181627868115387674</id><published>2009-10-21T16:12:00.001-04:00</published><updated>2009-10-21T16:26:32.154-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS 2010 and .NET 4.0'/><title type='text'>Visual Studio 2010 and .NET 4.0 Beta 2 Released</title><content type='html'>Visual Studio 2010 and .Net Framework 4.0 Beta 2 is released this wednesday.&lt;br /&gt;This is available for download in MSDN here &lt;a href="http://go.microsoft.com/fwlink/?LinkID=151797"&gt;http://go.microsoft.com/fwlink/?LinkID=151797&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Have a look at the style and view in the below image.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_U6Mc_4x_N2E/St9uDXtw2nI/AAAAAAAABF0/8Raz9i15-Bs/s1600-h/image_thumb_7407CD79.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 317px;" src="http://3.bp.blogspot.com/_U6Mc_4x_N2E/St9uDXtw2nI/AAAAAAAABF0/8Raz9i15-Bs/s400/image_thumb_7407CD79.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5395151882797767282" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;VS 2010 Features or Key Areas of improvements&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- Advances for ASP.NET web development&lt;br /&gt;- WPF and WinForms client development&lt;br /&gt;- SharePoint development&lt;br /&gt;- Silverlight development&lt;br /&gt;- Data development&lt;br /&gt;- Parallel computing development and &lt;br /&gt;- cloud computing development.  &lt;br /&gt;- Lot of improvements in IDE and other tools&lt;br /&gt;- Improvements in programming languages like C#&lt;br /&gt;&lt;br /&gt;- Easy to install and use TFS for version management&lt;br /&gt;&lt;br /&gt;We can have VS 2010 along with VS 2008 in our system.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-1181627868115387674?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/1181627868115387674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/10/visual-studio-2010-and-net-40-beta-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1181627868115387674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1181627868115387674'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/10/visual-studio-2010-and-net-40-beta-2.html' title='Visual Studio 2010 and .NET 4.0 Beta 2 Released'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_U6Mc_4x_N2E/St9uDXtw2nI/AAAAAAAABF0/8Raz9i15-Bs/s72-c/image_thumb_7407CD79.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2734868420226100515</id><published>2009-10-20T14:53:00.003-04:00</published><updated>2009-10-20T15:06:55.697-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>JSON Serialization in VS 2008</title><content type='html'>Say we need to convert serialize C# object to JSON string and transfer that to client side to be used in Javascript. DataContract attribute is added to a class and DataMember attribute is added for all members that need be serialized.&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;[DataContract]&lt;br /&gt; public class Employee&lt;br /&gt;    {&lt;br /&gt;        #region "Private Variables"&lt;br /&gt;        private string name = string.Empty;&lt;br /&gt;        private string id = string.Empty;&lt;br /&gt;        #endregion&lt;br /&gt;&lt;br /&gt;        #region "Public Properties"&lt;br /&gt;        [DataMember]&lt;br /&gt;        public string Name&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                return this.name;&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                this.name = value;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        [DataMember]&lt;br /&gt;        public string ID&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                return this.id;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                this.id = value;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now in order to convert the above mentioned class object to JSON string use below code.&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;Employee obj = new Employee();&lt;br /&gt;DataContractJsonSerializer serializer = new DataContractJsonSerializer(obj.GetType());&lt;br /&gt;using (MemoryStream ms = new MemoryStream())&lt;br /&gt; {&lt;br /&gt;       serializer.WriteObject(ms, obj);&lt;br /&gt;       ms.Flush();&lt;br /&gt;       byte[] bytes = ms.GetBuffer();&lt;br /&gt;      string jsonString = Encoding.UTF8.GetString(bytes, 0, bytes.Length).Trim('\0');&lt;br /&gt;      return jsonString;&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2734868420226100515?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2734868420226100515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/10/json-serialization-in-vs-2008.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2734868420226100515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2734868420226100515'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/10/json-serialization-in-vs-2008.html' title='JSON Serialization in VS 2008'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3807012902282325647</id><published>2009-10-04T04:55:00.001-04:00</published><updated>2009-10-04T05:01:09.827-04:00</updated><title type='text'>Junior Software Developer</title><content type='html'>Job Description&lt;br /&gt;&lt;br /&gt;Position: Junior Software Developer&lt;br /&gt;&lt;a href="http://www.jobthread.com/jt/jobs/widget_click.php?id=fba804&amp;job_id=320902"&gt;Apply Now&lt;/a&gt;&lt;br /&gt;Requirements:&lt;br /&gt;&lt;br /&gt;• Knowledge and experience in C# ,ASP.NET SQL and XML (academic project in NET is Must)&lt;br /&gt;• Experience working in a variety of team sizes and excellent communication and interpersonal skills.&lt;br /&gt;&lt;br /&gt;Desired Candidate Profile&lt;br /&gt;We are looking to add a Junior Developer to our Engineering Team to assist in application development and daily operations. With a variety of coding languages and platforms, it is a challenging position that requires a desire to learn.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.jobthread.com/jt/jobs/widget_click.php?id=fba804&amp;job_id=320902"&gt;For More Details Click Here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-3807012902282325647?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/3807012902282325647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/10/junior-software-developer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3807012902282325647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3807012902282325647'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/10/junior-software-developer.html' title='Junior Software Developer'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-1286504935781934771</id><published>2009-09-18T13:43:00.003-04:00</published><updated>2009-09-18T13:50:54.065-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><title type='text'>Validating textbox to not allow invalid characters in all cases.</title><content type='html'>In order to allow user to enter only certain characters in a textbox and also to control the maximum length of multiline textbox use the below function by calling it on onkeypress for a textbox.&lt;br /&gt;&lt;br /&gt; And also to handle the cases where the user copy paste the content containing the invalid characters first we will prepare the regular expression to and check for invalid characters and replace with empty (remove invalid characters from pasted content).&lt;br /&gt;&lt;br /&gt;Then we will get the pressed key and check the key pressed by user while entering the text into a textbox and check if it is in part of valid character and based on which we will stop user from entering invalid characters.&lt;br /&gt;&lt;br /&gt;One important thing here is we need to allow few keys like backspace, Arrow keys, Home, End etc.. for that we will make sure that the key pressed is not in (27, 9, 32, 8, 36, 37, 35, 13, 0).&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;function ValidateName(name,e)&lt;br /&gt;{&lt;br /&gt;        var nameRegex = /^[A-Za-z',.-]{0,50}$/;&lt;br /&gt;        while (!name.value.match(nameRegex)) &lt;br /&gt;        {&lt;br /&gt;            name.value = name.value.replace(/[^a-zA-Z,'.-]+/, "");&lt;br /&gt;        }&lt;br /&gt;        e = e || window.event;&lt;br /&gt;        var allow = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,'-";&lt;br /&gt;        var allowKeys = new Array(27, 9, 32, 8, 36, 37, 35, 13, 0);&lt;br /&gt;        var keycode = e.which || e.keyCode;&lt;br /&gt;        if (allow.indexOf(String.fromCharCode(keycode)) &lt; 0)&lt;br /&gt;        {&lt;br /&gt;             for (var i = 0; i &lt; allowKeys.length; i++)&lt;br /&gt;             {&lt;br /&gt;                 if (allowKeys[i] == keycode)&lt;br /&gt;                 {&lt;br /&gt;                       return true;&lt;br /&gt;                  }&lt;br /&gt;              }&lt;br /&gt;              return false;&lt;br /&gt;          }&lt;br /&gt;       return true;&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Call this function in onkeypress event as shown below.&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;Onkeypress = "return ValidateName(this,event)"&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-1286504935781934771?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/1286504935781934771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/09/validating-textbox-to-not-allow-invalid.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1286504935781934771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1286504935781934771'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/09/validating-textbox-to-not-allow-invalid.html' title='Validating textbox to not allow invalid characters in all cases.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-7580371018402543192</id><published>2009-08-17T11:39:00.000-04:00</published><updated>2009-08-17T11:42:00.194-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MSMQ'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>To get the count of messages in a MSMQ Queue in C#.NET</title><content type='html'>There is no direct property provided with MessageQueue class.&lt;br /&gt;We can use GetMessageEnumerator2 to get the enumerator to enumerate and get the count of number of messages present in the queue.&lt;br /&gt;&lt;br /&gt;The below code is used for getting the messages count from a transactional queues&lt;br /&gt;&lt;br /&gt;&lt;pre name='code' class='csharp'&gt;&lt;br /&gt;public static int GetMessageCount(MessageQueue messageQueue)&lt;br /&gt;{&lt;br /&gt;   int count = 0;&lt;br /&gt;   using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))&lt;br /&gt;   {&lt;br /&gt;      MessageEnumerator enumerator = messageQueue.GetMessageEnumerator2();&lt;br /&gt;      while (enumerator.MoveNext(new TimeSpan(0, 0, 0)))&lt;br /&gt;      {&lt;br /&gt;         count++;&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   return count;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The below code is used for getting the messages count from a non transactional queues&lt;br /&gt;&lt;br /&gt;&lt;pre name='code' class='csharp'&gt;&lt;br /&gt;public static int GetMessageCount(MessageQueue messageQueue)&lt;br /&gt;{&lt;br /&gt;   int count = 0;&lt;br /&gt;   using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))&lt;br /&gt;   {&lt;br /&gt;      MessageEnumerator enumerator = messageQueue.GetMessageEnumerator2();&lt;br /&gt;      while (enumerator.MoveNext(new TimeSpan(0, 0, 0)))&lt;br /&gt;      {&lt;br /&gt;         count++;&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   return count;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-7580371018402543192?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/7580371018402543192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/08/to-get-count-of-messages-in-msmq-queue.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7580371018402543192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7580371018402543192'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/08/to-get-count-of-messages-in-msmq-queue.html' title='To get the count of messages in a MSMQ Queue in C#.NET'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-1294354106862864195</id><published>2009-07-29T13:56:00.000-04:00</published><updated>2009-07-29T13:59:57.731-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight 3 Released</title><content type='html'>Silverlight 3 and associated developer tools have been released!  Visit the &lt;a href="http://silverlight.net/GetStarted/" mce_href="http://silverlight.net/GetStarted/"&gt;Silverlight Community site&lt;/a&gt; to download all you need to build great Web experiences with Silverlight 3. You can also learn more by watching the &lt;a href="http://silverlight.net/learn/videocat.aspx?cat=12" mce_href="http://silverlight.net/learn/videocat.aspx?cat=12"&gt;new videos&lt;/a&gt;, reviewing the &lt;a href="http://silverlight.net/quickstarts/" mce_href="http://silverlight.net/quickstarts/"&gt;Quickstarts&lt;/a&gt; or reading about some &lt;a href="http://www.microsoft.com/silverlight/" mce_href="http://www.microsoft.com/silverlight/"&gt;success stories&lt;/a&gt; and &lt;a href="http://silverlight.net/getstarted/silverlight3/default.aspx" mce_href="http://silverlight.net/getstarted/silverlight3/default.aspx"&gt;what is new in Silverlight 3&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-1294354106862864195?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/1294354106862864195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/07/silverlight-3-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1294354106862864195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1294354106862864195'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/07/silverlight-3-released.html' title='Silverlight 3 Released'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2562106255757292875</id><published>2009-07-17T11:33:00.000-04:00</published><updated>2009-07-17T11:34:17.112-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='Solutions For Errors'/><title type='text'>Fix: Cutom Javascript Does not load in case of Partial Postback using UpdatePanel.</title><content type='html'>When we are using Update Panel for asynchronous Partial page postback static javasctipt files will not be loaded and we may see error like "Permission Denied" or something like&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Error: Sys.ScriptLoadFailedException: The script 'http://localhost/Js/FreeTextBox/FTB-ToolbarItems.js' failed to load. Check for:&lt;br /&gt; Inaccessible path.&lt;br /&gt; Script errors. (IE) Enable 'Display a notification about every script error' under advanced settings.&lt;br /&gt; Missing call to Sys.Application.notifyScriptLoaded().&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This scenario occurs like when we are using a cutom Text Editor inside a UpdatePanel which uses Javascript and loads javascript files.&lt;br /&gt;&lt;br /&gt;In order to fix this issue.&lt;br /&gt;We need to call Sys.Application.notifyScriptLoaded() once the file is loaded for that&lt;br /&gt;Just we need to add below code at the last line of all such javascript files&lt;br /&gt;&lt;pre class="csharp" type="code"&gt;&lt;br /&gt;if (typeof(Sys) != "undefined") { if (typeof(Sys.Application) != "undefined") { Sys.Application.notifyScriptLoaded(); }}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Happy Coding....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2562106255757292875?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2562106255757292875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/07/fix-cutom-javascript-does-not-load-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2562106255757292875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2562106255757292875'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/07/fix-cutom-javascript-does-not-load-in.html' title='Fix: Cutom Javascript Does not load in case of Partial Postback using UpdatePanel.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2981407485368588805</id><published>2009-07-03T04:26:00.000-04:00</published><updated>2009-07-03T04:34:56.992-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Alternative: $(document).ready handler will not be fired on asynchronous postback.</title><content type='html'>Like in case we are using updatepanel under which we have postback button along with jQuery calender textbox.&lt;br /&gt;&lt;br /&gt;And datepicker is attached to a textbox in document ready event handler.&lt;br /&gt;&lt;br /&gt;Upon postback jquery calender will not work as $(document).ready will not be called on &lt;br /&gt;asynchronous postback&lt;br /&gt;so to make sure this to work we have to call a Javascript function after an UpdatePanel asynchronous postback using the following line&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt; Sys.WebForms.PageRequestManager.getInstance().add_endRequest(showdatepicker);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;here showdatepicker is a function which will attach jQuery datepicker to a textbox.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2981407485368588805?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2981407485368588805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/07/alternative-documentready-handler-will.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2981407485368588805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2981407485368588805'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/07/alternative-documentready-handler-will.html' title='Alternative: $(document).ready handler will not be fired on asynchronous postback.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-1395575930227566658</id><published>2009-06-07T12:21:00.015-04:00</published><updated>2009-06-08T01:53:56.630-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Fundamentals of jQuery</title><content type='html'>&lt;div class="linespacing"&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Introduction:&lt;/span&gt;&lt;br /&gt;. jQuery is a fast, lightweight JavaScript library that is CSS3 compliant and supports many browsers.&lt;br /&gt;. The jQuery framework is extensible and very nicely handles DOM manipulations, CSS, AJAX, Events and Animations.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt; Selector:&lt;/span&gt; An expression for identifying target elements on a page that allows us to easily identify and grab the elements we need.&lt;br /&gt;. jQuery focuses on retrieving elements from our HTML pages and performing operations upon them.&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;&amp;lt;button&lt;br /&gt;type="button"&lt;br /&gt;onclick="document.getElementById('xyz').style.color='red';"&amp;gt;&lt;br /&gt;Click Me&lt;br /&gt;&amp;lt;/button&amp;gt;&lt;br /&gt;&lt;br /&gt;window.onload = function() {&lt;br /&gt;document.getElementById('testButton').onclick = makeItRed;&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;. Consistent across all browsers.&lt;br /&gt;. Solves major javascript problems&lt;br /&gt;. Easily extendable&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;jQuery wrapper&lt;/span&gt;&lt;br /&gt;. To collect a group of elements, we use the simple syntax $(selector) or jQuery(selector)&lt;br /&gt;. The $() function (an alias for the jQuery() function) returns a special Java-Script object containing an array of the DOM elements that match the selector.&lt;br /&gt;. This object possesses a large number of useful predefined methods that can acton the group of elements.&lt;br /&gt;. This type of construct is termed a wrapper because it wraps the matching element(s) with extended functionality.$("div.notLongForThisWorld").fadeOut();&lt;br /&gt;. A special feature of a large number of these methods, which we often refer to as jQuery commands, is that when they’re done with their action (like a fading-out operation), they return the same group of elements, ready for another action.$("div.notLongForThisWorld").fadeOut().addClass("removed");&lt;br /&gt;&lt;br /&gt;. Along with selectors that we already know jQuery supports all selectors in CSS and also custom selectors&lt;br /&gt;Here are a few examples.&lt;br /&gt;&lt;br /&gt;$("p:even"); - This selector selects all even &amp;lt;p&amp;gt; elements.&lt;br /&gt;$("tr:nth-child(1)"); - This selector selects the first row of each table.&lt;br /&gt;$("body &gt; div"); - This selector selects direct &amp;lt;div&amp;gt; children of &amp;lt;body&amp;gt;.&lt;br /&gt;$("a[href$=pdf]"); - This selector selects links to PDF files.&lt;br /&gt;$("body &amp;gt; div:has(a)") - This selector selects direct &amp;lt;div&amp;gt; children of &amp;lt;body&amp;gt;-containing links. &lt;a href="http://docs.jquery.com/Selectors"&gt;http://docs.jquery.com/Selectors&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Utility functions&lt;br /&gt;&lt;br /&gt;. jQuery’s $() function – along with wrapping elements to be operated upon it serves as a namespace prefix for a handful of general purpose Utility functions.&lt;br /&gt;. Notation: $.trim(someString); / jQuery.trim(someString);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The document ready handler&lt;/span&gt;&lt;br /&gt;. Unobtrusive JavaScript - behavior is separated from structure&lt;br /&gt; We willll be performing operations on the page elements outside of the document markup that creates      them. In order to achieve this, we need a way to wait until the DOM elements of the page are fully loaded before those operations execute.&lt;br /&gt;. In the zebra-striping example, the entire table must load before striping can be applied.&lt;br /&gt;window.onload = function() {&lt;br /&gt;$("table tr:nth-child(even)").addClass("even");&lt;br /&gt;};&lt;br /&gt;. The onload handler for the window instance is used for this purpose, executing statements after the entire page is fully loaded.&lt;br /&gt;. Browser will delay calling onload till DOM tree is created and all images/other external&lt;br /&gt;resources are fully loaded.&lt;br /&gt;. Better approach would be to wait till DOM tree is ready and before executing scripts to apply rich behavior. jQuery provides a simple means to trigger the execution of code once the DOM tree, but not external image resources, has loaded.&lt;br /&gt;$(document).ready(function() {&lt;br /&gt;$("table tr:nth-child(even)").addClass("even");&lt;br /&gt;});&lt;br /&gt;. We can  use this technique multiple times within the same HTML document&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Extending jQuery&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;. jQuery is designed to be easily extended with additional functionality.&lt;br /&gt;. jQuery makes it easy to extend its set of functions by extending the wrapper returned when we call $().&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;$.fn.disable = function()&lt;br /&gt;{&lt;br /&gt;return this.each&lt;br /&gt;(&lt;br /&gt;function()&lt;br /&gt;{&lt;br /&gt;if (typeof this.disabled != "undefined") this.disabled = true;&lt;br /&gt;}&lt;br /&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;. Our brand new disable() method will support chaining like many of the native jQuery methods. We’ll be able to write&lt;br /&gt;$("form#myForm input.special").disable().addClass("moreSpecial");&lt;br /&gt;&lt;br /&gt;. Moreover, enterprising jQuery users have extended jQuery with sets of useful&lt;br /&gt;functions that are known as plugins.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Selecting and Manipulating elements&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt; Selectors Lab:&lt;/span&gt; http://www.aacr9.com/jquery/jQueryInAction/jqia.source/chapter2/lab.selectors.htmlhttp://www.codylindley.com/jqueryselectors/&lt;br /&gt;. Using the basic CSS selectors like &lt;br /&gt;■ a—This selector matches all link (&amp;lt;a&amp;gt;) elements.&lt;br /&gt;■ #specialID—This selector matches elements that have an id of specialID.&lt;br /&gt;■ .specialClass—This selector matches elements that have the class of specialClass.&lt;br /&gt;■ a#specialID.specialClass—This selector matches links with an id of specialID  and a class of specialClass.&lt;br /&gt;■ p a.specialClass—This selector matches links with a class of specialClass declared within &amp;lt;p&amp;gt; elements.&lt;br /&gt;&lt;br /&gt;. To select elements using jQuery, we wrap the selector in $() Ex: $("p a.specialClass")&lt;br /&gt;. With a few exceptions , jQuery is fully CSS3 compliant.&lt;br /&gt;. jQuery doesn’t depend upon the CSS implementation of the browser it’s running within. Even if the browser doesn’t implement a standard CSS selector correctly, jQuery will correctly select elements according to the rules of the World Wide Web Consortium (W3C) standard.&lt;br /&gt;. Using child, container, and attribute selectors&lt;br /&gt;&lt;br /&gt;. Only a single level of nesting is supported. Although it’s possible to nest one level , such as foo:not(bar:has(baz)) , li:not(:has(a)) additional levels of nesting, such as foo:not(bar:has(baz:eq(2))) aren’t supported.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt; Selecting by position:&lt;span style="font-weight:bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;. Sometimes, we’ll need to select elements by their position on the page or in relation to other elements. We might want to select the first link on the page, or every other paragraph, or the last list item of each list.&lt;br /&gt;. For more advanced selectors, jQuery uses the next generation of CSS supported by Mozilla Firefox, Internet Explorer 7, Safari, and other modern browsers.&lt;br /&gt;. These advanced selectors include selecting the direct children of some elements, elements that occur after other elements in the DOM, and elements with attributes matching certain conditions.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SiwPK1yqkmI/AAAAAAAAA8A/YXr6scm0DTk/s1600-h/basicselectors1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SiwPK1yqkmI/AAAAAAAAA8A/YXr6scm0DTk/s400/basicselectors1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5344663536694628962" /&gt;&lt;/a&gt;&lt;br /&gt;. Only a single level of nesting is supported. Although it’s possible to nest one level , such as foo:not(bar:has(baz)) , li:not(:has(a)) additional levels of nesting, such as foo:not(bar:has(baz:eq(2))) aren’t supported.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt; Selecting by position:&lt;/span&gt;&lt;br /&gt;. Sometimes, we’ll need to select elements by their position on the page or in relation to other elements. We might want to select the first link on the page, or every other paragraph, or the last list item of each list.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SiwPnNE6wpI/AAAAAAAAA8I/qtnP6l4ARvg/s1600-h/basicselectors.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 224px;" src="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SiwPnNE6wpI/AAAAAAAAA8I/qtnP6l4ARvg/s400/basicselectors.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5344664023981539986" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SiwP3ZRHeTI/AAAAAAAAA8Q/Su_jm1G4bCU/s1600-h/basicselectors1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 130px;" src="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SiwP3ZRHeTI/AAAAAAAAA8Q/Su_jm1G4bCU/s400/basicselectors1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5344664302131837234" /&gt;&lt;/a&gt;&lt;br /&gt;. The nth-child selector starts counting from 1, whereas the other selectors start counting from 0.&lt;br /&gt;. :eq (absolute position selector) is 0-based, but :nth-child is 1-based.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SiwQnMakHXI/AAAAAAAAA8g/6IE26hEUZEQ/s1600-h/basicselectors.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 382px;" src="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SiwQnMakHXI/AAAAAAAAA8g/6IE26hEUZEQ/s400/basicselectors.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5344665123315522930" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6Mc_4x_N2E/SiwRTZfqKHI/AAAAAAAAA8w/hCA8DEdmArM/s1600-h/basicselectors.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 112px;" src="http://2.bp.blogspot.com/_U6Mc_4x_N2E/SiwRTZfqKHI/AAAAAAAAA8w/hCA8DEdmArM/s400/basicselectors.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5344665882740795506" /&gt;&lt;/a&gt;&lt;br /&gt;. Ex: To select only enabled checked checkboxes  :checkbox:checked:enabled&lt;br /&gt;&lt;br /&gt;. Using the :not filter – To inverse all these filters To select non-check box &amp;lt;input&amp;gt; elements, we use&lt;br /&gt;input:not(:checkbox)&lt;br /&gt;. We can apply the :not filter to filter selectors, but not to find selectors. The&lt;br /&gt;Selector div p:not(:hidden)  is a perfectly valid selector, but div :not(p:hidden) isn’t.&lt;br /&gt;. Along with  all these selectors we have a plugin “Basic Xpath”. This plugin adds in basic XPath selector functionality&lt;br /&gt;. Plug-in supports /, //, *,[@p=value],[@p], position()&lt;br /&gt;$("&amp;lt;div&amp;gt;Hello&amp;lt;/div&amp;gt;")&lt;br /&gt;. This expression creates a new &amp;lt;div&amp;gt; element ready to be added to the page&lt;br /&gt;. We can run any jQuery commands that we could run on wrapped element sets of existing elements on the newly created fragment.&lt;br /&gt;. $("&amp;lt;div class=‘test'&amp;gt;I have foo!&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;I don't&amp;lt;/div&amp;gt;").filter(".test").click(function() {&lt;br /&gt;alert("I'm foo!");}).end().appendTo("#someParentDiv");&lt;br /&gt;. We can get a lot accomplished without writing a lot of script.&lt;br /&gt;&lt;br /&gt;. Determining the size of the wrapped set  $('a').size()&lt;br /&gt;. Obtaining elements from the wrapped set jQuery allows us to treat the wrapped set as a JavaScript array, we can use simple array indexing to obtain any element in the wrapped list by position.  $('img[alt]')[0]  or  $('img[alt]').get(0) Ex: var allLabeledButtons = $('label+button').get();&lt;br /&gt;. Adding more elements to the wrapped setLet’s say that we want to match all&lt;img src="" /&gt; elements that have either an alt or a title attribute.$('img[alt],img[title]') or $('img[alt]').add('img[title]')$('img[alt]').add(someElement)$('p').add('&amp;lt;div&amp;gt;Hi there!&amp;lt;/div&amp;gt;')&lt;br /&gt;. $('img[alt]').addClass('thickBorder').add('img[title]‘).addClass('seeThrough')&lt;br /&gt;not() method to remove elements from the wrapped set anywhere within a jQuery chain of commands - $('img[title]').not('[title*=puppy]')&lt;br /&gt;the selectors we can pass to the not() method are limited to filter&lt;br /&gt;. Expressions that omit any element reference (allowing it to imply all element types).&lt;br /&gt;&lt;br /&gt;. In case we want to filter the wrapped set in ways that are difficult or impossible to express with a selector expression. Instead of iterating through all the elements we can use jQuery’s filter() &lt;br /&gt;. The filter() method, when passed a function, invokes that function for each wrapped element and removes any element whose function invocation returns the value false.&lt;br /&gt;. Each invocation has access to the current wrapped element via the function context (this) in the body of the filtering function. Any element that returns an invocation of false is removed from the set.&lt;br /&gt;Ex : $('td').filter(function(){return this.innerHTML.match(/^\d+$/)})&lt;br /&gt;. The filter() method can also be used with a passed selector expression that conforms to the same constraints that we described earlier for the not() method, namely, filter selectors with an implied element type.&lt;br /&gt;$('img').addClass('seeThrough').filter('[title*=dog]‘).addClass('thickBorder')&lt;br /&gt;. Subsets of the wrapped set To obtain a subset of the wrapped set, based on the position of elements within the set.&lt;br /&gt;. slice(begin,end)&lt;br /&gt;. To grab elements from the end of the wrapped set, the statement - $('*').slice(4);&lt;br /&gt;. Getting wrapped sets using relationships These methods give us a large degree of freedom to select elements from the DOM, based on relationships to the other DOM elements.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SiwSEk2LJhI/AAAAAAAAA84/sdRL5vtVmzk/s1600-h/basicselectors.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 230px;" src="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SiwSEk2LJhI/AAAAAAAAA84/sdRL5vtVmzk/s400/basicselectors.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5344666727601612306" /&gt;&lt;/a&gt;&lt;br /&gt;. The find() method lets us search through an existing wrapped set and returns a new set that contains all elements that match a passed selector expression. - wrappedSet.find('p cite')&lt;br /&gt;. jQuery also provides a method to find elements that contain a specified string. - $('p').contains('Lorem ipsum')&lt;br /&gt;. The is() method returns true if at least one element matches the selector, and false if not . - is(selector)&lt;br /&gt;. The easiest way to inspect or modify the component elements of a matched set is with the each() command.&lt;br /&gt;Ex: $('img').each(function(n)&lt;br /&gt;{&lt;br /&gt; this.alt='This is image['+n+'] with an id of '+this.id;&lt;br /&gt;});&lt;br /&gt;. To collect all values for a specific property into an array using each(), as follows:&lt;br /&gt;var allAlts = new Array();&lt;br /&gt;$('img').each(function(){&lt;br /&gt;allAlts.push(this.alt);&lt;br /&gt;});&lt;br /&gt;. var altValue = $('#myImage')[0].alt;&lt;br /&gt;.  attr(name) - To obtain the values assigned to the specified attribute for the first element in the matched set. - $("#myImage").attr("custom")&lt;br /&gt;. Setting attribute values: attr(name,value)&lt;br /&gt;. Setting multiple attributes at a time: attr(attributes)   Ex:  $('input').attr({ value: '', title: 'Please enter a value' });&lt;br /&gt;. Removing Attributes: removeAttr(name)&lt;br /&gt;. jQuery attr() normalized-access names&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SiwSpfm4TMI/AAAAAAAAA9A/4lQ8x9q0Q0A/s1600-h/basicselectors.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 161px;" src="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SiwSpfm4TMI/AAAAAAAAA9A/4lQ8x9q0Q0A/s400/basicselectors.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5344667361850444994" /&gt;&lt;/a&gt;&lt;br /&gt;.Changing Element Styling:&lt;br /&gt;addClass(names)&lt;br /&gt;removeClass(names)&lt;br /&gt;toggleClass(name)&lt;br /&gt;css(name,value) – Applying Styles directly onto the elements&lt;br /&gt;css(properties)&lt;br /&gt;css(name)&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-1395575930227566658?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/1395575930227566658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/06/fundamentals-of-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1395575930227566658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1395575930227566658'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/06/fundamentals-of-jquery.html' title='Fundamentals of jQuery'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SiwPK1yqkmI/AAAAAAAAA8A/YXr6scm0DTk/s72-c/basicselectors1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-6334783795958178415</id><published>2009-05-24T09:49:00.003-04:00</published><updated>2009-05-24T09:56:23.037-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><title type='text'>Rounding a number after decimal point using Vb script Format functions</title><content type='html'>Below is the function in the vbscript which will round the number up to two digits after decimal number.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;Script language="VBScript"&amp;gt;&lt;br /&gt;&lt;br /&gt;Function Roundnumber(Decnumber,numlength)&lt;br /&gt;    &lt;br /&gt;    Roundnumber = FormatCurrency(Decnumber,numlength,,,0)     &lt;br /&gt;&lt;br /&gt;    Roundnumber = FormatNumber(Decnumber,numlength,,,0)   &lt;br /&gt;&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&amp;lt;/Script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;Script language="JavaScript"&amp;gt;&lt;br /&gt;&lt;br /&gt;function roundnumjavascript(number,length)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;       document.getElementById('textBox1').value= Roundnumber(number,length)&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;/Script&amp;gt;&lt;br /&gt;&lt;br /&gt;In HTML&lt;br /&gt;&lt;br /&gt;&amp;lt;input type="text" id="textBox1"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type="button" id="btnround" value="Roundnum" onclick="roundnumjavascript(document.getElementById('textBox1').value,2);"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-6334783795958178415?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/6334783795958178415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/05/rounding-number-after-decimal-point.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6334783795958178415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6334783795958178415'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/05/rounding-number-after-decimal-point.html' title='Rounding a number after decimal point using Vb script Format functions'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-9067071924082183882</id><published>2009-05-24T09:28:00.003-04:00</published><updated>2009-05-24T09:50:41.394-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><title type='text'>Calling VB Script Function from inside a Javascript function.</title><content type='html'>Calling VB script function in javascript is as simple as calling another javascript function. &lt;br /&gt;&lt;br /&gt;Let us see with a simple example.&lt;br /&gt;First we will create a function in VB Script to add two numbers.&lt;br /&gt;&lt;br /&gt;Call this VB Script function from javascript &lt;br /&gt;&lt;br /&gt;Following is html page to input values to add and shows the result in other &lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script language="VbScript"&amp;gt;&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;      Function Add(a,b)&lt;br /&gt;&lt;br /&gt;            Add=CInt(a)+CInt(b)&lt;br /&gt;&lt;br /&gt;      End Function&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&amp;lt;script language="JavaScript"&amp;gt;&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;      function callingVbfun()&lt;br /&gt;&lt;br /&gt;     {&lt;br /&gt;&lt;br /&gt;          document.getElementById('txtResult').value= Add(document.getElementById('txtNumber1').value,document.getElementById('txtNumber2').value)&lt;br /&gt;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;input type-"text" id="txtNumber1"/&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;input type-"text" id="txtNumber2"/&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;input type-"text" id="txtResult"/&amp;gt;&lt;br /&gt;&lt;br /&gt;     &amp;lt;input type-"button" id="btn" value="Add" onclick="callingVbfun()"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-9067071924082183882?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/9067071924082183882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/05/calling-vb-script-function-from-inside.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/9067071924082183882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/9067071924082183882'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/05/calling-vb-script-function-from-inside.html' title='Calling VB Script Function from inside a Javascript function.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-4312238493092440129</id><published>2009-05-14T10:01:00.002-04:00</published><updated>2009-05-14T10:03:19.156-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><title type='text'>How to call multiple Javascript methods on window load using onload handler</title><content type='html'>We know that when we cannot assign mutilple functions to onload handler in javascript. It will just ovveride the previous function.&lt;br /&gt;&lt;br /&gt;In order to set mutliple functions we need to consider Array and add all methods to that array.(functions can be added in Page or Usercontrol).&lt;br /&gt;&lt;br /&gt;First Create onloadManager array.&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;if (!window.onloadManager)&lt;br /&gt;{&lt;br /&gt;window.onloadManager = new Array();&lt;br /&gt;&lt;br /&gt;//add existing method to array&lt;br /&gt;&lt;br /&gt;if (window.onload) {window.onloadManager[0] = window.onload;}&lt;br /&gt;&lt;br /&gt;//Loop through array and execute each on onload&lt;br /&gt;window.onload = function() { &lt;br /&gt;for (index in window.onloadManager) { window.onloadManager[index](); }&lt;br /&gt;};&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Adding functions to onloadmanager array.&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;window.onloadManager[window.onloadManager.length] = function()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;alert('function1 added');&lt;br /&gt;&lt;br /&gt;}; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Say in other user control on same page we add one more function.&lt;br /&gt;&lt;pre class="csharp" name="code"&gt;&lt;br /&gt;window.onloadManager[window.onloadManager.length] = function()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;alert('function2 added');&lt;br /&gt;&lt;br /&gt;}; &lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-4312238493092440129?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/4312238493092440129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/05/how-to-call-multiple-javascript-methods.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4312238493092440129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4312238493092440129'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/05/how-to-call-multiple-javascript-methods.html' title='How to call multiple Javascript methods on window load using onload handler'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-9201356174153254136</id><published>2009-04-22T08:27:00.002-04:00</published><updated>2009-04-22T08:30:27.191-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 3.5'/><title type='text'>Migrating from VS2005,.NET Framework 2.0 to VS2008 and .NET Framework 3.5</title><content type='html'>When we open our solution developed in Visual Studio 2005 and .Net 2.0 it will automatically converts the solution and all projects under it, to be compatible with Visual Studio 2008 and to use new compiler. A wizard  will be displayed during this process.&lt;br /&gt;&lt;br /&gt;Then we can target each project under solution to .NET Framework 3.5/3.0/2.0 by changing the Target Framework property for a project.&lt;br /&gt;&lt;br /&gt;Once converted to Visual Studio 2008, we cannot open it in previous versions.&lt;br /&gt;&lt;br /&gt;Based on conversion report we may have to change few classes and used namespaces.&lt;br /&gt;&lt;br /&gt;As .Net Framework 3.5 is built on 2.0 we cannot remove .NET 2.0 Framework in the web server.&lt;br /&gt;No need to change anything in IIS while deploying.&lt;br /&gt;&lt;br /&gt;However even if our project is developed in VS2008 by targeting to .NET Framework 2.0 while deploying in the server we need to install .NET Framework 3.5 as it needs new compiler.&lt;br /&gt;&lt;br /&gt;Also Following should be taken care while converting.&lt;br /&gt;&lt;br /&gt;• If we are doing this conversion in Vista we need to open VS2008 as an Administrator.&lt;br /&gt;• If an application includes controls or extenders from the ASP.NET AJAX Control Toolkit, while upgrading to the latest version of the .NET Framework. we must upgrade to a new version of the toolkit in order to run with the .NET Framework 3.5.&lt;br /&gt;• If existing environment includes a source-control system, all necessary files will be automatically checked out by the conversion wizard. The conversion will fail if a file cannot be exclusively checked out.&lt;br /&gt;• A project must be closed and reopened after its target .NET version has been changed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have tried converting few sample projects and I have not faced any issues.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-9201356174153254136?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/9201356174153254136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/04/migrating-from-vs2005net-framework-20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/9201356174153254136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/9201356174153254136'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/04/migrating-from-vs2005net-framework-20.html' title='Migrating from VS2005,.NET Framework 2.0 to VS2008 and .NET Framework 3.5'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-608796600518404004</id><published>2009-04-21T01:56:00.001-04:00</published><updated>2009-04-21T08:10:23.968-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Overloading and Overriding - Method Vs Author</title><content type='html'>A method overriden has exactly the same skeleton as the method in the parent class. Same Access modifier, same type of return value, same name and same arguments. Only thing that can be changed is the inner content of the method. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Method: OK Boss !! I won't mind if you change my main code , your wish ...&lt;br /&gt;Author: Hey method , don't take it to heart,we just do it only when we inhert and override a method, only when its required. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Method: How about the option of having so many Constructors and the Constructor is chosen based on the arguments passed. &lt;br /&gt;&lt;br /&gt;Can't method have that option.I too want to provide the option of giving different methods and the user can chose the method to use based on the arguments passed. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Author: Yes, we can do that. That is called OVERLOADING. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Method: Overloading ... hmm..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Author : You can have many methods with the same name but with different arguments.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Method: cool ... &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Author : yes it is .. While Overloading the most important rule is you should have the same method name. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Method: Yes, its obvious. Similar to the constructor. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Author: There are more, You cannot just change the return type. You should change the argument list which is to be passed. If you don't change the  argument list, it becomes the overriding. You have to give different arguments. You can give different return types, it is not compulsory , you can either change it or retain the same return type. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Method: Too many rules all the time. Not fair..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Author:  yes. Life is not fair, get used to it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Method: Don't copy Bill Gate's quote. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Author:  hehe ..I am just reminding you. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We don't have too many rules here. &lt;br /&gt;A method has the following parts which can be changed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;access modfiier&amp;gt; &amp;lt;return type&amp;gt; &amp;lt;methodname&amp;gt; ( &amp;lt;argument list&amp;gt; ) {&lt;br /&gt;// method content&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If we change the method name, its all together new method ,so no headaches. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If we change the argument list keeping all others the same( except the content , it should be changed all the time), it is method overriding. Overriding can be done only in Inheritance.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If we try to change any others, like return type , argument list it is called method overloading. It  can be done in any class, need not be Inheritance or others.Access modifiers can be changed while overloading. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Method: ok ,convinced.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-608796600518404004?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/608796600518404004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/04/overloading-method-vs-author.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/608796600518404004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/608796600518404004'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/04/overloading-method-vs-author.html' title='Overloading and Overriding - Method Vs Author'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-5612733447607710399</id><published>2009-04-20T03:20:00.000-04:00</published><updated>2009-04-20T03:21:22.017-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><title type='text'>Detecting IE6, IE7 and Google chrome in Javascript.</title><content type='html'>Some times we need to detect the browser used by end user in Javascript and wants to apply browser specific actions like styles javascript. As the way javascript and styles is interpreted is different in different browser.&lt;br /&gt;&lt;br /&gt;In order to detect IE6 in javascript you can use the below code&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;    var IE6 = false /*@cc_on || @_jscript_version &lt; 5.7 @*/;&lt;br /&gt;    if(IE6)&lt;br /&gt;    {&lt;br /&gt;        // Implement browser specific activities for IE6&lt;br /&gt;    }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In order to detect IE7 in javascript you can use the below code&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt;  if((document.all))&lt;br /&gt;     {&lt;br /&gt;       if((navigator.appVersion.indexOf("MSIE 7.&amp;quot;)!=-1))&lt;br /&gt;         {&lt;br /&gt;    // Implement browser specific activities for IE7&lt;br /&gt;         }&lt;br /&gt;     } &lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In order to detect Google Chrome in javascript you can use the below code&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt;   var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') &gt; -1;&lt;br /&gt;   if(is_chrome)&lt;br /&gt;   {&lt;br /&gt; // Implement browser specific activities for Google Chrome&lt;br /&gt;   }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-5612733447607710399?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/5612733447607710399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/04/detecting-ie6-ie7-and-google-chrome-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5612733447607710399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5612733447607710399'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/04/detecting-ie6-ie7-and-google-chrome-in.html' title='Detecting IE6, IE7 and Google chrome in Javascript.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3465184680455298310</id><published>2009-04-20T03:12:00.000-04:00</published><updated>2009-04-20T03:15:20.426-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>How to call Javascript function on onchange event of Dropdownlist before server side event handler is called.</title><content type='html'>To call Javascript function on onchange event of Dropdownlist before server side event handler for SelectedIdexChanged event is called.&lt;br /&gt;&lt;br /&gt;This is some what tricky as mentioning onchange = "return function(this);" in .aspx page will not work properly.&lt;br /&gt;&lt;br /&gt;In this case we need to add 'if' codition as below&lt;br /&gt;&lt;br /&gt;in .aspx page for dropdown list mention onchange as &lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;onchange = "if (!confirmSubmit()){return};"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;or else you can add attributes for dropdownlist as below&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;Dropdownlist1.Attributes.Add(&lt;br /&gt;"onchange", "if (!confirmSubmit()){return};");&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-3465184680455298310?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/3465184680455298310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/04/how-to-call-javascript-function-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3465184680455298310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3465184680455298310'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/04/how-to-call-javascript-function-on.html' title='How to call Javascript function on onchange event of Dropdownlist before server side event handler is called.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-4060751640062674049</id><published>2009-04-08T13:53:00.002-04:00</published><updated>2009-04-08T13:56:49.232-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 3.5'/><title type='text'>Moving VIEWSTATE and other hidden fields to the bottom of the page in ASP.NET 3.5 SP1 and 2.0</title><content type='html'>&lt;br/&gt;&lt;br /&gt;As we know that state of all ASP.NET controls is maintained __VIEWSTATE hidden field in encrypted format.&lt;br /&gt;By default this _VIEWSTATE HTML hidden field will be rendered at the top inside body tag (just below form tag). If we have lot of control data to be stored in ViewState then length of the viewstate will be more hence page will take time to load and also reduces rank in search engine as all the junk will be loaded at the top of actual content.&lt;br /&gt;So to make web page more search engine friendly and to make page render faster we may wish to move this __VIEWSTATE to the bottom of the page.&lt;br /&gt;&lt;br /&gt;In this manner we can make our web page more search engine friendly by moving ViewState to the bottom of the page and not to gunk up search engines as the real content will be at the top of the HTMl page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To achieve this in ASP.NET 2.0 we need to tweek the way the page is render by overriding the page Rrender() method and move the _VIEWSTATE from its default location at the top of the page to the bottom of the page. This results in better search engine spidering.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;protected override void Render(System.Web.UI.HtmlTextWriter writer)&lt;br /&gt;    {&lt;br /&gt;        System.IO.StringWriter stringWriter = new System.IO.StringWriter();&lt;br /&gt;        HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);&lt;br /&gt;        base.Render(htmlWriter);&lt;br /&gt;        string html = stringWriter.ToString();&lt;br /&gt;        int StartPoint = html.IndexOf("&amp;lt;input type=\"hidden\" name=\"__VIEWSTATE\"");&lt;br /&gt;        if (StartPoint &amp;gt;= 0) //does __VIEWSTATE exist? &lt;br /&gt;        {&lt;br /&gt;            &lt;br /&gt;            int EndPoint = html.IndexOf("/&amp;gt;", StartPoint) + 2;&lt;br /&gt;            string ViewStateInput = html.Substring(StartPoint, EndPoint - StartPoint);&lt;br /&gt;            html = html.Remove(StartPoint, EndPoint - StartPoint);&lt;br /&gt;            int FormEndStart = html.IndexOf("&amp;lt;/form&amp;gt;") - 1;&lt;br /&gt;            if (FormEndStart &amp;gt;= 0)&lt;br /&gt;            {&lt;br /&gt;                html = html.Insert(FormEndStart, ViewStateInput);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        writer.Write(html);&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;&lt;br /&gt;Instead of overriding Render() of all pages its better to do this in the Base class or in the master page.&lt;br /&gt;&lt;br /&gt;However there is a problem when user clicks on a button before the page is loaded then ViewState will not be available to the server. It will not be able to process the ViewState.&lt;br /&gt;&lt;br /&gt;In ASP.NET 3.5 SP1&lt;br /&gt;&lt;br /&gt;In order to render __EVENTTARGET, __EVENTVALIDATION, __EVENTARGUMENT etc at the bottom of the page we need to set renderAllHiddenFieldsAtTopOfForm to false in web.config which true is by default.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&amp;lt;pages renderAllHiddenFieldsAtTopOfForm="false" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note: This will not move __VIEWSTATE to the bottom of the page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-4060751640062674049?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/4060751640062674049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/04/moving-viewstate-and-other-hidden.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4060751640062674049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4060751640062674049'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/04/moving-viewstate-and-other-hidden.html' title='Moving VIEWSTATE and other hidden fields to the bottom of the page in ASP.NET 3.5 SP1 and 2.0'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-6625851314569394984</id><published>2009-03-25T12:27:00.001-04:00</published><updated>2009-03-25T12:30:23.510-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>What is the use of MaintainScrollPositionOnPostBack property of a aspx Page.</title><content type='html'>&lt;br/&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;MaintainScrollPositionOnPostBack &lt;/span&gt;property for Page directive is used to get or set a value(true or false) whether to return the user to the same scroll position in the browser after postback.&lt;br /&gt; &lt;br /&gt;Generally when a web page is posted to the server the user will be ruturned to the top position of the page and not to the position the user is at when post back is happened.&lt;br /&gt; &lt;br /&gt;When the MaintainScrollPositionOnPostback() property for a page is set to true, the user is instead returned to the position he is on during the postback. This is usefull if the page is very big and needs to be scrolled for submitting.&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&amp;lt;asp:Page MaintainScrollPositionOnPostBack="True|False" /&amp;gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-6625851314569394984?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/6625851314569394984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/03/what-is-use-of-maintainscrollpositionon.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6625851314569394984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6625851314569394984'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/03/what-is-use-of-maintainscrollpositionon.html' title='What is the use of MaintainScrollPositionOnPostBack property of a aspx Page.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2801193861751163019</id><published>2009-03-19T13:20:00.002-04:00</published><updated>2009-03-19T13:29:14.153-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Others'/><title type='text'>SCRUM-An agile product development methodology</title><content type='html'>&lt;strong&gt;Overview&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Scrum&lt;/strong&gt; is an agile product development methodology. Though the agile product management phenomenon may seem new, Scrum has been around since 1986 and is used by world class organizations such as Microsoft , Google, IBM, Federal Reserve Bank, Yahoo!, Siemens, Sun and a host of smaller companies.&lt;br /&gt;&lt;br /&gt;Scrum differs from other agile methodologies as it focuses teams and product over individuals and code. Scrum practitioners laud Scrum’s ability to product ‘hyper productive teams’ and release mature product while still being nimble. I believe, when properly applied, Scrum captures what it means to be a startup that aims to penetrate the most conservative environments; nimble enterprise.&lt;br /&gt;&lt;br /&gt;The 41st Parameters adoption of Scrum as its Product Development methodology shows its commitment to Total Quality Product as well as releasing total enterprise product. To showcase and model the adoption, the engineering management team will conduct itself in a Scrum fashion.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Process Visibility&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Anyone in the organization can witness an active sprint and some actions associated with Scrum by wandering over to 213. You might see a several people huddled around some cork boards, or a mixture of QA, BA and dev huddled around a single computer. What you are witnessing is the new product development methodology in action.&lt;br /&gt;&lt;br /&gt;When we move to the new building there will be a Scrum room with cork board walls for Sprints, broken down by features and tasks. This room will also hold the daily stand-ups and several other events that Scrum introduces. The Scrum/Projects room is a showcase of the current efforts. Using cork board and index cards, any person in the company can get an accurate view of the ongoing tasks as defined by the teams. This is a physical representation of what will be tracked digitally via the dashboards.&lt;br /&gt;&lt;br /&gt;This is to introduce a more visible product development organization. Product will still maintain the digital dashboards to which everyone is accustomed, but these extra steps serve to reinforce the active Sprint.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ROLES&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Any new methodology introduces terms, roles and parlance needed to accurately communicate with its practitioners. Scrum is not different. These are the major roles that Scrum introduces.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Scrum Master&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Does whatever is needed to keep the team producing! Possibly the most critical role to Scrum, the Scrum Master is NOT a manager, delegator of tasks or someone in charge of people. The Scrum Master removes obstacles, gets coffee, keeps the team on process and overall is the grease and glue of the scrum team.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Product Owner&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Responsible for achieving maximum business value by taking all inputs into what should be produced as the product. Inputs include customers, SMEs, end-users, team members and stakeholders.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Product Support and Release Management&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;While not explicit to Scrum, PS/RM is an important role that we need to ensure enterprise product.&lt;br /&gt;&lt;br /&gt;Product support should be the first line of defense to the scrum teams. Product support should deal with all defects and issues coming from the field and should verify and validate those issues. Once defects are identified, they should be added to the backlog via the Product Owner. Product Support should also provide ALL details related to recreating the defect and making it easy to the scrum team to fix the defect.&lt;br /&gt;&lt;br /&gt;If a critical defect is detected, the Product Owner should be notified and it should go into the sprint iteration. Each sprint iteration should have an item named ‘Product Support’ and it should be given some predefined hour amount to accommodate critical defects. This is a guessing game at first, but we should get better at the number of hours devoted to product support each iteration.&lt;br /&gt;The Product Owner and Product Support are the keys to making support a success.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;TEAM &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Typically 5-10 people, the team builds the product. This team should function as one unit giving their estimates together, working together and sitting together. Scrum works best when everyone is viewed as a team and people and not in their "roles".&lt;br /&gt;&lt;br /&gt;Team typically consists of the following skill sets.&lt;br /&gt;• BA&lt;br /&gt;• Dev&lt;br /&gt;• QA&lt;br /&gt;• Other&lt;br /&gt;&lt;br /&gt;The ideal Scrum process is custom to your environment as long as the spirit of scrum is honored. This means that we can put signoffs and specific gating points in the process if we so choose. We can define what it means to be “done”. It is just that “done” is what is important.&lt;br /&gt;&lt;br /&gt;Also, and this is critical. The team wins or loses. The team succeeds or fails. If PN of FN fails for a particular reason, the whole team fails. This should illustrate that it is not just QA or Dev or Product, but it is in fact a team effort. We should reward as a team, praise as a team and also criticize as a team.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Executives&lt;/strong&gt;&lt;br /&gt;Support the team by respecting the rules and process of Scrum, remove impediments and make their experience and expertise available to the team.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sprint Timeline&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Product Backlog (General)&lt;/strong&gt;&lt;br /&gt;Will include a variety of items, such as features (enable all users to search by PCPrint), development requirements (refactor risk engine to allow easy updates of algorithms), exploratory work (investigate db move to Oracle) and known bugs.&lt;br /&gt;&lt;br /&gt;The Product Backlog is owned and continuously updated by the Product Owner to reflect changes needed or requested by customers, new ideas, competitive moves or technical challenges.&lt;br /&gt;&lt;br /&gt;Items in the backlog vary in size and effort. Larger items must be broken down before going into a Sprint Backlog.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sprint&lt;/strong&gt;&lt;br /&gt;What: Iterations of work which take place one after another. Sprints end at a specific date whether the work has been completed or not.&lt;br /&gt;Duration: 1-6 weeks, but consistent in duration. Preferably 3 weeks to 1 calendar month.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sprint Planning Meeting&lt;/strong&gt;&lt;br /&gt;When: Beginning of each sprint&lt;br /&gt;Who: Scrum Master, Product Owner, TEAM, Anyone (silent unless specifically engaged)&lt;br /&gt;What: Team, in concert with Product Owner and facilitated by the Scrum Master, choose the items to be worked for the upcoming Sprint. The items are selected in priority order by working down the prioritized Product Backlog list.&lt;br /&gt;Duration: Several hours&lt;br /&gt;Goal: Sprint Backlog is produced and all team members have allocated work for Sprint&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sprint Backlog&lt;/strong&gt;&lt;br /&gt;When: Artifact from Sprint Planning Meeting&lt;br /&gt;Who: Owned and managed by Product Owner&lt;br /&gt;What: Individual tasks with time estimates representing the work to be completed by the end of the active Sprint.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Daily Standup / Scrum&lt;/strong&gt;&lt;br /&gt;When: Ideally begins or ends the day.&lt;br /&gt;Who: Scrum Master, Product Owner, TEAM, Anyone (silent unless specifically engaged)&lt;br /&gt;What: Quick meeting each day to discuss activities related to the sprint&lt;br /&gt;Duration: 15 minutes&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sprint Review and Demonstration&lt;/strong&gt;&lt;br /&gt;When: Immediately following Sprint&lt;br /&gt;Who: Scrum Master, Product Owner, TEAM, Stakeholder, customers, experts and&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;executives plus anyone else interested&lt;/strong&gt;&lt;br /&gt;What: A demonstration of the Sprint. This is not a presentation, but a demonstration.&lt;br /&gt;Duration: 30 minutes to several hours&lt;br /&gt;Goal: Demonstrate work from sprint&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sprint Retrospective&lt;/strong&gt;&lt;br /&gt;When: Following the Sprint Review, ideally immediately (within 1 day)&lt;br /&gt;Who: Scrum Master, Product Owner, TEAM. Should be limited to this group for &lt;strong&gt;honest feedback&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;What: A neutral outsider, possibly another teams Scrum Master, will lead an effort to gather feedback on what works, what does not work, challenges and changes needed to make the next Scrum more successful.&lt;br /&gt;Duration: 30 minutes to several hours&lt;br /&gt;Goal: Honest feedback to improve sprint process&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;TPQ – Total Product Quality&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Scrum is a product development methodology but it is also a framework. Though the authors and agile enthusiasts wish an organization to use all aspects of the defined Scrum, sometimes it is necessary to augment the defined with one’s own necessities.&lt;br /&gt;&lt;br /&gt;In our case we need more requirements reviews as well as validation of the testing criteria. This is The 41st Parameters commitment to Total Product Quality and it fits very well within an agile framework.&lt;br /&gt;&lt;br /&gt;Below you will find some discreet tasks that can be associated with a specific feature, if needed. Not all features require this level of attention, but the ones that do deserve the care and focus that it takes to release enterprise product.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2801193861751163019?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2801193861751163019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/03/scrum-agile-product-development.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2801193861751163019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2801193861751163019'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/03/scrum-agile-product-development.html' title='SCRUM-An agile product development methodology'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-1279506785338601474</id><published>2009-03-12T12:43:00.002-04:00</published><updated>2009-03-12T12:52:36.649-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Solutions For Errors'/><title type='text'>Configuring Microsoft Visual Source Safe 6.0 plugin for Visual Studio 2008</title><content type='html'>When we install Visual Studio 2008 after installing Visual Source Safe we need to configure Visual SourceSafe plugin for Visual Studio.&lt;br /&gt;&lt;br /&gt;Other wise when we open any application that is bound to source control we get error saying "Source safe plugin is not installed on your system".&lt;br /&gt;&lt;br /&gt;To fix this open command promt to to the path of the VSS Win32 folder.&lt;br /&gt;Probably like &lt;span style="font-style:italic;"&gt;C:\Program Files\Microsoft Visual Studio\VSS\win32&lt;span style="font-weight:bold;"&gt;&lt;/span&gt;&lt;/span&gt; directory and run.&lt;br /&gt;&lt;br /&gt;Then run this command &lt;span style="font-weight:bold;"&gt;“regsvr32 ssscc.dll”&lt;/span&gt; to register VSS 6.0 dll to work with Visual Studio 2008.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-1279506785338601474?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/1279506785338601474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/03/configuring-microsoft-visual-source.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1279506785338601474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1279506785338601474'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/03/configuring-microsoft-visual-source.html' title='Configuring Microsoft Visual Source Safe 6.0 plugin for Visual Studio 2008'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-6588134461160735031</id><published>2009-03-10T05:26:00.001-04:00</published><updated>2009-03-10T05:37:10.570-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><title type='text'>Features and Benefits for Mobile Development in Visual Studio 2008.</title><content type='html'>Using Visual Studio 2008 Professional Edition or Visual Studio Team System we can easily extend and optimize the functionality of desktop applications to Windows Mobile-based devices.&lt;br /&gt;&lt;br /&gt;Some features that developers can take advantage of include:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight:bold;"&gt;.NET Compact Framework 3.5&lt;/span&gt;, which lets developers reuse new technologies that they’ve used to build an application’s desktop version, such as Windows Communication Foundation WCF and LINQ.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-weight:bold;"&gt;Unit testing support&lt;/span&gt;, which enables developers to reuse some of the same unit tests they’ve developed for the desktop version of the application and write new ones where needed.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-weight:bold;"&gt;Enhanced mobile Windows Forms controls&lt;/span&gt;, which make it easy to modify and optimize mobile applications’ screens to support mobile devices’ smaller displays.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The benefits of such an approach include:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-weight:bold;"&gt;Rapid Application Development&lt;/span&gt;. The effort required to extend the functionality of an existing desktop application to mobile users is significantly reduced because developers can reuse a large part of the architecture, code, and unit tests from the desktop application, with most of the work going into developing a new UI for the smaller screen.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-weight:bold;"&gt;Breakthrough User Experiences&lt;/span&gt;. A Windows Mobile-powered solution puts the capabilities and information that mobile workers need at their fingertips when it is most useful—while they are on the move. New mobile Windows Forms controls enable developers to optimize the mobile application’s UI for particular job roles to enhance worker productivity.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Source:&lt;/span&gt;&lt;br /&gt;White Paper: Break Through Your Software Development Challenges with Microsoft Visual Studio 2008&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-6588134461160735031?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/6588134461160735031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/03/features-and-benefits-for-mobile.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6588134461160735031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6588134461160735031'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/03/features-and-benefits-for-mobile.html' title='Features and Benefits for Mobile Development in Visual Studio 2008.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-84388740101226379</id><published>2009-03-02T12:20:00.007-05:00</published><updated>2009-03-04T12:03:00.779-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Enable browser back and forward button support for Gridview paging and sorting in ASP.NET AJAX using jQuery.</title><content type='html'>&lt;br/&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Introduction:&lt;/span&gt;&lt;br /&gt;The Article will demonstrate how to enable browser back and forward button support for GridView paging and sorting in ASP.NET AJAX using jQuery History plugin. jQuery is popular and widely used Javascript library and will take care of browser compatibility for our script.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description:&lt;/span&gt;&lt;br /&gt;Let’s see how to maintain browser history for GridView paging and sorting in using AJAX using jQuery History plug-in (which allows dynamic pages to create page states and easily recall them when user navigation occurs).&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;Before starting please download jQuery library from &lt;a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6.js"&gt;here&lt;/a&gt; and jQuery History plug in from &lt;a href="http://plugins.jquery.com/files/jquery.history.js_1.txt"&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;• Create new Ajax Enabled Website using Visual Studio templates.&lt;br /&gt;&lt;br /&gt;• Add a new folder to it in solution explorer name it “jQuery” and add jQuery library and History plug in JavaScript files to this folder. You can name these files as you like.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SabjeqOSzkI/AAAAAAAAA14/07-E4Fqt6ao/s1600-h/jQuery1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 211px; height: 181px;" src="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SabjeqOSzkI/AAAAAAAAA14/07-E4Fqt6ao/s400/jQuery1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5307179326772530754" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;• Add reference to both JavaScript files (jQuery.js and history.js) into Default.aspx page under head tag.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="jQuery/jquery.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="jQuery/history.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• We need a textbox/hidden field to store value (hash value) that we need to pass to backend method,and asp button control with Onclick event which will be used to trigger the Update Panel. As we don’t need to show this textbox and button on the page to the user we will just hide these using CSS.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&amp;lt;asp:TextBox ID="text" runat="server" style="display:none;"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;&amp;lt;asp:Button ID="button" runat="server" OnClick="button_Click" style="display:none;"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Add update panel to .aspx page and include GridView with &lt;span style="font-style:italic;"&gt;OnSorting &lt;/span&gt;and &lt;span style="font-style:italic;"&gt;OnPageIndexChanged &lt;/span&gt;events. Add Asynchronous post back trigger to the Update Panel for hidden button click event.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&amp;lt;asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional"&amp;gt;&lt;br /&gt;&amp;lt;ContentTemplate&amp;gt;&lt;br /&gt; &amp;lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"&lt;br /&gt;            DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" AllowPaging="true"&lt;br /&gt;            AllowSorting="true" OnSorting="GridView1_Sorting" OnPageIndexChanged="GridView1_PageIndexChanged"&amp;gt;&lt;br /&gt;            &amp;lt;RowStyle BackColor="#F7F6F3" ForeColor="#333333" /&amp;gt;&lt;br /&gt;            &amp;lt;Columns&amp;gt;&lt;br /&gt;                &amp;lt;asp:BoundField DataField="CompanyId" HeaderText="CompanyId" SortExpression="CompanyId" /&amp;gt;&lt;br /&gt;                &amp;lt;asp:BoundField DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" /&amp;gt;&lt;br /&gt;                &amp;lt;asp:BoundField DataField="SectorName" HeaderText="SectorName" SortExpression="SectorName" /&amp;gt;&lt;br /&gt;            &amp;lt;/Columns&amp;gt;&lt;br /&gt;            &amp;lt;FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /&amp;gt;&lt;br /&gt;            &amp;lt;PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /&amp;gt;&lt;br /&gt;            &amp;lt;SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /&amp;gt;&lt;br /&gt;            &amp;lt;HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /&amp;gt;&lt;br /&gt;            &amp;lt;EditRowStyle BackColor="#999999" /&amp;gt;&lt;br /&gt;            &amp;lt;AlternatingRowStyle BackColor="White" ForeColor="#284775" /&amp;gt;&lt;br /&gt;        &amp;lt;/asp:GridView&amp;gt;&lt;br /&gt;        &amp;lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="&amp;lt;%$ ConnectionStrings:sampleConnectionString %&amp;gt;"&lt;br /&gt;            SelectCommand="SELECT DISTINCT [CompanyId], [CompanyName], [SectorName] FROM [abc]"&amp;gt;&lt;br /&gt;        &amp;lt;/asp:SqlDataSource&amp;gt;&lt;br /&gt;&amp;lt;/ContentTemplate&amp;gt;&lt;br /&gt;&amp;lt;Triggers&amp;gt;&lt;br /&gt;   &amp;lt;asp:AsyncPostBackTrigger ControlID="button" EventName="Click" /&amp;gt;&lt;br /&gt;&amp;lt;/Triggers&amp;gt;&lt;br /&gt;&amp;lt;/asp:UpdatePanel&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Add a Javascript function &lt;span style="font-style:italic;"&gt;addToHistory &lt;/span&gt;to the aspx page to add history to the browser with input hash value.&lt;br /&gt;&lt;br /&gt;• In GridView &lt;span style="font-style:italic;"&gt;sorting &lt;/span&gt;event handler register client script block with script manager to call &lt;span style="font-style:italic;"&gt;addToHistory &lt;/span&gt;JavaScript method by passing &lt;span style="font-style:italic;"&gt;SortDirection &lt;/span&gt;and Sort field as a hash value.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)&lt;br /&gt;{&lt;br /&gt;    // Create the history state for Direction and Expression&lt;br /&gt;    ScriptManager.RegisterStartupScript(this, this.GetType(), "AddHistory", "addToHistory('SortDirection=" + e.SortDirection.ToString() + "&amp;&amp;SortExpression=" + e.SortExpression + "');", true);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• In GridView &lt;span style="font-style:italic;"&gt;OnPageIndexChanged &lt;/span&gt;event handler register client script block with script manager to call &lt;span style="font-style:italic;"&gt;addToHistory &lt;/span&gt;JavaScript method by passing &lt;span style="font-weight:bold;"&gt;PageIndex &lt;/span&gt;as a hash value.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;protected void GridView1_PageIndexChanged(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;    // To check if post back is Asynchronous&lt;br /&gt;    if (ScriptManager1.IsInAsyncPostBack)&lt;br /&gt;    {&lt;br /&gt;        //To add History point with gridview selected page index value.&lt;br /&gt;        ScriptManager.RegisterStartupScript(this, this.GetType(), "AddHistory", "addToHistory('PageIndex=" + GridView1.PageIndex.ToString() + "');", true);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Now as the history points are being added to the browser user will be able to move forward or backward using browser buttons, Add the below code to register a function to be called for every user navigation in which we will set hash value (history point value) into hidden field and raise hidden button click event using &lt;span style="font-style:italic;"&gt;doPostBack &lt;/span&gt;method for it.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;protected void button_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;    string entryName = text.Text;&lt;br /&gt;    if (entryName.Contains("SortDirection") &amp;&amp; entryName.Contains("SortExpression"))&lt;br /&gt;    {&lt;br /&gt;        string[] splitter = new String[1];&lt;br /&gt;        splitter[0] = "&amp;&amp;";&lt;br /&gt;        string[] text1 = entryName.Split(splitter, StringSplitOptions.None);&lt;br /&gt;        string sortExpression = text1[1].Replace("SortExpression=", "");&lt;br /&gt;        string strSortDirection = text1[0].Replace("SortDirection=", "");&lt;br /&gt;        SortDirection sortDirection = (SortDirection)Enum.Parse(typeof(SortDirection), strSortDirection);&lt;br /&gt;&lt;br /&gt;        // Sort the grid according to the sort information in the history state&lt;br /&gt;        GridView1.Sort(sortExpression, sortDirection);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    // Get GridView PagIndex from history &lt;br /&gt;    string pageIndex = string.Empty;&lt;br /&gt;    if (entryName.Contains("PageIndex"))&lt;br /&gt;    {&lt;br /&gt;        pageIndex = entryName.Replace("PageIndex=", "");&lt;br /&gt;    }&lt;br /&gt;    if (string.IsNullOrEmpty(pageIndex))&lt;br /&gt;    {&lt;br /&gt;        GridView1.PageIndex = 0;&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        GridView1.PageIndex = Convert.ToInt32(pageIndex);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Now finally in the button click event handler we need to get the history point value from hidden textbox/hidden field using which we will bind the GridView the appropriate PageIndex, SortDirection and SortField. Hence updating Update Panel content with browser history value.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt; &lt;br /&gt;    $(document).ready(function() &lt;br /&gt;    {&lt;br /&gt;        $(window).history(function(e, hash) &lt;br /&gt;        {&lt;br /&gt;           var obj = document.getElementById("&lt;%= text.ClientID %&gt;");&lt;br /&gt;            obj.value=hash;&lt;br /&gt;            __doPostBack("&amp;lt;%= button.ClientID %&amp;gt;","");&lt;br /&gt;        });&lt;br /&gt;    });&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;A href="http://www.box.net/shared/556tnzujsv" target="_blank"&gt;&lt;IMG height="72" src="http://anilchinnu21.googlepages.com/download-button.jpg" width="72" /&gt;Download the Source Code for this article here.&lt;/A&gt;&lt;/P&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; You have to change connection string in Web.config and also configure sqldatasource with local db table for running the sample application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-84388740101226379?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/84388740101226379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/03/enable-browser-back-and-forward-button.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/84388740101226379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/84388740101226379'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/03/enable-browser-back-and-forward-button.html' title='Enable browser back and forward button support for Gridview paging and sorting in ASP.NET AJAX using jQuery.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6Mc_4x_N2E/SabjeqOSzkI/AAAAAAAAA14/07-E4Fqt6ao/s72-c/jQuery1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-7285194028504806612</id><published>2009-03-02T12:09:00.001-05:00</published><updated>2009-03-02T12:20:15.703-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Calling Page Methods and Web Services directly using jQuery.</title><content type='html'>For calling Ajax Page Methods from Javascript using jQuery use the below jQuery method to set type, url, input data empty braces if no input data is available to avoid errors. Data transfer will done in JSON format.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;$.ajax({&lt;br /&gt;  type: "POST",&lt;br /&gt;  url: "PageName.aspx/WebMethodName",&lt;br /&gt;  data: "{}",&lt;br /&gt;  contentType: "application/json; charset=utf-8",&lt;br /&gt;  dataType: "json",&lt;br /&gt;  success: function(response) {&lt;br /&gt;    // Your logic here&lt;br /&gt;  }&lt;br /&gt;});&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To consume Webservice in Javascript using jQuery is similar to above where we will pass the data as JSON format string.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;$.ajax({&lt;br /&gt;  type: "POST",&lt;br /&gt;  url: "ServiceName.asmx/WebMethodName",&lt;br /&gt;  data: "{'name':'anil','gender':'male','age':'23'}",&lt;br /&gt;  contentType: "application/json; charset=utf-8",&lt;br /&gt;  dataType: "json",&lt;br /&gt;  success: function(response) {&lt;br /&gt;    // Your logic here&lt;br /&gt;  }&lt;br /&gt;});&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-7285194028504806612?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/7285194028504806612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/03/calling-page-methods-and-web-services.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7285194028504806612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7285194028504806612'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/03/calling-page-methods-and-web-services.html' title='Calling Page Methods and Web Services directly using jQuery.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-6453257565287750917</id><published>2009-02-26T13:43:00.009-05:00</published><updated>2009-03-02T12:39:01.790-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Enabling Browser Back/Forward Button Support for ASP.NET AJAX using jQuery.</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Introduction:&lt;/span&gt;&lt;br /&gt;The Article will demonstrate how to enable browser history thus enabling browser back and forward support for ASP.NET AJAX Update Panel using jQuery using the location hash fragment method. Now a day’s jQuery is widely used as it is a fast, lightweight JavaScript library and no need to worry about browser compatibility of our script.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;You May also want to read "&lt;/span&gt;&lt;a href="http://interviews.dotnetthread.com/2009/03/enable-browser-back-and-forward-button.html"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;Enable browser back and forward button support for Gridview paging and sorting in ASP.NET AJAX using jQuery.&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description:&lt;/span&gt;&lt;br /&gt;Let’s see how to maintain browser history when we are using AJAX update panel in a web page using jQuery History plug-in which allows dynamic pages to create page states and easily recall them when user navigation (through browser back or forward event) occurs.&lt;br /&gt;&lt;br /&gt;Before starting please download jQuery library from &lt;a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6.js"&gt;here&lt;/a&gt; and jQuery History plug in from &lt;a href="http://plugins.jquery.com/files/jquery.history.js_1.txt"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;• Create new Ajax Enabled Website using Visual Studio templates.&lt;br /&gt;&lt;br /&gt;• Add a new folder to in solution explorer name it “jQuery” and add jQuery library and History plug in JavaScript files to this folder. You can name these files as you like.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SabjeqOSzkI/AAAAAAAAA14/07-E4Fqt6ao/s1600-h/jQuery1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 211px; height: 181px;" src="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SabjeqOSzkI/AAAAAAAAA14/07-E4Fqt6ao/s400/jQuery1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5307179326772530754" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;• Add reference to both JavaScript files (jQuery.js and history.js) into Default.aspx page under head tag.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="jQuery/jquery.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="jQuery/history.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Add update panel to .aspx page and include dropdown list inside it. For each time dropdown list selection changed we will maintain previous selected value of list to the browser’s history via jQuery History plug in.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:ScriptManager ID="ScriptManager1" runat="server" /&amp;gt;&lt;br /&gt;&amp;lt;asp:UpdatePanel ID="updatepanel" runat="server" UpdateMode="Always"&amp;gt;&lt;br /&gt; &amp;lt;ContentTemplate&amp;gt;&lt;br /&gt;   &amp;lt;div&amp;gt;&lt;br /&gt;     &amp;lt;asp:Label runat="server" ID="lblSelectedValue" Text="Select Category" Font-Size="30px"&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;br /&gt;   &amp;lt;/div&amp;gt;&lt;br /&gt;   &amp;lt;br /&amp;gt;&lt;br /&gt;   &amp;lt;div&amp;gt;&lt;br /&gt;     &amp;lt;asp:DropDownList ID="ddlValues" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlValues_SelectedIndexChanged"&amp;gt;&lt;br /&gt;       &amp;lt;asp:ListItem Text="Select Category" Value="0"&amp;gt;&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;       &amp;lt;asp:ListItem Text="jQuery" Value="1"&amp;gt;&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;       &amp;lt;asp:ListItem Text="AJAX" Value="2"&amp;gt;&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;       &amp;lt;asp:ListItem Text="Silverlight" Value="3"&amp;gt;&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;       &amp;lt;asp:ListItem Text="ASP.NET" Value="4"&amp;gt;&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;     &amp;lt;/asp:DropDownList&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;/ContentTemplate&amp;gt;&lt;br /&gt;&amp;lt;/asp:UpdatePanel&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• In Page_Load method add ‘onchange’ attribute to the dropdownlist control to call Javascript function “onSelectionChange”.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;  ddlValues.Attributes.Add("onchange", "javascript:onSelectionChange();");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• In the &lt;span style="font-style:italic;"&gt;onSelectionChange&lt;/span&gt; Javascript function write the following code to add a new history point with dropdown list selected value as hash key, To save an event (selection change) in history with the current state (selected value) of the object .&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;function onSelectionChange()&lt;br /&gt;{&lt;br /&gt;    //Add a history point using jQuery history puligin&lt;br /&gt;    $.history.add( $("#ddlValues").val() );&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Now browser back button will be enabled when user makes selections in the dropdown list, and user can now navigate using browser back and forward buttons.&lt;br /&gt;&lt;br /&gt;• Importantly now we need to catch this navigation and get the related hash key(to set back dropdown value based on the previous selection), You must declare a callback function to be fired upon forward or back button being clicked to handle the new incoming stored history object. Add the following jQuery code for call back function and in the call back function we will set back the dropdown list selected value based on the History value.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;$(document).ready(function()&lt;br /&gt;  {&lt;br /&gt;      //get the value from history&lt;br /&gt;      $(window).history(function(e, hash)&lt;br /&gt;      {&lt;br /&gt;          if(hash == "")&lt;br /&gt;          {&lt;br /&gt;              $("#ddlValues").val("0");&lt;br /&gt;          }&lt;br /&gt;          else&lt;br /&gt;          {&lt;br /&gt;              $("#ddlValues").val(hash);&lt;br /&gt;          }&lt;br /&gt;          //To get dropdownlist selected text using jQuery and set to a label.&lt;br /&gt;          $("#lblSelectedValue").text($("#ddlValues").find('option').filter(':selected').text());&lt;br /&gt;      });&lt;br /&gt;  });&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;• Set AutoPostback property of Dropdownlist to true and In the DropdownList  OnSelectedIndexChanged event handler in which we can get the selected value and use it display other data.&lt;br /&gt;&lt;br /&gt;• Just run the application and test it, you will find that browser back and forward buttons are enabled when users makes selection changes in the dropdownlist and selected value is maintained in the URL as hash value(http://localhost:51615/jQueryHistory/Default.aspx#1). And if you navigate using browser back and forward buttons drop down value is set from the history.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SabjenfQSmI/AAAAAAAAA2A/VIzlhF9Uc24/s1600-h/jQuery2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 246px;" src="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SabjenfQSmI/AAAAAAAAA2A/VIzlhF9Uc24/s400/jQuery2.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5307179326038362722" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.box.net/shared/dpod3lbcan" target="_blank"&gt;&lt;img height="72" src="http://anilchinnu21.googlepages.com/download-button.jpg" width="72" /&gt;Download the Source Code for this article here.&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;You May also want to read "&lt;/span&gt;&lt;a href="http://interviews.dotnetthread.com/2009/03/enable-browser-back-and-forward-button.html"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;Enable browser back and forward button support for Gridview paging and sorting in ASP.NET AJAX using jQuery.&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Stay tuned for more on jQuery...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-6453257565287750917?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/6453257565287750917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/02/enabling-browser-backforward-button.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6453257565287750917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6453257565287750917'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/02/enabling-browser-backforward-button.html' title='Enabling Browser Back/Forward Button Support for ASP.NET AJAX using jQuery.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6Mc_4x_N2E/SabjeqOSzkI/AAAAAAAAA14/07-E4Fqt6ao/s72-c/jQuery1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-6790609263823604791</id><published>2009-02-26T13:42:00.004-05:00</published><updated>2009-02-26T14:11:52.038-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>How to get jQuery Intellisense in Visual Studio 2008 with SP1?</title><content type='html'>&lt;br/&gt;&lt;br /&gt;To get jQuery intellisense in Visula Studio you need to do the following.&lt;br /&gt;&lt;br /&gt;1. Install the hot fix "JScript Editor support for "-vsdoc.js" IntelliSense documentation files" by downloading it &lt;a href="http://code.msdn.microsoft.com/KB958502"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;2. Download  jQuery VS 2008 IntelliSense documentation &lt;a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6-vsdoc.js"&gt;here&lt;/a&gt; along with the jQuery library &lt;a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6.js"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;3. Add both jquery-1.2.6.js and jquery-1.2.6-vsdoc.js to your scripts folder.&lt;br /&gt;&lt;br /&gt;4. Just add reference to jquery-1.2.6.js in your web page then you will get intellisense to the jQuery.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SabiqsgdV2I/AAAAAAAAA1g/4UooP517jyQ/s1600-h/jquery-intellisense.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 165px;" src="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SabiqsgdV2I/AAAAAAAAA1g/4UooP517jyQ/s400/jquery-intellisense.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5307178434032392034" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-6790609263823604791?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/6790609263823604791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/02/how-to-get-jquery-intellisense-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6790609263823604791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6790609263823604791'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/02/how-to-get-jquery-intellisense-in.html' title='How to get jQuery Intellisense in Visual Studio 2008 with SP1?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SabiqsgdV2I/AAAAAAAAA1g/4UooP517jyQ/s72-c/jquery-intellisense.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-4846486264945210621</id><published>2009-02-26T13:40:00.001-05:00</published><updated>2009-02-26T14:08:28.658-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>What is jQuery and What is the difference between JavaScript and jQuery?</title><content type='html'>jQuery is a fast, lightweight JavaScript library that is CSS3 compliant and supports many browsers. The jQuery framework is extensible and very nicely handles DOM manipulations, CSS, AJAX, Events and Animations.&lt;br /&gt;&lt;br /&gt;JavaScript is a language whereas jQuery is a library written using JavaScript.&lt;br /&gt;&lt;br /&gt;Download jQuery library &lt;a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6.js"&gt;here&lt;/a&gt; and Read the documentation &lt;a href="http://docs.jquery.com/Main_Page"&gt;here &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-4846486264945210621?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/4846486264945210621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/02/what-is-jquery-and-what-is-difference.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4846486264945210621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4846486264945210621'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/02/what-is-jquery-and-what-is-difference.html' title='What is jQuery and What is the difference between JavaScript and jQuery?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-5662017439875679603</id><published>2009-02-25T15:29:00.009-05:00</published><updated>2009-02-26T14:02:43.870-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 3.5'/><title type='text'>Implementing Forms Authentication in Silverlight Application.</title><content type='html'>&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Most of the time to Implement security in ASP.NET website we use Forms Authentication. Forms authentication uses an authentication ticket that is created when a user logs on to a site, and then it tracks the user throughout the site. The forms authentication ticket is usually contained inside a cookie (or passed in query string). &lt;br /&gt;If you are developing a site in Silverlight with login page and other Silverlight pages and if you want to implement Forms authentication where you need to authenticate user based on the credentials entered in Silverlight based login page and display the user name in other Silverlight pages after logging in. Read this article to achieve same kind of functionality as Forms authentication in normal ASP.NET website.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;• Create a new Silverlight Application using the Visual Studio installed templates.&lt;br /&gt;&lt;br /&gt;• Add a new Web to the Solution by accepting the default options in the Add Silverlight Application wizard that pops up. &lt;br /&gt;&lt;br /&gt;• Rename Default.aspx as UserLogin.aspx and set it as default page.&lt;br /&gt;&lt;br /&gt;• Create a new folder say “Forms” in the Web project and all web pages which requires authentication to this folder.&lt;br /&gt;&lt;br /&gt;• Let’s add a new page to “Forms” folder and name it as ShowDetails.aspx.&lt;br /&gt;&lt;br /&gt;• Add the following code into web.config file to enable forms authentication.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;authentication mode="Forms"&amp;gt;&lt;br /&gt;    &amp;lt;forms name="dotnetthread" defaultUrl="/Forms/ShowDetails.aspx" loginUrl="UserLogin.aspx" protection="All" path="/"&amp;gt;&lt;br /&gt; &amp;lt;credentials passwordFormat="Clear"&amp;gt;&lt;br /&gt;  &amp;lt;user name="anil" password="anil"/&amp;gt;&lt;br /&gt; &amp;lt;/credentials&amp;gt;&lt;br /&gt;   &amp;lt;/forms&amp;gt;&lt;br /&gt;&amp;lt;/authentication&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Add a new web.config file into “Forms” folder and add following code to deny un authenticated users.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;    &amp;lt;appSettings/&amp;gt;&lt;br /&gt;    &amp;lt;connectionStrings/&amp;gt;&lt;br /&gt;    &amp;lt;system.web&amp;gt;&lt;br /&gt; &amp;lt;authorization&amp;gt;&lt;br /&gt;  &amp;lt;deny users="?"/&amp;gt;&lt;br /&gt; &amp;lt;/authorization&amp;gt;&lt;br /&gt;    &amp;lt;/system.web&amp;gt;&lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Then we will create Login page in Silverlight and show it (XAML) in UserLogin.aspx page.&lt;br /&gt;&lt;br /&gt;• Add new Silverlight User Control (login.xaml) to the Silverlight application.&lt;br /&gt;&lt;br /&gt;• Add below code to login.xaml file to create login controls.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;Grid x:Name="loginGrid" HorizontalAlignment="Left" Width="400" Height="300" Background="White"&amp;gt;&lt;br /&gt;      &amp;lt;Grid.ColumnDefinitions&amp;gt;&lt;br /&gt;          &amp;lt;ColumnDefinition Width="120" /&amp;gt;&lt;br /&gt;          &amp;lt;ColumnDefinition Width="120" /&amp;gt;&lt;br /&gt;      &amp;lt;/Grid.ColumnDefinitions&amp;gt;&lt;br /&gt;      &amp;lt;Grid.RowDefinitions&amp;gt;&lt;br /&gt;          &amp;lt;RowDefinition Height="30" /&amp;gt;&lt;br /&gt;          &amp;lt;RowDefinition Height="30" /&amp;gt;&lt;br /&gt;          &amp;lt;RowDefinition Height="30"/&amp;gt;&lt;br /&gt;          &amp;lt;RowDefinition Height="30"/&amp;gt;&lt;br /&gt;      &amp;lt;/Grid.RowDefinitions&amp;gt;&lt;br /&gt;      &amp;lt;TextBlock Text="User Login Form" Grid.ColumnSpan="2" HorizontalAlignment="Center"&amp;gt;&amp;lt;/TextBlock&amp;gt;&lt;br /&gt;      &amp;lt;TextBlock Text="UserName" Width="100" HorizontalAlignment="Right" Height="20" Grid.Row="1" Grid.Column="0"&amp;gt;&amp;lt;/TextBlock&amp;gt;&lt;br /&gt;      &amp;lt;TextBox x:Name="UserName" Width="100" Height="20" Grid.Row="1" Grid.Column="1"&amp;gt;&amp;lt;/TextBox&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;TextBlock Text="Password" Width="100" HorizontalAlignment="Right" Height="20" Grid.Row="2" Grid.Column="0"&amp;gt;&amp;lt;/TextBlock&amp;gt;&lt;br /&gt;      &amp;lt;TextBox x:Name="Password" Width="100" Height="20" Grid.Row="2" Grid.Column="1"&amp;gt;&amp;lt;/TextBox&amp;gt;&lt;br /&gt;      &amp;lt;Button x:Name="bntLogin" Width="80" Height="25" Content="Login" Click="bntLogin_Click" Grid.Row="3" Grid.Column="1"&amp;gt;&amp;lt;/Button&amp;gt;&lt;br /&gt;&amp;lt;/Grid&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Login XAML preview looks like below.&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SaWtWydAgHI/AAAAAAAAA0w/DLQXnLxbihI/s1600-h/Xaml1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 269px;" src="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SaWtWydAgHI/AAAAAAAAA0w/DLQXnLxbihI/s400/Xaml1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5306838342938165362" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;• Add new Silverlight User Control (userdetails.xaml) to the Silverlight application.&lt;br /&gt;&lt;br /&gt;• Add below code to userdetails.xaml file to create just show welcome message along with the logged in user name.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;Grid x:Name="LayoutRoot" Background="White"&amp;gt;&lt;br /&gt;   &amp;lt;StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"&amp;gt;&lt;br /&gt;       &amp;lt;TextBlock Text="Welcome: " x:Name="showtext" FontSize="20"&amp;lt;&amp;gt;/TextBlock&amp;gt;&lt;br /&gt;       &amp;lt;TextBlock Text="UserName" x:Name="userName" FontSize="20"&amp;lt;&amp;gt;/TextBlock&amp;gt;&lt;br /&gt;   &amp;lt;/StackPanel&amp;gt;&lt;br /&gt;&amp;lt;/Grid&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Modify the constructer in userdetails.xaml.cs to accept loginName as input and display the same in a Silverlight Textblock.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;public userdetails(string loginName)&lt;br /&gt;   {&lt;br /&gt;       InitializeComponent();&lt;br /&gt;       userName.Text = loginName;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• UserDetails XAML preview looks like below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SaWuS8E58gI/AAAAAAAAA04/Bd0Cm9uud0M/s1600-h/Xaml2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 269px;" src="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SaWuS8E58gI/AAAAAAAAA04/Bd0Cm9uud0M/s400/Xaml2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5306839376313577986" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;• Create public properties PageName and LoginName in Page.xaml.cs file to store the current pagename and logged in userName. Also create two constructers in page.xaml.cs one to accept pageName as input and other to accespt pageName and LoginName as input. &lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;       public Page(string pageName)&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;            PageName = pageName;&lt;br /&gt;            LoadPage();&lt;br /&gt;        }&lt;br /&gt;        public Page(string pageName,string loginName)&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;            LoginName = loginName;&lt;br /&gt;            LoadPage();&lt;br /&gt;        }&lt;br /&gt;        public string PageName&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;        public string LoginName&lt;br /&gt;        {&lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Create a new method in Page.xaml.cs file (LoadPage()) and call this after initializecomponent in Page constructer. In this function we need to load Silverlight user control based on the PageName property. If PageName property is set to “Login” the Login.xaml file will be loaded and when PageName is set “ShowDetails” then ShowDetails.xaml file will be loaded by passing loginname as input to constructer. And this PageName/LoginName property values will be added as InitParameters when we are adding Silverlight control (.xap) in .apsx page as explained in next point.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;public void LoadPage()&lt;br /&gt;        {&lt;br /&gt;            if (PageName == "login")&lt;br /&gt;            {&lt;br /&gt;                this.Content = new login();&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                this.Content = new userdetails(LoginName);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Now in UserLogin.aspx add Register tag with tag prefix to add reference to &lt;strong&gt;System.Web.UI.SilverlightControls&lt;/strong&gt; namespace. And then add ScriptManager and Silverlight control to display Silverlight content by pointing to .xap file. Here add &lt;strong&gt;InitParameters &lt;/strong&gt;property to Silverlight control as &lt;em&gt;InitParameters="PageName=login“&lt;/em&gt; to set PageName=login attribute.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"&lt;br /&gt;    TagPrefix="asp" %&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"&amp;gt;&lt;br /&gt;    &amp;lt;/asp:ScriptManager&amp;gt;&lt;br /&gt;    &amp;lt;div style="height: 100%;"&amp;gt;&lt;br /&gt;        &amp;lt;asp:Silverlight ID="Xaml1" runat="server" InitParameters="PageName=login" Source="~/ClientBin/SilverlightFormsAuth.xap"&lt;br /&gt;            MinimumVersion="2.0.31005.0" Width="100%" Height="100%" /&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• In the similar manner add the same to showdetails.aspx page and set &lt;strong&gt;InitParameters  &lt;/strong&gt;as &lt;em&gt;"PageName=userdetails,loginName=" + loginName &lt;/em&gt;from backend code in Page_Load of userdetails.aspx.cs page where loginName value is set as &lt;strong&gt;HttpContext.Current.User.Identity.Name&lt;/strong&gt; to get the user name stored in the Authentication cookie.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"&amp;gt;&lt;br /&gt;    &amp;lt;/asp:ScriptManager&amp;gt;&lt;br /&gt;    &amp;lt;div style="height: 100%;"&amp;gt;&lt;br /&gt;        &amp;lt;asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/SilverlightFormsAuth.xap"&lt;br /&gt;            MinimumVersion="2.0.31005.0" Width="100%" Height="100%" /&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt; protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;        {&lt;br /&gt;            string loginName = HttpContext.Current.User.Identity.Name;&lt;br /&gt;            Xaml1.InitParameters = "PageName=userdetails,loginName=" + loginName;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• These &lt;em&gt;InitParameters &lt;/em&gt;are read and passed to &lt;em&gt;Page.xaml &lt;/em&gt;file in &lt;em&gt;App.xaml&lt;/em&gt; file in &lt;strong&gt;Application_Startup&lt;/strong&gt; as below.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt; private void Application_Startup(object sender, StartupEventArgs e)&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            if (e.InitParams.Count &gt; 1)&lt;br /&gt;                this.RootVisual = new Page(e.InitParams["PageName"], e.InitParams["loginName"]);&lt;br /&gt;            else&lt;br /&gt;                this.RootVisual = new Page(e.InitParams["PageName"]);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Now when the user tries to access &lt;em&gt;showdetails.aspx &lt;/em&gt;page by default he will be redirected to userlogin.aspx page showing &lt;em&gt;login.xaml &lt;/em&gt;page. Here the user will enter UserName and Password and then clicks on the Login button. To call javascript function on Login button click by passing username and password as input, add the following code in the &lt;em&gt;login.xaml.cs&lt;/em&gt; by adding namespace &lt;strong&gt;System.Windows.Browser&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;    private void bntLogin_Click(object sender, RoutedEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            HtmlPage.Window.Invoke("loginUser", UserName.Text, Password.Text);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Add the below javascript function in &lt;strong&gt;UserLogin.aspx&lt;/strong&gt; page which gets User entered login name and password as input. And now we can make use of &lt;strong&gt;Ajax &lt;/strong&gt;&lt;strong&gt;ScriptMethods &lt;/strong&gt;and call the &lt;strong&gt;Scriptmethod &lt;/strong&gt;to validate the login details with database. For this we need to set &lt;em&gt;&lt;strong&gt;EnablePageMethods &lt;/strong&gt;&lt;/em&gt;property of ScriptManager to true.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;script language="javascript"&amp;gt;&lt;br /&gt;        function loginUser(username, password)&lt;br /&gt;         {&lt;br /&gt;            PageMethods.userlogin(username, password, OnSucceeded);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        function OnSucceeded(result, userContext, methodName) &lt;br /&gt;        {&lt;br /&gt;            if (result)&lt;br /&gt;             {&lt;br /&gt;                 if ("&lt;%=ReturnURL %&gt;" != "") &lt;br /&gt;                {&lt;br /&gt;                    window.location = "&lt;%=ReturnURL %&gt;";&lt;br /&gt;                }&lt;br /&gt;                else {&lt;br /&gt;                    //some other default page.&lt;br /&gt;                    window.location = "/Forms/ShowDetails.aspx";&lt;br /&gt;                 }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    &amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Need to create a static web method by adding reference to &lt;strong&gt;System.Web.Script.Services&lt;/strong&gt;, &lt;strong&gt;System.Web.Security&lt;/strong&gt; and &lt;strong&gt;System.Web.Services&lt;/strong&gt; namespaces in which we will get username and password as input, which will be validated across Database and returns boolean value if logged in details are correct along with creating Forms Authentication cookie as below. The &lt;strong&gt;ReturnURL &lt;/strong&gt;which we will get in the query string (In this case its Forms/showdetails.aspx) is stored in a public variable.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&lt;br /&gt;       public string ReturnURL&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                if (Request.QueryString["ReturnUrl"] != null)&lt;br /&gt;                {&lt;br /&gt;                    return Request.QueryString["ReturnUrl"];&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                {&lt;br /&gt;                    return "";&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [WebMethod, ScriptMethod]&lt;br /&gt;        public static bool userlogin(string userName, string password)&lt;br /&gt;        {&lt;br /&gt;            if (FormsAuthentication.Authenticate(userName,password))&lt;br /&gt;            {&lt;br /&gt;                FormsAuthentication.SetAuthCookie(userName, false);&lt;br /&gt;                return true;&lt;br /&gt;            }&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• In the &lt;strong&gt;CallBack &lt;/strong&gt;javascript fuction after calling the &lt;strong&gt;PageMethod &lt;/strong&gt;userlogin we will read ReturnURL and redirect to this User requested URL.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;        function OnSucceeded(result, userContext, methodName) &lt;br /&gt;        {&lt;br /&gt;            if (result)&lt;br /&gt;             {&lt;br /&gt;                 if ("&lt;%=ReturnURL %&gt;" != "") &lt;br /&gt;                {&lt;br /&gt;                    window.location = "&lt;%=ReturnURL %&gt;";&lt;br /&gt;                }&lt;br /&gt;                else {&lt;br /&gt;                    //some other default page.&lt;br /&gt;                    window.location = "/Forms/ShowDetails.aspx";&lt;br /&gt;                 }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;• Finally Set Web project as a default project and set showdetails.aspx page as a default page, Then run the application enter userId as ‘anil’ and password ‘anil’ as set in the Web.config file.&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_U6Mc_4x_N2E/SaW023Y_bjI/AAAAAAAAA1Q/APSuiq_h1lI/s1600-h/final1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 248px;" src="http://2.bp.blogspot.com/_U6Mc_4x_N2E/SaW023Y_bjI/AAAAAAAAA1Q/APSuiq_h1lI/s400/final1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5306846590600703538" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SaW026mOoZI/AAAAAAAAA1Y/vP7FFk6BLTY/s1600-h/final2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 307px;" src="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SaW026mOoZI/AAAAAAAAA1Y/vP7FFk6BLTY/s400/final2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5306846591461532050" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This will work exactly as Forms Authentication Works in normal ASP.NET web application.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;A href="http://www.box.net/shared/rk3j038vvy" target="_blank"&gt;&lt;IMG height="72" src="http://anilchinnu21.googlepages.com/download-button.jpg" width="72" /&gt;Download the Sample Code here.&lt;/A&gt;&lt;/P&gt;&lt;br /&gt;&lt;br /&gt;Happy coding with &lt;strong&gt;Silverlight&lt;/strong&gt;..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-5662017439875679603?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/5662017439875679603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/02/implementing-forms-authentication-in.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5662017439875679603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5662017439875679603'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/02/implementing-forms-authentication-in.html' title='Implementing Forms Authentication in Silverlight Application.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_U6Mc_4x_N2E/SaWtWydAgHI/AAAAAAAAA0w/DLQXnLxbihI/s72-c/Xaml1.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-210482863213378092</id><published>2009-02-15T05:43:00.014-05:00</published><updated>2009-02-16T10:53:14.125-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Making GridView Rows or Individual Cells Clickable and Selectable.</title><content type='html'>&lt;div class="ShowDisc"&gt;&lt;br /&gt;&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:14.0pt;line-height:115%'&gt;Introduction:&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=MsoNormal&gt;In some scenarios we need to make GridView rows clickable and also in some cases we may need to make each cell of the GridView clickable like while  developing reports.&lt;/p&gt;&lt;br /&gt;&lt;p class=MsoNormal&gt;We need to attach some event to each GridView row or each GridView cell to get the rowindex and cellindex (ColumnIndex) on which the user has clicked or  double clicked.&lt;/p&gt;&lt;br /&gt;&lt;p class=MsoNormal&gt;This article shows you how to add attributes like click or double click GridView row or GridView individual cell and get the details of selected Row or Cell.&lt;/p&gt;&lt;br /&gt;&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:14.0pt;line-height:115%'&gt;Description:&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=MsoNormal&gt;&lt;b&gt;Making GridView with Selectable Rows:&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SZgBN6cPEwI/AAAAAAAAAz4/nUuKJTb33ws/s1600-h/row.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 121px;" src="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SZgBN6cPEwI/AAAAAAAAAz4/nUuKJTb33ws/s400/row.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5302989899766371074" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;ul style='margin-top:0cm' type=disc&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;First create a new Website application, attach any database or add connection string to the existing database in the web.config file.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;Add gridview along with DataSource control (&lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;SqlDataSource&lt;/span&gt;&lt;/code&gt; control)on to the page. Configure DataSource control to get records from some table.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;Assign &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;DataSourceId&lt;/span&gt;&lt;/code&gt; of the GridView with the ID of the SqlDataSource control.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;Add &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;ButtonField&lt;/span&gt;&lt;/code&gt; to the GridView columns.&lt;/li&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt; &amp;lt;asp:ButtonField CommandName="Select" Visible="false" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;As we know the GridView &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;RowDatabound&lt;/span&gt;&lt;/code&gt; event is fired while binding each row to the GridView. Now we need to handle GridView &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;OnRowDataBound&lt;/span&gt;&lt;/code&gt; event to modify each row as it is bound, where we can add attributes to each GridView row to handle Onclick or OnDouble click event by adding client script which is used by the SingleClick button for postback and assign it to the entire row. &lt;/li&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)&lt;br /&gt;    {&lt;br /&gt;        if (e.Row.RowType == DataControlRowType.DataRow)&lt;br /&gt;        {&lt;br /&gt;            if (e.Row.RowType == DataControlRowType.DataRow)&lt;br /&gt;            {&lt;br /&gt;                // Get reference to button field in the gridview.&lt;br /&gt;                LinkButton _singleClickButton = (LinkButton)e.Row.Cells[0].Controls[0];&lt;br /&gt;                string _jsSingle = ClientScript.GetPostBackClientHyperlink(_singleClickButton, "Select$" + e.Row.RowIndex);&lt;br /&gt;                e.Row.Style["cursor"] = "hand";&lt;br /&gt;                e.Row.Attributes["onclick"] = _jsSingle;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;We can similarly add client script for double click as well.&lt;/li&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)&lt;br /&gt;    {&lt;br /&gt;        if (e.Row.RowType == DataControlRowType.DataRow)&lt;br /&gt;        {&lt;br /&gt;            if (e.Row.RowType == DataControlRowType.DataRow)&lt;br /&gt;            {&lt;br /&gt;                // Get reference to button field in the gridview.&lt;br /&gt;                LinkButton _singleClickButton = (LinkButton)e.Row.Cells[0].Controls[0];&lt;br /&gt;                string _jsSingle = ClientScript.GetPostBackClientHyperlink(_singleClickButton, "Select$" + e.Row.RowIndex);&lt;br /&gt;                e.Row.Style["cursor"] = "hand";&lt;br /&gt;                e.Row.Attributes["ondblclick"] = _jsSingle;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;Now each row of the GridView is clickable and we can get the details of the user selected row in GridView &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;OnSelectedIndexChanged &lt;/span&gt;&lt;/code&gt;event.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;So we need to handle &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;GridView’s OnSelectedIndexChanged&lt;/span&gt;&lt;/code&gt; event to get the selected row as below.&lt;/li&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;  protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        GridViewRow selectedRow = GridView1.SelectedRow;&lt;br /&gt;        lblSelectedRow.Text = GridView1.SelectedIndex.ToString();&lt;br /&gt;        lblName.Text = selectedRow.Cells[2].Text;&lt;br /&gt;        lblEmpId.Text = selectedRow.Cells[3].Text;&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;li class=MsoNormal&gt;To overcome Event Validation errors we need to handle Pages Render method. Otherwise we will get the &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;Invalid postback or callback argument&lt;/span&gt;&lt;/code&gt;&lt;i&gt; (Event validation is enabled using &amp;lt;pages enableEventValidation=&amp;quot;true&amp;quot;/&amp;gt; in configuration or &amp;lt;%@Page EnableEventValidation=&amp;quot;true&amp;quot; %&amp;gt; in a page. &amp;nbsp;For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. &amp;nbsp;If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.&lt;/i&gt;) error.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;As we know that for security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager. &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;RegisterForEventValidation &lt;/span&gt;&lt;/code&gt;method in order to register the postback or callback data for validation.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;So add the following code on to the page to register each gridview row for event validation.&lt;/li&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;    protected override void Render(HtmlTextWriter writer)&lt;br /&gt;    {&lt;br /&gt;        foreach (GridViewRow row in GridView1.Rows)&lt;br /&gt;        {&lt;br /&gt;            if (row.RowType == DataControlRowType.DataRow)&lt;br /&gt;            {&lt;br /&gt;                ClientScript.RegisterForEventValidation(((LinkButton)row.Cells[0].Controls[0]).UniqueID, "Select$" + row.RowIndex);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        base.Render(writer);&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;Now everything is ready just run the page and u can find that each gridview row is selectable as show in below figure.&lt;/li&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SZgBN6cPEwI/AAAAAAAAAz4/nUuKJTb33ws/s1600-h/row.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 121px;" src="http://1.bp.blogspot.com/_U6Mc_4x_N2E/SZgBN6cPEwI/AAAAAAAAAz4/nUuKJTb33ws/s400/row.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5302989899766371074" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p class=MsoNormal&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=MsoNormal&gt;&lt;b&gt;Making each GridView individual cells Clickable and Selectable:&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SZgB_oT3dtI/AAAAAAAAA0I/wZQ4kJdrvUg/s1600-h/column.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 130px;" src="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SZgB_oT3dtI/AAAAAAAAA0I/wZQ4kJdrvUg/s400/column.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5302990753892890322" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;ul style='margin-top:0cm' type=disc&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;First create a new Website application, attach any database or add connection string to the existing database in the web.config file.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;Add gridview along with DataSource control (SqlDataSource control) on to the page. Configure DataSource control to get records from some table.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;Assign DataSourceId of the GridView with the ID of the SqlDataSource control.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;Add ButtonField with some &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;Command Name&lt;/span&gt;&lt;/code&gt; say &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;“ColumnClick”&lt;/span&gt;&lt;/code&gt; to the GridView columns.&lt;/li&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&amp;lt;asp:ButtonField CommandName="ColumnClick" Visible="false" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;As we know the GridView &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;RowDatabound &lt;/span&gt;&lt;/code&gt;event is fired while binding each row to the GridView. Now we need to handle &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;GridView OnRowDataBound&lt;/span&gt;&lt;/code&gt; event to modify each cell in each GridView row as it is bound, where we can add attributes to each GridView cell to handle Onclick or OnDouble click event by adding client script which is used by the SingleClick button for postback and assign it to each cell. &lt;/li&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)&lt;br /&gt;    {&lt;br /&gt;        if (e.Row.RowType == DataControlRowType.DataRow)&lt;br /&gt;        {&lt;br /&gt;            if (e.Row.RowType == DataControlRowType.DataRow)&lt;br /&gt;            {&lt;br /&gt;                LinkButton _singleClickButton = (LinkButton)e.Row.Cells[0].Controls[0];&lt;br /&gt;                string _jsSingle = ClientScript.GetPostBackClientHyperlink(_singleClickButton, "");&lt;br /&gt;                // Add events to each editable cell&lt;br /&gt;                for (int columnIndex = 0; columnIndex &lt; e.Row.Cells.Count; columnIndex++)&lt;br /&gt;                {&lt;br /&gt;                    // Add the column index as the event argument parameter&lt;br /&gt;                    string js = _jsSingle.Insert(_jsSingle.Length - 2, columnIndex.ToString());&lt;br /&gt;                    // Add this javascript to the onclick Attribute of the cell&lt;br /&gt;                    e.Row.Cells[columnIndex].Attributes["onclick"] = js;&lt;br /&gt;                    // Add a cursor style to the cells&lt;br /&gt;                    e.Row.Cells[columnIndex].Attributes["style"] += "cursor:pointer;cursor:hand;";&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;We can similarly add client script for double click as well.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;Now each row of the GridView is clickable and we can get the details of the user selected cell in GridView &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;OnRowCommand &lt;/span&gt;&lt;/code&gt;event.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;So we need to handle &lt;code&gt;&lt;span style='line-height:115%;color:#990000'&gt;GridView’s OnRowCommand&lt;/span&gt;&lt;/code&gt; event to get the selected cell details as below. &lt;span class=apple-style-span&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif";color:black'&gt;Within the&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=apple-converted-space&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif";color:black'&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;code&gt;&lt;b&gt;&lt;span style='line-height:115%;color:#990000'&gt;RowCommand&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span class=apple-converted-space&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif";color:black'&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=apple-style-span&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;line-height:115%; font-family:"Verdana","sans-serif";color:black'&gt;event, the command argument and the event argument are retrieved. This gives us the row and column index of the selected cell. &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)&lt;br /&gt;    {&lt;br /&gt;        if (e.CommandName.ToString() == "ColumnClick")&lt;br /&gt;        {&lt;br /&gt;            foreach (GridViewRow r in GridView1.Rows)&lt;br /&gt;            {&lt;br /&gt;                if (r.RowType == DataControlRowType.DataRow)&lt;br /&gt;                {&lt;br /&gt;                    for (int columnIndex = 0; columnIndex &lt; r.Cells.Count; columnIndex++)&lt;br /&gt;                    {&lt;br /&gt;                        r.Cells[columnIndex].Attributes["style"] += "background-color:White;";&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            int selectedRowIndex = Convert.ToInt32(e.CommandArgument.ToString());&lt;br /&gt;            int selectedColumnIndex = Convert.ToInt32(Request.Form["__EVENTARGUMENT"].ToString());&lt;br /&gt;            GridView1.Rows[selectedRowIndex].Cells[selectedColumnIndex].Attributes["style"] += "background-color:Red;";&lt;br /&gt;            lblSelectedColumn.Text = selectedColumnIndex.ToString();&lt;br /&gt;            lblSelectedRow.Text = selectedRowIndex.ToString();&lt;br /&gt;            lblSelectedColumnTitle.Text = GridView1.Columns[selectedColumnIndex].HeaderText;&lt;br /&gt;            lblSelectedColumnValue.Text = GridView1.Rows[selectedRowIndex].Cells[selectedColumnIndex].Text;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;To overcome Event Validation errors we need to handle Pages Render method. Otherwise we will get the &lt;i&gt;Invalid postback or callback argument (Event validation is enabled using &amp;lt;pages enableEventValidation=&amp;quot;true&amp;quot;/&amp;gt; in configuration or &amp;lt;%@Page EnableEventValidation=&amp;quot;true&amp;quot; %&amp;gt; in a page. &amp;nbsp;For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. &amp;nbsp;If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.&lt;/i&gt;) error.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;As we know that for security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager. RegisterForEventValidation method in order to register the postback or callback data for validation.&lt;/li&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;So add the following code on to the page to register each gridview cell for event validation.&lt;/li&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;    protected override void Render(HtmlTextWriter writer)&lt;br /&gt;    {&lt;br /&gt;        foreach (GridViewRow r in GridView1.Rows)&lt;br /&gt;        {&lt;br /&gt;            if (r.RowType == DataControlRowType.DataRow)&lt;br /&gt;            {&lt;br /&gt;                for (int columnIndex = 0; columnIndex &lt; r.Cells.Count; columnIndex++)&lt;br /&gt;                {&lt;br /&gt;                    Page.ClientScript.RegisterForEventValidation(r.UniqueID + "$ctl00", columnIndex.ToString());&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        base.Render(writer);&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;li class=MsoNormal&gt;Now everything is ready just run the page and u can find that each gridview cell is selectable as show in below figure.&lt;/li&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SZgB_oT3dtI/AAAAAAAAA0I/wZQ4kJdrvUg/s1600-h/column.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 130px;" src="http://4.bp.blogspot.com/_U6Mc_4x_N2E/SZgB_oT3dtI/AAAAAAAAA0I/wZQ4kJdrvUg/s400/column.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5302990753892890322" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class=MsoNormal&gt;&lt;a href="http://www.box.net/shared/7aay58qjct" target="_blank"&gt;&lt;img src="http://anilchinnu21.googlepages.com/download-button.jpg" width="60px" height="60px"/&gt;Download the Sample Code here.&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-210482863213378092?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/210482863213378092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/02/making-gridview-rows-or-individual.html#comment-form' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/210482863213378092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/210482863213378092'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/02/making-gridview-rows-or-individual.html' title='Making GridView Rows or Individual Cells Clickable and Selectable.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6Mc_4x_N2E/SZgBN6cPEwI/AAAAAAAAAz4/nUuKJTb33ws/s72-c/row.jpg' height='72' width='72'/><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-8472710793713102956</id><published>2009-02-10T12:53:00.019-05:00</published><updated>2009-03-02T12:36:47.079-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 3.5'/><title type='text'>Enabling browser back button for GridView Paging and Sorting in Ajax 1.1 and 3.5 (using Visual Studio 2005/ Visual studio 2008)</title><content type='html'>&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Generally we  use browser back button frequently to go to back/previous page importantly its useful when we are searching using search controls (Textbox's, dropdowns, button..), or using Paging, Sorting etc.&lt;br /&gt;&lt;br /&gt;In all these case when there is a post back, the browser is updated with the information of the page visited and hence the back button gets enabled automatically. However if we are updating page using AJAX asynchronous requests, updating browser history is not taken care automatically. &lt;br /&gt;&lt;br /&gt;We need to do some tweaks to achieve this and enable browser back button by storing the state into browser history.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In a normal web page developed using ASP.NET browser history is updated for every post back i.e. when user clicks on the paging links or sorting links or search buttons etc. Hence user can easily check the previous records by clicking on browser back button.&lt;br /&gt;&lt;br /&gt;In an AJAX enabled web page where we have GridView inside an update panel browser history does not get update as post back happens asynchronously which browser is not aware of.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;In ASP.NET AJAX 3.5&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In .Net Framework 3.5 we have AJAX extensions like ScriptManager and UpdatePanel using which we develop AJAX enabled web pages.&lt;br /&gt;&lt;br /&gt;In ASP.NET SP1 we have History control which allows us to add history points to our AJAX Enabled page’s post backs and hence enable back button navigation for the users.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Enabling Browser back button for GridView Paging and Sorting using History points in ASP.NET 3.5 SP1.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. Set the property &lt;span style="font-style:italic;"&gt;EnableHistory=”true”&lt;/span&gt;  for the ScriptManager&lt;br /&gt;&lt;br /&gt;2. &lt;span style="font-weight:bold;"&gt;GridView Paging:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;1. Handle the OnPageIndexChanged event of the GridView with an event handler  &amp;nbsp;&amp;nbsp(ex: &lt;span style="font-style:italic;"&gt;OnPageIndexChanged = ”GridView1_PageIndexChanged”&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;2. Add the following handler code in the code behind as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;protected void GridView1_PageIndexChanged(object sender, GridViewPageEventArgs e)&lt;br /&gt;{&lt;br /&gt;   // To check if post back is Asynchronous&lt;br /&gt;   if (ScriptManager1.IsInAsyncPostBack &amp;amp;&amp;amp; !ScriptManager1.IsNavigating)&lt;br /&gt;   {&lt;br /&gt;       //To add History point with gridview selected page index value.&lt;br /&gt;       ScriptManager1.AddHistoryPoint("PageIndex", GridView1.PageIndex.ToString()); &lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;3. Handle the OnNavigate  event of the ScriptManager with an event handler &lt;br /&gt;&amp;nbsp;&amp;nbsp;(ex: &lt;span style="font-style:italic;"&gt;OnNavigate="ScriptManager1_Navigate"&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;4. Add the following handler code in the code behind as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;protected void ScriptManager1_Navigate(object sender, HistoryEventArgs e)&lt;br /&gt;{&lt;br /&gt;    // Get GridView PagIndex from history &lt;br /&gt;    string pageIndex = e.State["PageIndex"];&lt;br /&gt;    if (string.IsNullOrEmpty(pageIndex))&lt;br /&gt;    { &lt;br /&gt;        GridView1.PageIndex = 0;&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        GridView1.PageIndex = Convert.ToInt32(pageIndex);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;5. Now we can navigate across the pages with enabled back button.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;6. In the above case PageIndex is stored in the URL in encrypted format (Page &amp;nbsp;&amp;nbsp;state is encoded in the querystring of the browser, meaning that visitors &amp;nbsp;&amp;nbsp;can bookmark a particular state of an AJAX application). If you make &amp;nbsp;&amp;nbsp;EnableSecureHistoryState = “false” then its directly visible in the URL as &lt;a href="http://localhost/Sample/Default.aspx#&amp;amp;&amp;amp;PageIndex=1"&gt;http://localhost/Sample/Default.aspx#&amp;amp;&amp;amp;PageIndex=1&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;3. &lt;strong&gt;GridView Sorting:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;1. Handle the OnSorting event of the GridView with an event handler (ex: &lt;span style="font-style:italic;"&gt;OnSorting="GridView1_Sorting"&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;2. Add the following handler code in the code behind as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)&lt;br /&gt;{&lt;br /&gt;   // Create the history state for Direction and Expression&lt;br /&gt;   ScriptManager1.AddHistoryPoint("SortExpression", e.SortExpression);&lt;br /&gt;   ScriptManager1.AddHistoryPoint("SortDirection", e.SortDirection.ToString());&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;3. Handle the OnNavigate  event of the ScriptManager with an event handler (ex: &lt;span style="font-style:italic;"&gt;OnNavigate="ScriptManager1_Navigate"&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;4. Add the following handler code in the code behind as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;protected void ScriptManager1_Navigate(object sender, HistoryEventArgs e)&lt;br /&gt;{&lt;br /&gt;   if (!string.IsNullOrEmpty(e.State["SortExpression"]))&lt;br /&gt;   {&lt;br /&gt;      string sortExpression = e.State["SortExpression"];&lt;br /&gt;      SortDirection sortDirection = (SortDirection)Enum.Parse(typeof(SortDirection), e.State["SortDirection"]);&lt;br /&gt;      // Sort the grid according to the sort information in the history state&lt;br /&gt;      GridView1.Sort(sortExpression, sortDirection);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;5. In the above case SortExpression and SortDirection is stored in the URL in   encrypted format (Page state is encoded in the querystring of the browser, meaning that visitors can bookmark a particular state of an AJAX application). If you make &lt;span style="font-weight:bold;"&gt;EnableSecureHistoryState = “false”&lt;span style="font-style:italic;"&gt;&lt;/span&gt;&lt;/span&gt; then its directly visible in the URL as &lt;a href="http://localhost/Sample/Default.aspx#&amp;amp;&amp;amp;PageIndex=1"&gt;http://localhost/Sample/Default.aspx#&amp;amp;&amp;amp;SortDirection=Ascending&amp;amp;SortExpression=SectorName&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Enabling Browser back button for GridView Paging and Sorting in ASP.NET 2.0 (AJAX 1.1) using nikhils UpdateControls. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Download Nikhils &lt;a href="http://www.nikhilk.net/Content/Samples/UpdateControls.zip"&gt;UpdateControls here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. Create Ajax enabled website in ASP.NET 2.0.&lt;br /&gt;&lt;br /&gt;3. Add reference to UpdateControls.dll &lt;br /&gt;&lt;br /&gt;4. Register tagprefix&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt; &amp;lt;%@ Register Assembly="nStuff.UpdateControls" Namespace="nStuff.UpdateControls" TagPrefix="uc" %&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;  Then add UpdateHistory control below ScriptManager.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt; &amp;lt;uc:UpdateHistory ID="UpdateHistory1" runat="server" OnNavigate="ScriptManager1_Navigate"&amp;gt;&lt;br /&gt; &amp;lt;/uc:UpdateHistory&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;5. &lt;strong&gt;GridView Paging and Sorting.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;1. Handle GridView Sorting and PageIndexChanged events as below where we will add an entry to history with PageIndex or SortExpression and Direction.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;     &lt;br /&gt;protected void GridView1_PageIndexChanged(object sender, GridViewSortEventArgs e)&lt;br /&gt;{&lt;br /&gt;   // Create the history state for new page index&lt;br /&gt;   UpdateHistory1.AddEntry("PageIndex="+ GridView1.PageIndex.ToString());&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)&lt;br /&gt;{&lt;br /&gt;   // Create the history state for Direction and Expression&lt;br /&gt;   ScriptManager1.AddHistoryPoint("SortExpression", e.SortExpression);&lt;br /&gt;   ScriptManager1.AddHistoryPoint("SortDirection", e.SortDirection.ToString());&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;6. Finally we need to handle  OnNavigate  Event of UpdateHistory control to get the PageIndex and SortExpression and set to gridview. This OnNavigate event is fired when the user tries to navigate using browser back and forward buttons.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;protected void ScriptManager1_Navigate(object sender, HistoryEventArgs e)&lt;br /&gt;{&lt;br /&gt;  string entryName = e.EntryName.ToString();&lt;br /&gt;  if (e.EntryName.Contains("SortDirection") &amp;&amp; e.EntryName.Contains("SortExpression"))&lt;br /&gt;  {&lt;br /&gt;    string[] splitter = new String[1];&lt;br /&gt;    splitter[0] = "&amp;&amp;";&lt;br /&gt;    string[] text = e.EntryName.Split(splitter, StringSplitOptions.None);&lt;br /&gt;    string sortExpression = text[1].Replace("SortExpression=", "");&lt;br /&gt;    string strSortDirection = text[0].Replace("SortDirection=", "");&lt;br /&gt;    SortDirection sortDirection = (SortDirection)Enum.Parse(typeof(SortDirection), strSortDirection);&lt;br /&gt; &lt;br /&gt;    // Sort the grid according to the sort information in the history state&lt;br /&gt;    GridView1.Sort(sortExpression, sortDirection);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;    // Get GridView PagIndex from history &lt;br /&gt;    string pageIndex = string.Empty;&lt;br /&gt;    if (e.EntryName.Contains("PageIndex"))&lt;br /&gt;    {&lt;br /&gt;      pageIndex = e.EntryName.Replace("PageIndex=", "");&lt;br /&gt;    }&lt;br /&gt;    if (string.IsNullOrEmpty(pageIndex))&lt;br /&gt;    {&lt;br /&gt;       GridView1.PageIndex = 0;&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        GridView1.PageIndex = Convert.ToInt32(pageIndex);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Enable browser back and forward button support for Gridview paging and sorting in ASP.NET AJAX using jQuery.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To enable browser back and forward button support for GridView paging and sorting in ASP.NET AJAX using jQuery History plugin. jQuery is popular and widely used Javascript library and will take care of browser compatibility for our script.&lt;br /&gt;&lt;br /&gt;Read the full article on this Here &lt;span style="font-style:italic;"&gt;&lt;span style="font-style:italic;"&gt;&lt;a href="http://interviews.dotnetthread.com/2009/03/enable-browser-back-and-forward-button.html"&gt;Enable browser back and forward button support for Gridview paging and sorting in ASP.NET AJAX using jQuery.&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;We can also achieve the same functionality using the following libraries.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://www.asual.com/swfaddress/"&gt;SWFAddress&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. &lt;a href="http://plugins.jquery.com/project/historyevent"&gt;History Event: jQuery Plugin&lt;/a&gt; &lt;span style="font-weight:bold;"&gt;&lt;br /&gt;(Ex:&lt;a href="http://interviews.dotnetthread.com/2009/02/enabling-browser-backforward-button.html"&gt;http://interviews.dotnetthread.com/2009/02/enabling-browser-backforward-button.html&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3. &lt;a href="http://www.blogger.com/RSH%20(Really%20Simple%20History"&gt;RSH (Really Simple History&lt;/a&gt;&lt;a href="http://plugins.jquery.com/project/historyevent"&gt;  - EX:  &lt;/a&gt;&lt;a href="http://www.justise.com/2009/01/26/enabling-the-back-button-in-ajax-applications/"&gt;http://www.justise.com/2009/01/26/enabling-the-back-button-in-ajax-applications/&lt;/a&gt;&lt;a href="http://plugins.jquery.com/project/historyevent"&gt; &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4. &lt;a href="http://digitarald.de/project/history-manager/"&gt;HistoryManager: Mootools Plugin&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Dowload Source Code&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For AJAX 3.5 using ASP.NET 3.5 SP1 &lt;/strong&gt;– &lt;a href="http://www.box.net/shared/x2fzb8n8oh"&gt;Download Here &lt;img src="http://anilchinnu21.googlepages.com/button-download.jpg" height="15"/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For AJAX 1.1 using ASP.NET 2.0 and nikhils UpdateControls &lt;/strong&gt;– &lt;a href="http://www.box.net/shared/pcrtxs1g8m"&gt;Download Here &lt;img src="http://anilchinnu21.googlepages.com/button-download.jpg" height="15"/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; You have to change connection string in Web.config and also configure sqldatasource with local db table for running the sample application.&lt;br /&gt;Also Update the code to use GridView PageIndexChanged instead of PageIndexChanging.&lt;br /&gt;&lt;br /&gt;Happy coding with AJAX…..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-8472710793713102956?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/8472710793713102956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/02/enabling-browser-back-button-for.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/8472710793713102956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/8472710793713102956'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/02/enabling-browser-back-button-for.html' title='Enabling browser back button for GridView Paging and Sorting in Ajax 1.1 and 3.5 (using Visual Studio 2005/ Visual studio 2008)'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-715750169991747359</id><published>2009-02-10T10:50:00.003-05:00</published><updated>2009-02-10T11:36:22.283-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>How to retrieve original request URL when using URL rewriting or Server.Transfer in ASP.NET.</title><content type='html'>&lt;br/&gt;&lt;br/&gt;The best way to retrieve original Request URL when URL rewriting is implemented is by using &lt;span style="font-weight:bold;"&gt;Request.ServerVariables("HTTP_X_REWRITE_URL") &lt;/span&gt;&lt;br /&gt;This will work with all kinds of URL rewriting methods like using ISAPI filters, HTTP Handlers or Http Modules..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Before any URI modification original Request URI is saved into the HTTP header named X-Rewrite-URL.&lt;br /&gt;&lt;br /&gt;And this can be retrieved in ASP.NET using Request.ServerVariables("HTTP_X_REWRITE_URL") alias.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-715750169991747359?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/715750169991747359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/02/how-to-retrieve-original-request-url.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/715750169991747359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/715750169991747359'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/02/how-to-retrieve-original-request-url.html' title='How to retrieve original request URL when using URL rewriting or Server.Transfer in ASP.NET.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-7739785184780458299</id><published>2009-01-26T09:03:00.001-05:00</published><updated>2009-01-26T09:03:37.745-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>What is difference between Dataset.clone and Dataset.copy ?</title><content type='html'>Clone: - It only copies structure, does not copy data.&lt;br /&gt;Copy: - Copies both structure and data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-7739785184780458299?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/7739785184780458299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/what-is-difference-between-datasetclone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7739785184780458299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7739785184780458299'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/what-is-difference-between-datasetclone.html' title='What is difference between Dataset.clone and Dataset.copy ?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-5740539778999656730</id><published>2009-01-26T08:55:00.002-05:00</published><updated>2009-01-26T09:00:02.570-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Why is DataSet slower than DataReader ?</title><content type='html'>&lt;div&gt;Following are the major differences between “DataSet” and “DataReader” :-&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt; “DataSet” is a disconnected architecture, while “DataReader” has live connection while reading data. If we want to cache data and pass to a different tier “DataSet” forms the best choice and it has decent XML support.&lt;/li&gt;&lt;li&gt; When application needs to access data from more than one table “DataSet” forms the best choice.&lt;/li&gt;&lt;li&gt;If we need to move back while reading records, “datareader” does not support this functionality.&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;But one of the biggest drawbacks of DataSet is speed. As “DataSet” carry considerable overhead because of relations, multiple tables etc speed is slower than “DataReader”. Always try to use “DataReader” wherever possible, as it’s meant specially for speed performance.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-5740539778999656730?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/5740539778999656730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/why-is-dataset-slower-than-datareader.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5740539778999656730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5740539778999656730'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/why-is-dataset-slower-than-datareader.html' title='Why is DataSet slower than DataReader ?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2694830674867724602</id><published>2009-01-18T12:57:00.003-05:00</published><updated>2009-01-18T13:02:46.159-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Solutions For Errors'/><title type='text'>Cause of Error - An unhandled exception of type 'System.StackOverflowException' occurred in system.data.dll</title><content type='html'>&lt;span style="font-weight:bold;"&gt;"An unhandled exception of type 'System.StackOverflowException' occurred in system.data.dll"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Check if you have accidentally called same method inside a method with object for the same class.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;Example:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;public class &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;UsersBAL&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;   public DataTable &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;UserDetails&lt;/span&gt;(int UserId,string UserName)&lt;br /&gt;   { &lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;        UsersBAL &lt;/span&gt;objUsers = new &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;UsersBAL&lt;/span&gt;();&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;DataTable dtUserDetails = new DataTable();&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;dtUserDetails = objUsers.&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;UserDetails&lt;/span&gt;(UserId, UserName);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;return dtUserDetails;&lt;div&gt;    }&lt;br /&gt;}&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2694830674867724602?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2694830674867724602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/cause-of-error-unhandled-exception-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2694830674867724602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2694830674867724602'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/cause-of-error-unhandled-exception-of.html' title='Cause of Error - An unhandled exception of type &apos;System.StackOverflowException&apos; occurred in system.data.dll'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-7519178682042096308</id><published>2009-01-16T06:36:00.001-05:00</published><updated>2009-01-16T06:37:47.145-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><title type='text'>Usage of JavaScript eval() Function.</title><content type='html'>The eval() function evaluates a string and executes as it is a script code.&lt;br /&gt;&lt;br /&gt;Syntax: eval(string)&lt;br /&gt;&lt;br /&gt;Usage Example:&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;eval("x=10;y=20;document.write(x*y)");&lt;br /&gt;document.write("&amp;lt;br /&amp;gt");&lt;br /&gt;&lt;br /&gt;document.write(eval("2+2"));&lt;br /&gt;document.write("&amp;lt;br /&amp;gt");&lt;br /&gt;&lt;br /&gt;var x=10;&lt;br /&gt;document.write(eval(x+17));&lt;br /&gt;document.write("&amp;lt;br /&amp;gt");&lt;br /&gt;&lt;br /&gt;eval("alert('Hello world')");&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-7519178682042096308?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/7519178682042096308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/usage-of-javascript-eval-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7519178682042096308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7519178682042096308'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/usage-of-javascript-eval-function.html' title='Usage of JavaScript eval() Function.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-1059212694319588352</id><published>2009-01-16T04:29:00.001-05:00</published><updated>2009-01-16T06:29:29.028-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Log Unhandled Exceptions in Application and redirect users to Custom Error Page.</title><content type='html'>To catch the unhandled exceptions in the application we need to handle Application_Error event Handler in Global.asax file.&lt;br /&gt;&lt;br /&gt;Add Global.asax file to the project then in Application_Error method we can get the Exception by using Server.GetLastError(). Then we can log the error discription into Log file or Database.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;void Application_Error(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        // Code that runs when an unhandled error occurs&lt;br /&gt;        Exception ex = Server.GetLastError().GetBaseException();&lt;br /&gt;        string errorMessage  = ex.Message.ToString();&lt;br /&gt;&lt;br /&gt;        // Log the error Here into Log file or Database&lt;br /&gt;              &lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now to redirect the user to Custom Error page on un-handled exceptions in web.config under CustomErrors section make Mode="On" and set defaultRedirect to ErrorPage.&lt;br /&gt;&lt;br /&gt;We can also have different error pages for different errors as below, for 404 file not found.&lt;br /&gt;&lt;pre name="code" class="csharp"&gt;&lt;br /&gt;&amp;lt;customErrors mode="On"defaultRedirect="ErrorPage.aspx"&amp;gt;&lt;br /&gt; &amp;lt;errorstatusCode="403"redirect="NoAccess.htm" /&amp;gt;&lt;br /&gt; &amp;lt;errorstatusCode="404"redirect="FileNotFound.htm" /&amp;gt;&lt;br /&gt;&amp;lt;/customErrors&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-1059212694319588352?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/1059212694319588352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/log-unhandled-exceptions-in-application.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1059212694319588352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1059212694319588352'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/log-unhandled-exceptions-in-application.html' title='Log Unhandled Exceptions in Application and redirect users to Custom Error Page.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3090626998466162084</id><published>2009-01-14T04:28:00.005-05:00</published><updated>2009-01-14T04:34:35.634-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Framework'/><title type='text'>What is a CLR?</title><content type='html'>Full form of CLR is Common Language Runtime and it forms the heart of the .NET framework.&lt;br /&gt;&lt;br /&gt;All Languages have runtime and its the responsibility of the runtime to take care of the code execution of the program. For example VC++ has MSCRT40.DLL,VB6 has MSVBVM60.DLL,Java has Java Virtual Machine etc. Similarly .NET has CLR. Following are the responsibilities of CLR&lt;br /&gt;&lt;br /&gt;√ Garbage Collection :- CLR automatically manages memory thus eliminating&lt;br /&gt;memory leaks. When objects are not referred GC automatically releases those&lt;br /&gt;memories thus providing efficient memory management.&lt;br /&gt;&lt;br /&gt;√ Code Access Security :- CAS grants rights to program depending on the security&lt;br /&gt;configuration of the machine. Example the program has rights to edit or create&lt;br /&gt;a new file but the security configuration of machine does not allow the program&lt;br /&gt;to delete a file. CAS will take care that the code runs under the environment of&lt;br /&gt;machines security configuration.&lt;br /&gt;&lt;br /&gt;√ Code Verification :- This ensures proper code execution and type safety while&lt;br /&gt;the code runs. It prevents the source code to perform illegal operation such as&lt;br /&gt;accessing invalid memory locations etc.&lt;br /&gt;&lt;br /&gt;√ IL( Intermediate language )-to-native translators and optimizer’s :- CLR uses&lt;br /&gt;JIT and compiles the IL code to machine code and then executes. CLR also&lt;br /&gt;determines depending on platform what is optimized way of running the IL&lt;br /&gt;code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-3090626998466162084?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/3090626998466162084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/what-is-clr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3090626998466162084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3090626998466162084'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/what-is-clr.html' title='What is a CLR?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3714216804066239254</id><published>2009-01-14T04:28:00.001-05:00</published><updated>2009-01-14T04:28:51.624-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Framework'/><title type='text'>What is IL or MSIL or CIL , What is JIT?</title><content type='html'>(IL)Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL(Common Intermediate Language). All .NET source code is compiled to IL. This IL is then converted to machine code at the point where the software is installed, or at run-time by a Just-In-Time (JIT) compiler.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-3714216804066239254?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/3714216804066239254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/what-is-il-or-msil-or-cil-what-is-jit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3714216804066239254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3714216804066239254'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/what-is-il-or-msil-or-cil-what-is-jit.html' title='What is IL or MSIL or CIL , What is JIT?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-8776567378923760540</id><published>2009-01-14T02:56:00.001-05:00</published><updated>2009-01-14T02:56:32.601-05:00</updated><title type='text'>Jobs for QA</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Software Test Associate:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Employer Name: qaguild.com&lt;br /&gt;Employer Address: bangalore/mangalore, karnataka, India&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Job Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Qaguild invites applications from engineers / postgraduates to join their testing team as Software Test Associate. (On contract). Year of passing is not a constraint. However freshers passing out in the year 2009 can also apply.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.jobthread.com/jt/jobs/widget_click.php?id=85794d&amp;job_id=244234"&gt;Complete Details&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.jobthread.com/jt/jobs/widget_click.php?id=85794d&amp;job_id=244234"&gt;Apply Now&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Test Architect:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Employer Name: Venture Infotek, Mumbai&lt;br /&gt;Employer Address: Mumbai, Maharashtra, India&lt;br /&gt;URL: www.ventureinfotek.com&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Job Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.jobthread.com/jt/jobs/widget_click.php?id=85794d&amp;job_id=246496"&gt;Complete Details&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.jobthread.com/jt/jobs/widget_click.php?id=85794d&amp;job_id=246496"&gt;Apply Now&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Test Engineer:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Employer Name: www.ventureinfotek.com&lt;br /&gt;Employer Address: Mumbai, Maharashtra, India Venture Infotek, Mumbai&lt;br /&gt;URL: www.ventureinfotek.com&lt;br /&gt;Required Skills: Test Engineer&lt;br /&gt;Required Experience: 2-4 years&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Job Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.jobthread.com/jt/jobs/widget_click.php?id=85794d&amp;job_id=246489"&gt;Complete Details&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.jobthread.com/jt/jobs/widget_click.php?id=85794d&amp;job_id=246489"&gt;Apply Now&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-8776567378923760540?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/8776567378923760540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/jobs-for-qa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/8776567378923760540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/8776567378923760540'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/jobs-for-qa.html' title='Jobs for QA'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3225369937419576962</id><published>2009-01-14T02:34:00.000-05:00</published><updated>2009-01-14T02:35:26.527-05:00</updated><title type='text'>Walk-in for Java Engineers (Saturday - Jan 17, 09)</title><content type='html'>Day &amp; Date: Saturday - Jan 17, 2009&lt;br /&gt;Time:           10:00 AM to 1:00 PM&lt;br /&gt;Venue:         ValueLabs Campus.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Selection process:&lt;br /&gt; &lt;br /&gt;Technical test in Java – on Jan 17, 2009&lt;br /&gt;Interviews: During the weekdays for the candidates shortlisted in the written test.&lt;br /&gt; &lt;br /&gt;Requirement:&lt;br /&gt; &lt;br /&gt;Strong in core Java, Jsp, Servlets, Xml, Javascript&lt;br /&gt;Excellent communication and presentation skills&lt;br /&gt;Experience: 3 to 5 yrs relevant experience&lt;br /&gt;Qualification: BE / B.Tech / ME / M.Tech / MCA / M.Sc&lt;br /&gt;The eligible candidates can directly walkin for the selection process on Saturday - Jan 17, 2009.&lt;br /&gt; &lt;br /&gt;Things to carry&lt;br /&gt; &lt;br /&gt;Updated resume - Hardcopy&lt;br /&gt;Latest passport size photograph&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-3225369937419576962?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/3225369937419576962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/walk-in-for-java-engineers-saturday-jan.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3225369937419576962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3225369937419576962'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/walk-in-for-java-engineers-saturday-jan.html' title='Walk-in for Java Engineers (Saturday - Jan 17, 09)'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-4617581229373938546</id><published>2009-01-13T00:29:00.000-05:00</published><updated>2009-01-13T00:30:39.754-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Can we have different access modifier for get or set accessor with that of property in a property.</title><content type='html'>Yes, Only thing which we need to take care is that accessibility modifier of the get or set accessor must be more restrictive than the property. Also we Cannot specify accessibility modifiers for both accessors of the property at a time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ex:&lt;br /&gt;&lt;br /&gt;    private string _Name;&lt;br /&gt;&lt;br /&gt;    public string Name&lt;br /&gt;    {&lt;br /&gt;        protected get { return _Name; }&lt;br /&gt;        set { _Name = value; }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;In the above example we have protected get and internal set accessors in a public property.&lt;br /&gt;We cant have accessibility modifiers for both accessors of the property at a time, like we cant have internal for set accessor.&lt;br /&gt;&lt;br /&gt;The same example can be written as below which is called &lt;a href="http://interviews.dotnetthread.com/2009/01/automatic-property-without-backfield-in.html"&gt;Automatic Property&lt;/a&gt; in C# 3.0&lt;br /&gt;&lt;br /&gt;Ex:&lt;br /&gt;   public string Name&lt;br /&gt;    {&lt;br /&gt;        protected get;&lt;br /&gt;        set;&lt;br /&gt;    }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-4617581229373938546?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/4617581229373938546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/can-we-have-different-access-modifier.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4617581229373938546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4617581229373938546'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/can-we-have-different-access-modifier.html' title='Can we have different access modifier for get or set accessor with that of property in a property.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2346804132308985026</id><published>2009-01-13T00:27:00.000-05:00</published><updated>2009-01-13T00:29:17.650-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Automatic Property (without backfield) in C# 3.0</title><content type='html'>In C# 3.0 (Shipped with Visual studio 2008) we have a new feature called Automatic Property through which we can declare a property with empty get and set accessors. The compilor CLR will take care of automatically generating backfield(private Variable ex:_Name) at runtime.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   //Conventional Way&lt;br /&gt;   private string _Name;&lt;br /&gt;   public string Name&lt;br /&gt;   {&lt;br /&gt;       get { return _Name;}&lt;br /&gt;       set { _Name = value; }&lt;br /&gt;   }&lt;br /&gt; &lt;br /&gt;   //Automatic Property&lt;br /&gt;   public int Name&lt;br /&gt;   {&lt;br /&gt;       get;&lt;br /&gt;       set;&lt;br /&gt;   }    &lt;br /&gt;&lt;br /&gt;Any ways if you want to impliment your own filter logic you can always use Conventional way having back field.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2346804132308985026?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2346804132308985026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/automatic-property-without-backfield-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2346804132308985026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2346804132308985026'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/automatic-property-without-backfield-in.html' title='Automatic Property (without backfield) in C# 3.0'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-749647656523140632</id><published>2009-01-02T12:53:00.001-05:00</published><updated>2009-01-02T12:58:32.983-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>How to disallow user to enter special charaters in HTML input type text.</title><content type='html'>Say we have HTML input control with type text for accepting Name from the user.&lt;br /&gt;Here we should not allow special characters to be entered except few characters like (',-).&lt;br /&gt;&lt;br /&gt;for doing this in HTML we will create Javascript function which does this and call this function on "onkeypress" event.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;&lt;br /&gt;function ValidateName(name,e)&lt;br /&gt;  {&lt;br /&gt;      // To handle copy paste scenarios&lt;br /&gt;      // replace unmaching characters in textbox value with empty&lt;br /&gt;      var nameRegex = /^[A-Za-z',.-]{0,50}$/;&lt;br /&gt;      while (!name.value.match(nameRegex)) {&lt;br /&gt;          name.value = name.value.replace(/[^a-zA-Z,'.-]+/, "");&lt;br /&gt;      }&lt;br /&gt;      //FF and IE&lt;br /&gt;      e = e || window.event;&lt;br /&gt;      var allow = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,'-";&lt;br /&gt;      var keycode = e.which || e.keyCode; //For both FF and IE&lt;br /&gt;      if (allow.indexOf(String.fromCharCode(keycode)) &lt; 0 &amp;&amp; keycode != 13 &amp;&amp; keycode != 0)&lt;br /&gt;       {&lt;br /&gt;          return false;&lt;br /&gt;       }&lt;br /&gt;      return true;&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Form allow character string as "abc...zAB..Z,'.-" then checking the typed key (by user), then return false if it not matches with any of the allowed characters.&lt;br /&gt;&lt;br /&gt;To handle copy paste scenarios. Write regular expression to allow requered charaters(in my case A-Za-z',.-), then replace unmaching characters in textbox value with empty. Use while loop to remove all umatching group of characters.&lt;br /&gt;&lt;br /&gt;calling this function as&lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;&lt;br /&gt;&amp;lt;input type="text" name="txtName" id="txtName" onkeypress="return ValidateName(this,event);" onchange="return ValidateName(this,event);" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Hey one more important thing if user uses mouse to copy and paste name and then clicks on submit button by mouse then onkeypress will not work so better if we also use "onchange" or "onblur" event too, to call the same function.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-749647656523140632?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/749647656523140632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2009/01/how-to-disallow-user-to-enter-special.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/749647656523140632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/749647656523140632'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2009/01/how-to-disallow-user-to-enter-special.html' title='How to disallow user to enter special charaters in HTML input type text.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3611790556499876103</id><published>2008-12-23T13:47:00.004-05:00</published><updated>2008-12-23T13:54:33.681-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 3.5'/><title type='text'>How AJAX is included as a first class concept in both ASP.NET 3.5 and Visual Studio 2008.</title><content type='html'>• In ASP.NET we will not find Ajax enabled website template as ASP.NET Ajax is now part of ASP.NET 3.5.&lt;br /&gt;• No need of any separate installations for AJAX Extensions as it is in built.&lt;br /&gt;• Every page should have ScriptManager in the form.&lt;br /&gt;• As ASP.NET Toolkit is a community driven project, Download Control toolkit for ASP.NET AJAX 3.5 which is separately built for 3.5 download at www.asp.net/ajax/. Add them to Toolkit Toolbar.&lt;br /&gt;• In Visual Studio 2008 a new cool feature added after adding AJAX control toolkit, is for all controls like button we will find helper expansion available which makes Visual Studio control extender aware. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SVEy9qlBj_I/AAAAAAAAAwE/WBy5ZJTL5a4/s1600-h/AJAX_control_extender.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:left;cursor:pointer; cursor:hand;width: 400px; height: 227px;" src="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SVEy9qlBj_I/AAAAAAAAAwE/WBy5ZJTL5a4/s400/AJAX_control_extender.jpg" border="0" alt="AJAX toolkit extender support in visual studio 2008" id="BLOGGER_PHOTO_ID_5283059872865292274" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;• When we focus to control that have extenders (Control enhancements that are designed to extend the visual behavioural properties of the control) visual studio now understands that when extenders included in visual studio environment for the control that is highlighted, it gives option in designer to add extender to control by giving list of available extenders for that control, just by selecting that we can add extender control. &lt;br /&gt;• (Ex: for Button we have AlwaysVisibleControlExtender, AnimationExtender, ConfirmButtonExtender.. etc)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SVEynhO5WyI/AAAAAAAAAv8/wWez_OOTjyY/s1600-h/ExtendersButton.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:left;cursor:pointer; cursor:hand;width: 400px; height: 227px;" src="http://3.bp.blogspot.com/_U6Mc_4x_N2E/SVEynhO5WyI/AAAAAAAAAv8/wWez_OOTjyY/s400/ExtendersButton.jpg" border="0" alt="Control Extenders for Button Control in ASP.NET AJAX Control toolkit" id="BLOGGER_PHOTO_ID_5283059492399438626" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;• We can automatically know simply by setting focus to the control that, that control type has extenders available for your use.&lt;br /&gt;• Also do not have to figure out which control extenders are appropriate for which control types because when we select on the control helper a dialog pops up and show all of the extenders in place that are appropriate for that control. So, this is a very useful addition in VS2008 when using ASP.NET AJAX and Toolkit because it will point you to right extenders that are appropriate for the control that you are working at that point of time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-3611790556499876103?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/3611790556499876103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/how-ajax-is-included-as-first-class.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3611790556499876103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3611790556499876103'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/how-ajax-is-included-as-first-class.html' title='How AJAX is included as a first class concept in both ASP.NET 3.5 and Visual Studio 2008.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_U6Mc_4x_N2E/SVEy9qlBj_I/AAAAAAAAAwE/WBy5ZJTL5a4/s72-c/AJAX_control_extender.jpg' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-617773655889128973</id><published>2008-12-22T12:09:00.002-05:00</published><updated>2008-12-22T12:12:23.417-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><title type='text'>Visual Studio Team System graphical overview.</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6Mc_4x_N2E/SU_KG5nBQUI/AAAAAAAAAv0/vw7RJTefcw4/s1600-h/VSTS_Overview.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 226px;" src="http://2.bp.blogspot.com/_U6Mc_4x_N2E/SU_KG5nBQUI/AAAAAAAAAv0/vw7RJTefcw4/s400/VSTS_Overview.png" border="0" alt="Visual Studio Team System graphical overview (VSTS representation)" id="BLOGGER_PHOTO_ID_5282663107821388098" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-617773655889128973?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/617773655889128973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/visual-studio-team-system-graphical.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/617773655889128973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/617773655889128973'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/visual-studio-team-system-graphical.html' title='Visual Studio Team System graphical overview.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_U6Mc_4x_N2E/SU_KG5nBQUI/AAAAAAAAAv0/vw7RJTefcw4/s72-c/VSTS_Overview.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-5004277658053104623</id><published>2008-12-18T03:37:00.000-05:00</published><updated>2008-12-18T03:39:24.131-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><title type='text'>What is a SharePoint site?</title><content type='html'>A SharePoint site is a Web site that provides a central storage and collaboration space for documents, information, and ideas. A SharePoint site is a tool for collaboration, just like a telephone is a tool for communication, or a meeting is a tool for decision making. A SharePoint site helps groups of people (whether work teams or social groups) share information and work together. For example, a SharePoint site can help you: &lt;br /&gt;&lt;br /&gt;* Coordinate projects, calendars, and schedules.&lt;br /&gt;* Discuss ideas and review documents or proposals.&lt;br /&gt;* Share information and keep in touch with other people.&lt;br /&gt;&lt;br /&gt;SharePoint sites are dynamic and interactive -- members of the site can contribute their own ideas and content as well as comment on or contribute to other people's.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-5004277658053104623?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/5004277658053104623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/what-is-sharepoint-site.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5004277658053104623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5004277658053104623'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/what-is-sharepoint-site.html' title='What is a SharePoint site?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-5968972083932477263</id><published>2008-12-10T00:27:00.000-05:00</published><updated>2008-12-10T00:28:49.526-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Debugging'/><title type='text'>How to Debug Classic ASP pages in Visual Studio 2008.</title><content type='html'>If you are working on a project in Visual Studio 2008 which has both Classic ASP (VBScript) and ASPX pages and if you are not able to debug classic ASP pages (Not able to put break point) in classic ASP pages then try Installing Visual Studio 2008 Service Pack 1. It will definetly works.&lt;br /&gt;&lt;br /&gt;Then you can debug thereafter by attaching dllhost.exe process.&lt;br /&gt;&lt;br /&gt;Debug &gt;&gt; Attach Process &gt;&gt; Select dllhost.exe (with Script and T-SQL code types selected)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-5968972083932477263?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/5968972083932477263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/how-to-debug-classic-asp-pages-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5968972083932477263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5968972083932477263'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/how-to-debug-classic-asp-pages-in.html' title='How to Debug Classic ASP pages in Visual Studio 2008.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-4160047698360023674</id><published>2008-12-08T05:05:00.005-05:00</published><updated>2008-12-10T00:32:07.376-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><title type='text'>Regular expression in the javascript.....</title><content type='html'>&lt;strong&gt;Zip code validation:&lt;/strong&gt;&lt;br /&gt;function validateZipCode(elementValue){&lt;br /&gt;    var zipCodePattern = /^\d{5}$|^\d{5}-\d{4}$/;&lt;br /&gt;     return zipCodePattern.test(elementValue);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;If you don’t want to have a zip+4 format you can use /^\d{5}$/ as the regular expression to validate simple zip code.&lt;br /&gt;&lt;br /&gt;var fnameRegxp = /^([a-zA-Z]+)$/;&lt;br /&gt;&lt;br /&gt;This statement checks that only upper or lowercase case letters, repeated one or more times, pass the &lt;br /&gt;&lt;br /&gt;validation test, which, unless you’re hoping to send your newsletter to C3PO, should be the case.  &lt;br /&gt;&lt;br /&gt;Remember when I mentioned that regular expressions can still return true if there are incorrect &lt;br /&gt;&lt;br /&gt;characters present, provided that the correct pattern of characters is somewhere within the string?  &lt;br /&gt;&lt;br /&gt;Putting the circumflex and dollar sign at the beginning and end of the regular expression ensures that &lt;br /&gt;&lt;br /&gt;this does not happen, and that the string is only valid if it contains just what you’re asking for.&lt;br /&gt;&lt;br /&gt;var lnameRegxp = /^([a-zA-Z]+)$/;&lt;br /&gt;&lt;br /&gt;var houseRegxp = /^([0-9A-Za-z]+)$/;&lt;br /&gt;&lt;br /&gt;These then check that the surname entered is also any upper or lowercase character repeated one or more &lt;br /&gt;&lt;br /&gt;times, and that the house name consists of just numbers and letters. You could have shortened this to &lt;br /&gt;&lt;br /&gt;/^([\w]+)$/ using the shorthand escape code for "any word character," but that would allow underscores &lt;br /&gt;&lt;br /&gt;to be used, which rarely feature in property names.   &lt;br /&gt;&lt;br /&gt;var pcodeRegxp = /^([A-Za-z]{1,2})([0-9]{2,3})([A-Za-z]&lt;br /&gt;{2})$/;&lt;br /&gt;&lt;br /&gt;var telnoRegxp = /^([0-9]{11})$/;&lt;br /&gt;&lt;br /&gt;I’ve used local examples for the post code (the UK version of a zip code) and telephone regular &lt;br /&gt;&lt;br /&gt;expressions. UK postcodes are in a format consisting of one or two letters, followed by two or three &lt;br /&gt;&lt;br /&gt;numbers (depending on the county), and followed again by two letters. It should be easy to see how you &lt;br /&gt;&lt;br /&gt;could change this to match your own local form of postal or zip code and telephone number formats. The &lt;br /&gt;&lt;br /&gt;phone number check simply ensures that the correct number of numbers is present. Following these comes &lt;br /&gt;&lt;br /&gt;the most complex of regular expressions -- those that check for valid email addresses and URLs:&lt;br /&gt;&lt;br /&gt;var emailRegxp = /^([\w]+)(.[\w]+)*@([\w]+)(.[\w]{2,3})&lt;br /&gt;{1,2}$/;&lt;br /&gt;&lt;br /&gt;var urlRegxp = /^(http:\/\/www.|https:\/\/www.|ftp:\/&lt;br /&gt;\/www.|www.){1}([\w]+)(.[\w]+){1,2}$/;&lt;br /&gt;&lt;br /&gt;Due to sub-domains, there may be any number of characters and dots preceding the @ sign. The first of &lt;br /&gt;&lt;br /&gt;these expressions says that any word character displayed one or more times can then be followed by a &lt;br /&gt;&lt;br /&gt;dot, then any number of word characters displayed zero or more times, followed by the @ symbol, followed &lt;br /&gt;&lt;br /&gt;by any word character displayed one or more times, followed by a dot and two or three word characters &lt;br /&gt;&lt;br /&gt;repeated at least once but no more than twice, so email addresses ending in .com or .co.uk will pass, &lt;br /&gt;&lt;br /&gt;whereas .co.uk.com would fail.  Similarly, the URL may begin with either http://www. or https://www. or &lt;br /&gt;&lt;br /&gt;ftp://www. or just www. once followed by any word character one or more times, followed by a dot and any &lt;br /&gt;&lt;br /&gt;number of word characters at least once but no more than twice. &lt;br /&gt;&lt;br /&gt;Finally, the date of birth check allows dates in the format dd/mm/yyyy or dd-mm-yyyy, both formats being &lt;br /&gt;&lt;br /&gt;equally as popular:&lt;br /&gt;&lt;br /&gt;var dobRegxp = /^([0-9]){2}(\/|-){1}([0-9]){2}(\/|-)&lt;br /&gt;([0-9]){4}$/;&lt;br /&gt;&lt;script language="JavaScript"&gt;&lt;br /&gt;function onlyNumbers(evt)&lt;br /&gt;{&lt;br /&gt; var e = event || evt; // for trans-browser compatibility&lt;br /&gt; var charCode = e.which || e.keyCode;&lt;br /&gt;&lt;br /&gt; if (charCode &gt; 31 &amp;&amp; (charCode &lt; 48 || charCode &gt; 57))&lt;br /&gt;  return false;&lt;br /&gt;&lt;br /&gt; return true;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;function noAlpha(obj){&lt;br /&gt; reg = /[^0-9.,]/g;&lt;br /&gt; obj.value =  obj.value.replace(reg,"");&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;onkeydown event of the textbox(reg expression for containing only one decimal number)&lt;br /&gt;&lt;br /&gt;function checkIsNum(){&lt;br /&gt;var y = document.form1.txtSubject.value;&lt;br /&gt;var filter = [0-9]*\.?[0-9]*;&lt;br /&gt;if (!filter.test(y)) document.form1.txtSubject.length -=1;&lt;br /&gt;if(filter.indexOf('.')!=-1) document.form1.txtSubject.length --;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function isValidNumAlpha()&lt;br /&gt;{&lt;br /&gt; var c= event.keyCode;&lt;br /&gt;        event.keyCode=(!((c&gt;=65 &amp;&amp; c&lt;=90)||(c&gt;=97 &amp;&amp; c&lt;=122)|| (c==32)|| (c&gt;=48 &amp;&amp; c&lt;=57)                &lt;br /&gt;&lt;br /&gt; ))?0:event.keyCode;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function alphaNumWithoutSpace(text)&lt;br /&gt;{ &lt;br /&gt;var c= event.keyCode;&lt;br /&gt; event.keyCode=(!((c&gt;=65 &amp;&amp; c&lt;=90)||(c&gt;=97 &amp;&amp; c&lt;=122)||(c&gt;=48 &amp;&amp; c&lt;=57)                       &lt;br /&gt;&lt;br /&gt;))?0:event.keyCode;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;SCRIPT TYPE="text/javascript"&gt;&lt;br /&gt;&lt;!--&lt;br /&gt;// copyright 1999 Idocs, Inc. http://www.idocs.com&lt;br /&gt;// Distribute this script freely but keep this notice in place&lt;br /&gt;function letternumber(e)&lt;br /&gt;{&lt;br /&gt;var key;&lt;br /&gt;var keychar;&lt;br /&gt;&lt;br /&gt;if (window.event)&lt;br /&gt;   key = window.event.keyCode;&lt;br /&gt;else if (e)&lt;br /&gt;   key = e.which;&lt;br /&gt;else&lt;br /&gt;   return true;&lt;br /&gt;keychar = String.fromCharCode(key);&lt;br /&gt;keychar = keychar.toLowerCase();&lt;br /&gt;&lt;br /&gt;// control keys&lt;br /&gt;if ((key==null) || (key==0) || (key==8) || &lt;br /&gt;    (key==9) || (key==13) || (key==27) )&lt;br /&gt;   return true;&lt;br /&gt;&lt;br /&gt;// alphas and numbers&lt;br /&gt;else if ((("abcdefghijklmnopqrstuvwxyz0123456789").indexOf(keychar) &gt; -1))&lt;br /&gt;   return true;&lt;br /&gt;else&lt;br /&gt;   return false;&lt;br /&gt;}&lt;br /&gt;//--&gt;&lt;br /&gt;&lt;/SCRIPT&gt;&lt;br /&gt;&lt;br /&gt;/^[\da-z]+$/i   // Only alphanumeric&lt;br /&gt;/[a-z]/i        // At least one letter&lt;br /&gt;/\d/            // At least one number&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-4160047698360023674?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/4160047698360023674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/regular-expression-in-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4160047698360023674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4160047698360023674'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/regular-expression-in-javascript.html' title='Regular expression in the javascript.....'/><author><name>sandhya</name><uri>http://www.blogger.com/profile/07761896057654605938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-4965439148561701246</id><published>2008-12-03T09:06:00.004-05:00</published><updated>2008-12-10T00:32:25.342-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><title type='text'>How to bind dropdownlist using ajax?</title><content type='html'>Refer the below link&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.codeproject.com/KB/cpp/ASPNet_Ajax.aspx"&gt;http://www.codeproject.com/KB/cpp/ASPNet_Ajax.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-4965439148561701246?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/4965439148561701246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/how-to-bind-dropdownlist-using-ajax.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4965439148561701246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4965439148561701246'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/how-to-bind-dropdownlist-using-ajax.html' title='How to bind dropdownlist using ajax?'/><author><name>sandhya</name><uri>http://www.blogger.com/profile/07761896057654605938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-5183803030041432982</id><published>2008-12-03T07:55:00.003-05:00</published><updated>2008-12-10T00:32:38.577-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>How to bind the value in drop down list in silverlight page from aspx page?</title><content type='html'>&amp;lt;script language="javascript" type="text/javascript"&amp;gt;&lt;br /&gt;    function SelectionChanged(ddl) {&lt;br /&gt;        var sl = document.getElementById("Xaml1");&lt;br /&gt;        if (sl != null) {&lt;br /&gt;            sl.Content.SLapp.SLMethod(ddl.options[ddl.selectedIndex].value);&lt;br /&gt;        } &lt;br /&gt;    }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:DropDownList ID="DropDownList1" runat="server" onChange="SelectionChanged(this)"&amp;gt;&lt;br /&gt;    &amp;lt;asp:ListItem Text="Item 1" Value="Value 1" /&amp;gt;&lt;br /&gt;    &amp;lt;asp:ListItem Text="Item 2" Value="Value 2" /&amp;gt;&lt;br /&gt;    &amp;lt;asp:ListItem Text="Item 3" Value="Value 3" /&amp;gt;&lt;br /&gt;&amp;lt;/asp:DropDownList&amp;gt;&lt;br /&gt;&amp;lt;asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/TestSilverlight.xap"&lt;br /&gt;    MinimumVersion="2.0.30523" Width="100%" Height="100%" /&amp;gt;  &lt;br /&gt;&lt;br /&gt;You can create your ListItem dynamically for the value I guess. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And Page.xaml.cs (with a TextBlock named text)&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;[ScriptableType] &lt;br /&gt;public partial class Page : UserControl&lt;br /&gt;{&lt;br /&gt;    public Page()&lt;br /&gt;    {&lt;br /&gt;        InitializeComponent();&lt;br /&gt;        HtmlPage.RegisterScriptableObject("SLapp", this);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    [ScriptableMember]&lt;br /&gt;    public void SLMethod(string name)&lt;br /&gt;    {&lt;br /&gt;        text.Text = name;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-5183803030041432982?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/5183803030041432982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/how-to-bind-value-in-drop-down-list-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5183803030041432982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/5183803030041432982'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/how-to-bind-value-in-drop-down-list-in.html' title='How to bind the value in drop down list in silverlight page from aspx page?'/><author><name>sandhya</name><uri>http://www.blogger.com/profile/07761896057654605938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-4126993236599197832</id><published>2008-12-03T07:34:00.005-05:00</published><updated>2008-12-08T05:04:21.345-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>Brief About LINQ</title><content type='html'>refer the following link:&lt;br /&gt;&lt;br /&gt;    &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-4126993236599197832?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/4126993236599197832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/brief-about-linq.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4126993236599197832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4126993236599197832'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/brief-about-linq.html' title='Brief About LINQ'/><author><name>sandhya</name><uri>http://www.blogger.com/profile/07761896057654605938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-8648066873488635054</id><published>2008-12-01T13:46:00.001-05:00</published><updated>2008-12-01T13:49:54.326-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>On client machine, Silverlight application executes in</title><content type='html'>1. Isolated storage are &lt;br /&gt;2. Secured internet zone&lt;br /&gt;3. Sandbox model &lt;br /&gt;4. Unsecured model&lt;br /&gt;&lt;br /&gt;Ans: 1&lt;br /&gt;Silverlight executes in an isolated environment on the client machine, hence Silverlight does not include code access security (CAS) features or enterprise-level security features.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-8648066873488635054?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/8648066873488635054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/on-client-machine-silverlight.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/8648066873488635054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/8648066873488635054'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/on-client-machine-silverlight.html' title='On client machine, Silverlight application executes in'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-4126640517723138503</id><published>2008-12-01T13:38:00.002-05:00</published><updated>2008-12-01T13:45:16.478-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight light supports</title><content type='html'>1. Vector Graphic &lt;br /&gt;2. Scalar Graphic&lt;br /&gt;3. Both of the above &lt;br /&gt;4. None of the above&lt;br /&gt;&lt;br /&gt;Ans: 1&lt;br /&gt;Silverlight supports Vector Graphic format.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-4126640517723138503?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/4126640517723138503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/silverlight-light-supports.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4126640517723138503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4126640517723138503'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/silverlight-light-supports.html' title='Silverlight light supports'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-1425237363388788493</id><published>2008-12-01T13:34:00.001-05:00</published><updated>2008-12-01T13:38:05.378-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Differences between Silverlight and Flash/Flex</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 11px; "&gt;&lt;table class="MsoNormalTable" cellpadding="0" cellspacing="0" style="border-top-width: medium; border-right-width: medium; border-bottom-width: medium; border-left-width: medium; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-color: initial; border-collapse: collapse; "&gt;&lt;tbody&gt;&lt;tr style="height: 26.5pt; page-break-inside: avoid; "&gt;&lt;td style="border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 26.5pt; "&gt;&lt;p class="MsoNormal" align="center" style="margin-top: 6pt; margin-right: 0in; margin-bottom: 6pt; margin-left: 0in; line-height: normal; text-align: center; "&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 26.5pt; "&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td colspan="2" style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 6.65in; "&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight Limitations:&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;p&gt;Now, we got moonlight for Linux user &lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;This limitation doesn’t exist with Flash.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight will (naturally) be using the WMV and Silverlight will add to the use of the WMV file format. Using the WMV video format essentially makes Silverlight useless for the vast majority of video websites such as YouTube. It cannot play .avi and .mov file.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash Video turned Flash into a mechanism for delivering media with far more potential than any other solution that is .flv, no doubt Flash has also limitation to play other video file. For that Flash required codex for that player installed on Client machine.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;p&gt;Now, we are able to read the data from web services (including RESTful service), XML from URL. Silverlight 2 supports Socket communication too. &lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Even flash is also lacking this area. Flash can read data source in terms of XML or text from some URL and can use it. Same thing silverlight also can read.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;p&gt;The standard controls are included in Silverlight 2 beta1. &lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash has rich set of control library.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;p&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Once the accessibility features are provided with Silverlight versions, any existing test tools that support driving UI through Accessibility will be fully enabled to automate Silverlight applications&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Edit&lt;/b&gt;: I'm not sure about this but I don't think that we can't automate the UI. I think Windows Hooking will do. &lt;/p&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash test tools are already in place.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight 1.0 does not support GIF-file format. Even it doesn’t support BMP and other file format. It supports only JPG and PNG file format.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Support all image formats.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Can’t do sound processing.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;With some media file sound processing can possible.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;p&gt;Silverlight 2 supports Socket communication too. &lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash allows creating XML Socket object.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Per pixel bitmap editing, bitmap filters (convolution, color matrix, etc), bitmap effects (drop shadow, blur, glow) cannot be done.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Can do that.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Webcam and Microphone support it not there.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;p&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash supports it.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Built in file upload/download support is not available.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Inbuilt Upload/download support is there.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.1pt; page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;The performance of Silverlight and Flash will be &lt;b&gt;nearly the same&lt;/b&gt;. While Silverlight is using XAML as description language in a non-compressed format size of Silverlight component is large.&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;In practical implementation of similar component in Flash and Silverlight it has found that size of Silverlight component is approximately 10-20 times larger than Flash component.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Size of flash component is smaller.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.1pt; page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;p&gt;We got .xap now. but there are a number of people who like to get XAML with managed code. (SL 1.1 Alpha style)&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash ships in single component that is .swf. Images/video/sounds also incorporated in single .swf package.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.1pt; page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;It has found in practical implementation of image animation, at some extent flickering occurs on image.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;To avoid this type of flickering in flash, refresh layout or cache bitmap functionalities are available.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.1pt; page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;It has found in practical implementation of video play, audio may start playing before showing movie on screen. It has also found video can still continue to play after redirecting to other page. It may be it is bug of current beta release.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash doesn’t face these types of issues.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.1pt; page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;p&gt;XPF or XBAP is already there for that.  &lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash can be played as Windows application also by downloading player for it. Flash can be also packaged as .exe which can be deploying standalone.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 12.1pt; page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight is new in market and required time to get acceptance in market.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; height: 12.1pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash is exist from many years and have strong acceptance in market.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td colspan="2" style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 6.65in; "&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight Feature comparison with Flash Features:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Animation - Silverlight supports the WPF animation model, which is not only time based instead of frame based, but lets you define the start and end conditions and it will figure out how to get there for you. No need to deal with matrixes like in flash. Also no need to calculate positions on various frames. It just works. &lt;span style="color: black; "&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;The animation model is frame based.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight uses XAML. XAML is text based and can be output using a simple XML object.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash stores its shapes using binary shape records. In order to write shape definitions, you will need to either license a 3&lt;sup&gt;rd&lt;/sup&gt; party Flash file format SDK, or build your own. It isn’t too difficult, but it does require a bit of a learning curve.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;The debugging with Silverlight is simpler than with flash.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;The debugging with flash is harder than Silverlight.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;p&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight lets you embed true type font information directly into your projects, and download that information with the webclient object.&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;&lt;span&gt;downloader is no longer available but we have webclient.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Dealing with fonts is fairly complex with flash.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;p&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Rich set of development languages are available for Silverlight. Developer can use JavaScript as well as managed code VB.Net, C# for Silverlight development.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Edit: &lt;/b&gt;The dynamic languages (IronPython, IronRuby, and Managed JScript)  are supported too.&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Only Action Script can be used as programming tool in Flash.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;XAML is declarative while ActionScript is imperative. Using imperative languages to build UIs goes back to the early days of DOS and Windows, when developers had to manage all of the API nuances when interacting with graphical panes.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;ActionScript is an imperative language, which brings itself the pitfalls of imperative languages when compared with declarative languages.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Web Services support for Silverlight Streaming:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;The services provided by Microsoft, called Silverlight Streaming, it allows users and developers to host their Silverlight content and apps with Microsoft, taking advantage of their extensive global network of datacenters and their content delivery network. Best of all, this service is free, and while currently it is only in alpha it allows users to upload up to 4GB of content, and to stream up to 1 million minutes of online video delivery at 700kbps, around DVD quality. Starting right now, you can build a total video content site using Silverlight at no cost. The future for this service looks good as they will incorporate Silverlight Streaming with the MSN Video ad network to allow you to easily monetize your video streams and participate in a revenue sharing opportunity with Microsoft while removing your distribution costs. There will also be a premium level of content delivery where you will be able to pay for higher levels of usage - the cost for this service is as yet unknown but expect it to be very low.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;There is not any such service provided by Flash to host the content and application with them. Because of the absence of any such service, building a video site based on Flash is not as cost effective as building a video content site using Silverlight. &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Moreover, because of the Silverlight Streaming service, the existing Video Content sites might be moving to Silverlight site.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Additional Support for mobile devices with desktop and desktop browsers:&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight is supported by Windows mobile device as part of a new service that the NBL have built. Silverlight applications and media streaming can be run on a mobile phone - so Silverlight even at this stage is about more than just the desktop browser and desktop market.&lt;span&gt;  &lt;/span&gt;Silverlight may be seen soon on the Symbian OS too.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash is not spread as across the vast majority of both desktops and mobiles platforms, as compared to Silverlight. Flash requires Flash Lite preinstalled on mobile devices.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight does not require video codec to run industry standard videos like .WMV&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash requires video codec to run .WMV videos.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight supports scalable video formats from HD to mobile.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash does not support scalable video formats from HD to mobile&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight supports Hardware-assisted editing and encoding solutions.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash does not support Hardware-assisted editing and encoding solutions.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;p&gt;Edit: Now, we lost it. AFAIK, We have to use  *.xap if we want to use managed code. .xap is just a zip but not plain text anyway.&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash does not have XAML based presentation layer for SEO.&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight provides End-to-end server and application platform.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash does not provide End-to-end server and application platform.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Media server licensing is cheaper than flash.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Media server licensing is costlier than Silverlight.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="page-break-inside: avoid; "&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Silverlight supports Scalable full screen video.&lt;/span&gt;&lt;/td&gt;&lt;td style="border-top-style: none; border-right-style: solid; border-bottom-style: solid; border-left-style: none; border-top-width: medium; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: medium; padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt; width: 239.4pt; background-color: transparent; "&gt;&lt;span style="font-size: 10pt; font-family: Arial, sans-serif; "&gt;Flash does not support Scalable full screen video.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Forum discussion &lt;a href="http://silverlight.net/forums/t/3015.aspx"&gt;http://silverlight.net/forums/t/3015.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-1425237363388788493?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/1425237363388788493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/differences-between-silverlight-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1425237363388788493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1425237363388788493'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/differences-between-silverlight-and.html' title='Differences between Silverlight and Flash/Flex'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2628431542623997699</id><published>2008-12-01T13:33:00.000-05:00</published><updated>2008-12-01T13:34:53.430-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight supported image format?</title><content type='html'>1. GIF &lt;br /&gt;2. CLP&lt;br /&gt;3. PNG &lt;br /&gt;4. BMP&lt;br /&gt;&lt;br /&gt;Ans: 4&lt;br /&gt;&lt;br /&gt;Silverlight supports PNG and JPEG image formats.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2628431542623997699?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2628431542623997699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/silverlight-supported-image-format.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2628431542623997699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2628431542623997699'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/silverlight-supported-image-format.html' title='Silverlight supported image format?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-466251243244849719</id><published>2008-12-01T07:20:00.001-05:00</published><updated>2008-12-01T07:26:49.837-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Adding HTML controls dynamically through JavaScript and Accessing them in Code behind page(.cs)</title><content type='html'>Foradding HTML controls dynamically through JavaScript and Accessing them in backend code&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;&lt;br /&gt;        &amp;lt;div&amp;gt;&lt;br /&gt;            &amp;lt;asp:GridView ID="GridView1" runat="server"&amp;gt;&lt;br /&gt;            &amp;lt;/asp:GridView&amp;gt;&lt;br /&gt;            &amp;lt;div id="myDiv"&amp;gt;&lt;br /&gt;            &amp;lt;/div&amp;gt;&lt;br /&gt;            &amp;lt;input type="button" id="btnOfficial" value="Add Another TextBox" onclick="addHTMLControl();" /&amp;gt;&lt;br /&gt;            &amp;lt;input type="hidden" value="1" id="theValue" runat="server" /&amp;gt;&lt;br /&gt;            &amp;lt;asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Show All in Grid" /&amp;gt;&lt;br /&gt;        &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;On button click just call the below Javascript function where we are creating new HTML element and appending into DIV.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;function addHTMLControl() {&lt;br /&gt;    var ni = document.getElementById("myDiv");&lt;br /&gt;    &lt;br /&gt;    var numi = document.getElementById("theValue");     &lt;br /&gt;    var num = (document.getElementById("theValue").value -1)+2;&lt;br /&gt;    numi.value = num;&lt;br /&gt;    var newdiv = document.createElement("div");&lt;br /&gt;    var divIdName = "my"+num+"Div";&lt;br /&gt;    newdiv.setAttribute("id",divIdName);&lt;br /&gt;    newdiv.innerHTML = "&amp;lt;input type='text'  name='TextBox"+num+"' value='TextBox"+num+"' &amp;gt;";&lt;br /&gt;    ni.appendChild(newdiv);&lt;br /&gt;  } &lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We form new HTML textbox control and append to DIV. Not here that we are using appendChild method for appending new element but not innerHTML.&lt;br /&gt;&lt;br /&gt;In Code behind to access the dynamically generated HTML Controls do the following (Using Request.Form)&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;&lt;br /&gt;   protected void btnSave_Click(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        ArrayList alForm = new ArrayList();&lt;br /&gt;        //As textbox id started with 2 like TextBox2,TextBox3…..&lt;br /&gt;        for (int i = 2; i &lt; Request.Form.Count - 2; i++)&lt;br /&gt;        {&lt;br /&gt;            string strId = "TextBox" + i.ToString();&lt;br /&gt;            string strValue = Request.Form[strId].ToString();&lt;br /&gt;            alForm.Add(strValue);&lt;br /&gt;            strValue = "";&lt;br /&gt;        }&lt;br /&gt;        //Bind all textbox values to GridView.&lt;br /&gt;        GridView1.DataSource = alForm;&lt;br /&gt;        GridView1.DataBind();&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-466251243244849719?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/466251243244849719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/12/adding-html-controls-dynamically.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/466251243244849719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/466251243244849719'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/12/adding-html-controls-dynamically.html' title='Adding HTML controls dynamically through JavaScript and Accessing them in Code behind page(.cs)'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-2197255580693865462</id><published>2008-11-26T07:43:00.002-05:00</published><updated>2008-11-26T07:49:03.385-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>Creating a LINQ query does not actually execute the query till the query is first enumerated when the application executes. This is known as:</title><content type='html'>1. Deferred Evaluation&lt;br /&gt;2. Loop Evaluation&lt;br /&gt;3. Slow Evaluation&lt;br /&gt;4. Waiting Evaluation&lt;br /&gt;&lt;br /&gt;Ans: 1&lt;br /&gt;&lt;br /&gt;Deferred execution means that the evaluation of an expression is delayed until its realized value is actually required. Deferred execution can greatly improve performance when you have to manipulate large data collections, especially in programs that contain a series of chained queries or manipulations. In the best case, deferred execution enables only a single iteration through the source collection.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb943859.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb943859.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-2197255580693865462?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/2197255580693865462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/creating-linq-query-does-not-actually.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2197255580693865462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/2197255580693865462'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/creating-linq-query-does-not-actually.html' title='Creating a LINQ query does not actually execute the query till the query is first enumerated when the application executes. This is known as:'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-6447738221520921275</id><published>2008-11-26T07:35:00.002-05:00</published><updated>2008-11-26T07:42:52.603-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>LINQ to XML provides a powerful way of creating new XML data structures in a single statement referred as:</title><content type='html'>LINQ to XML provides a powerful way of creating new XML data structures in a single &lt;br /&gt;&lt;br /&gt;statement referred to as &lt;span style="font-weight:bold;"&gt;Functional Construction.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;And The main class used for this is &lt;span style="font-weight:bold;"&gt;XElement&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In object oriented programming when you create object graphs, and correspondingly in W3C DOM, when creating an XML tree, you build up the XML tree in a bottom-up manner. For example using XmlDocument (the DOM implementation from Microsoft) this would be a typical way to create an XML tree.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;&lt;br /&gt;&lt;br /&gt;XmlDocument doc = new XmlDocument();&lt;br /&gt;XmlElement name = doc.CreateElement("name");&lt;br /&gt;name.InnerText = "Patrick Hines";&lt;br /&gt;XmlElement phone1 = doc.CreateElement("phone");&lt;br /&gt;phone1.SetAttribute("type", "home");&lt;br /&gt;phone1.InnerText = "206-555-0144";        &lt;br /&gt;XmlElement phone2 = doc.CreateElement("phone");&lt;br /&gt;phone2.SetAttribute("type", "work");&lt;br /&gt;phone2.InnerText = "425-555-0145";        &lt;br /&gt;XmlElement street1 = doc.CreateElement("street1");        &lt;br /&gt;street1.InnerText = "123 Main St";&lt;br /&gt;XmlElement city = doc.CreateElement("city");&lt;br /&gt;city.InnerText = "Mercer Island";&lt;br /&gt;XmlElement state = doc.CreateElement("state");&lt;br /&gt;state.InnerText = "WA";&lt;br /&gt;XmlElement postal = doc.CreateElement("postal");&lt;br /&gt;postal.InnerText = "68042";&lt;br /&gt;XmlElement address = doc.CreateElement("address");&lt;br /&gt;address.AppendChild(street1);&lt;br /&gt;address.AppendChild(city);&lt;br /&gt;address.AppendChild(state);&lt;br /&gt;address.AppendChild(postal);&lt;br /&gt;XmlElement contact = doc.CreateElement("contact");&lt;br /&gt;contact.AppendChild(name);&lt;br /&gt;contact.AppendChild(phone1);&lt;br /&gt;contact.AppendChild(phone2);&lt;br /&gt;contact.AppendChild(address);&lt;br /&gt;XmlElement contacts = doc.CreateElement("contacts");&lt;br /&gt;contacts.AppendChild(contact);&lt;br /&gt;doc.AppendChild(contacts);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This style of coding provides few clues to the structure of the XML tree. LINQ to XML supports this approach to constructing an XML tree but also supports an alternative approach referred to as functional construction. Here is how you would construct the same XML tree by using LINQ to XML functional construction.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;&lt;br /&gt;XElement contacts =&lt;br /&gt;   new XElement("contacts",&lt;br /&gt;      new XElement("contact",&lt;br /&gt;         new XElement("name", "Patrick Hines"),&lt;br /&gt;         new XElement("phone", "206-555-0144", &lt;br /&gt;             new XAttribute("type", "home")),&lt;br /&gt;         new XElement("phone", "425-555-0145",&lt;br /&gt;             new XAttribute("type", "work")),&lt;br /&gt;         new XElement("address",&lt;br /&gt;            new XElement("street1", "123 Main St"),&lt;br /&gt;            new XElement("city", "Mercer Island"),&lt;br /&gt;            new XElement("state", "WA"),&lt;br /&gt;            new XElement("postal", "68042")&lt;br /&gt;         )&lt;br /&gt;      )&lt;br /&gt;   );&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;By indenting (and squinting a bit) the code to construct the XML tree shows the structure of the underlying XML.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-6447738221520921275?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/6447738221520921275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/linq-to-xml-provides-powerful-way-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6447738221520921275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6447738221520921275'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/linq-to-xml-provides-powerful-way-of.html' title='LINQ to XML provides a powerful way of creating new XML data structures in a single statement referred as:'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-4483913077024627121</id><published>2008-11-26T07:32:00.001-05:00</published><updated>2008-11-26T07:34:51.653-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>Which C# language enhancements are used by LINQ?</title><content type='html'>1. Lambda Expressions&lt;br /&gt;2. Extension Methods&lt;br /&gt;3. Anonymous Object Initialization&lt;br /&gt;4. All of the above&lt;br /&gt;&lt;br /&gt;Ans: 1&lt;br /&gt;&lt;a href="http://dotnet-interviews.blogspot.com/2008/10/lamda-expressions-in-c.html"&gt;http://dotnet-interviews.blogspot.com/2008/10/lamda-expressions-in-c.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-4483913077024627121?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/4483913077024627121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/which-c-language-enhancements-are-used.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4483913077024627121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4483913077024627121'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/which-c-language-enhancements-are-used.html' title='Which C# language enhancements are used by LINQ?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-13338824050096417</id><published>2008-11-26T07:20:00.001-05:00</published><updated>2008-11-26T07:32:03.519-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>LINQ queries can be applied to any collection that implements which interface?</title><content type='html'>1. ILinqQueryable&lt;T&gt;&lt;br /&gt;2. ILinqSortable&lt;T&gt;&lt;br /&gt;3. IEnumerable&lt;T&gt;&lt;br /&gt;4. ICollection&lt;T&gt;&lt;br /&gt;&lt;br /&gt;Ans: 3&lt;br /&gt;We can write LINQ queries in Visual Basic or C# with SQL Server databases, XML documents, ADO.NET Datasets, and any collection of objects that supports IEnumerable or the generic IEnumerable(T) interface. LINQ support for the ADO.NET Entity Framework is also planned, and LINQ providers are being written by third parties for many Web services and other database implementations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-13338824050096417?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/13338824050096417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/linq-queries-can-be-applied-to-any.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/13338824050096417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/13338824050096417'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/linq-queries-can-be-applied-to-any.html' title='LINQ queries can be applied to any collection that implements which interface?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-7073474318333581081</id><published>2008-11-26T06:55:00.000-05:00</published><updated>2008-11-26T06:57:47.482-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework 3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight 2 is part of which version of .NET Framework?</title><content type='html'>1. .NET 2.0&lt;br /&gt;2. .NET 3.0&lt;br /&gt;3. .NET 3.5&lt;br /&gt;4. Silverlight is independent of the .NET Framework and has its own implementation of &lt;br /&gt;the CLR.&lt;br /&gt;&lt;br /&gt;Ans: 4&lt;br /&gt;&lt;br /&gt;"First Look at Silverlight 2"&lt;br /&gt;http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-7073474318333581081?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/7073474318333581081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/silverlight-2-is-part-of-which-version.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7073474318333581081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7073474318333581081'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/silverlight-2-is-part-of-which-version.html' title='Silverlight 2 is part of which version of .NET Framework?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3911874121880897781</id><published>2008-11-26T06:52:00.003-05:00</published><updated>2008-11-26T06:55:52.266-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MVC Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 3.5'/><title type='text'>The framework in ASP.NET to clearly separate the presentation from the data model and have different views loaded based on user requirements is:</title><content type='html'>1. ASP.NET MVC Framework&lt;br /&gt;2. ASP.NET Dynamic Viewer&lt;br /&gt;3. ASP.NET ViewFinder&lt;br /&gt;4. Flexi-ASP.NET&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ans: 1&lt;br /&gt;The Framework allows easier adoption of the different MVC patterns in our web applications. Wait for sample projects on MVC Framework on this site.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-3911874121880897781?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/3911874121880897781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/framework-in-aspnet-to-clearly-separate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3911874121880897781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3911874121880897781'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/framework-in-aspnet-to-clearly-separate.html' title='The framework in ASP.NET to clearly separate the presentation from the data model and have different views loaded based on user requirements is:'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-7839280453929958012</id><published>2008-11-26T06:45:00.001-05:00</published><updated>2008-11-26T06:52:01.474-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework 3.5'/><title type='text'>The primary CLR major version in .NET Framework 3.5 SP1 is?</title><content type='html'>1. Version 1&lt;br /&gt;2. Version 1.1&lt;br /&gt;3. Version 2&lt;br /&gt;4. Version 3&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ans: 3&lt;br /&gt;&lt;br /&gt;Version of CLR is not changed from .NET Framework 2.0 - 3.0 - 3.5 all runs on Common Language Runtime (CLR) version 2.0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-7839280453929958012?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/7839280453929958012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/primary-clr-major-version-in-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7839280453929958012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/7839280453929958012'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/primary-clr-major-version-in-net.html' title='The primary CLR major version in .NET Framework 3.5 SP1 is?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-1725291162159325395</id><published>2008-11-26T06:14:00.002-05:00</published><updated>2008-11-26T06:44:57.263-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework 3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Which component of .NET Framework can be used to build RESTful services?</title><content type='html'>1. Windows Communication Foundation&lt;br /&gt;2. Powershell&lt;br /&gt;3. Microsoft REST Framework&lt;br /&gt;4. LINQ&lt;br /&gt;&lt;br /&gt;Ans: 1&lt;br /&gt;In the .NET Framework 3.5, WCF added support for REST-style communications. Developers can specify URL Templates on Operation Contracts, to allow methods to be invoked when requests on specific URLs are received. Parameters from the URLs can be automatically extracted and passed to the method. JSON and plain-old-XML data serialization is supported, as well as alternative mechanisms for binary return types (such as JPG).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-1725291162159325395?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/1725291162159325395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/which-component-of-net-framework-can-be.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1725291162159325395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1725291162159325395'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/which-component-of-net-framework-can-be.html' title='Which component of .NET Framework can be used to build RESTful services?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-6165846133098304770</id><published>2008-11-25T07:47:00.001-05:00</published><updated>2008-11-25T07:49:01.122-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADO.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 3.5'/><title type='text'>An easy way to build data access logic and expose data to AJAX applications available in ASP.NET 3.5 is?</title><content type='html'>1. ADO.NET Data Services  &lt;br /&gt;2. ASP.NET Data Services  &lt;br /&gt;3. ADP.NET Data Services  &lt;br /&gt;4. None of the above  &lt;br /&gt;&lt;br /&gt;Ans: 1&lt;br /&gt;ADO.NET Data Services provide new services that find, manipulate and deliver data over the web using simple URIs. Benefits include an easy and flexible way to access data over the web, while enabling the separation of presentation and data access code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-6165846133098304770?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/6165846133098304770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/easy-way-to-build-data-access-logic-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6165846133098304770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/6165846133098304770'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/easy-way-to-build-data-access-logic-and.html' title='An easy way to build data access logic and expose data to AJAX applications available in ASP.NET 3.5 is?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3694035953153456488</id><published>2008-11-25T07:26:00.003-05:00</published><updated>2008-11-25T07:46:39.727-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 3.5'/><title type='text'>A new feature in ASP.NET AJAX 3.5 to improve the performance of JavaScript when multiple AJAX controls are used is called.</title><content type='html'>1. Script Optimizer  &lt;br /&gt;2. Script Combining  &lt;br /&gt;3. Script Merging  &lt;br /&gt;4. Script Enhancements  &lt;br /&gt;&lt;br /&gt;Ans: 2 (Script combining using ScriptProfiler)&lt;br /&gt;The ASP.NET AJAX script combining feature improves the performance of AJAX applications by reducing the number of scripts that have to be individually downloaded to the browser.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-3694035953153456488?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/3694035953153456488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/new-feature-in-aspnet-ajax-35-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3694035953153456488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3694035953153456488'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/new-feature-in-aspnet-ajax-35-to.html' title='A new feature in ASP.NET AJAX 3.5 to improve the performance of JavaScript when multiple AJAX controls are used is called.'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-4350768251554037340</id><published>2008-11-25T07:24:00.001-05:00</published><updated>2008-11-25T07:47:26.548-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 3.5'/><title type='text'>Which of the following is a new feature in ASP.NET AJAX 3.5?</title><content type='html'>1. Controlling brower back button and history behavior  &lt;br /&gt;2. Controlling browser refresh behavior  &lt;br /&gt;3. Controlling browser shutdown behavior  &lt;br /&gt;4. Controlling file upload behavior  &lt;br /&gt;&lt;br /&gt;Ans: 1&lt;br /&gt;ASP.NET AJAX history provides support for navigating within an AJAX application by using the Forward and Back buttons in the browser.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-4350768251554037340?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/4350768251554037340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/which-of-following-is-new-feature-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4350768251554037340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/4350768251554037340'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/which-of-following-is-new-feature-in.html' title='Which of the following is a new feature in ASP.NET AJAX 3.5?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-733119826314742947</id><published>2008-11-25T07:16:00.001-05:00</published><updated>2008-11-25T07:24:11.730-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 3.5'/><title type='text'>What is the new control in ASP.NET 3.5 Extensions Preview that automatically builds a Silverlight video player?</title><content type='html'>1. SLVideoPlayer  &lt;br /&gt;2. MediaPlayer  &lt;br /&gt;3. VideoPlayer  &lt;br /&gt;4. AJAXPlayer &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ans: MediaPlayer&lt;br /&gt;&lt;br /&gt;The Silverlight 2 Software Development Kit (SDK) includes two ASP.NET server controls, the MediaPlayer control, and the Silverlight control. These controls enable Silverlight content to be embedded in an ASP.NET Web page. The ASP.NET MediaPlayer control lets you integrate media sources such as audio (WMA) and video (WMV) into a Web site, without requiring any knowledge of XAML or JavaScript. The ASP.NET Silverlight control enables you to integrate XAML and any supporting code (a managed-code assembly, a managed dynamic-language script module, or client JavaScript libraries) into a Web site. Unlike the MediaPlayer server control, the Silverlight server control is generic and is not designed only to manage media files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-733119826314742947?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/733119826314742947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/what-is-new-control-in-aspnet-35.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/733119826314742947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/733119826314742947'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/what-is-new-control-in-aspnet-35.html' title='What is the new control in ASP.NET 3.5 Extensions Preview that automatically builds a Silverlight video player?'/><author><name>Anil Kumar Reddy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_U6Mc_4x_N2E/SKqNCKQDnAI/AAAAAAAAAeU/p4rnFxuMuOM/S220/1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-1140656385673295272</id><published>2008-11-24T05:19:00.010-05:00</published><updated>2008-11-26T06:07:35.924-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADO.NET'/><title type='text'>What is Multiple Active Result Sets,In which scenario we will use that?</title><content type='html'>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;When we want to do more than one DML operation by using the single open connection then we have to enable the MARS(Multiple Active Result Sets). &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1.MARS allows a connection to be used for both read operations and data manipulation language (DML) operations with more than one pending operation. This feature eliminates the need for an application to deal with connection-busy errors. In addition, MARS can replace the user of server-side cursors, which generally consume more resources. Finally, because multiple operations can operate on a single connection, they can share the same transaction context, eliminating the need to use sp_getbindtoken and sp_bindsession system stored procedures.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The following Console application demonstrates how to use two SqlDataReader objects with three SqlCommand objects and a single SqlConnection object with MARS enabled. The first command object retrieves a list of vendors whose credit rating is 5. The second command object uses the vendor ID provided from a SqlDataReader to load the second SqlDataReader with all of the products for the particular vendor. Each product record is visited by the second SqlDataReader. A calculation is performed to determine what the new OnOrderQty should be. The third command object is then used to update the ProductVendor table with the new value. This entire process takes place within a single transaction, which is rolled back at the end.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note &lt;/strong&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The following example uses the sample &lt;strong&gt;MARS&lt;/strong&gt; database included with SQL Server 2005. The connection string provided in the sample code assumes that the database is installed and available on the local computer. Modify the connection string as per your requirement. &lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Data.SqlClient;&lt;br /&gt;&lt;br /&gt;class Program&lt;br /&gt;{&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt;  // By default, MARS is disabled when connecting&lt;br /&gt;  // to a MARS-enabled host such as SQL Server 2005.&lt;br /&gt;  // It must be enabled in the connection string.&lt;br /&gt;  string connectionString = GetConnectionString();&lt;br /&gt;&lt;br /&gt;  SqlTransaction updateTx = null;&lt;br /&gt;  SqlCommand vendorCmd = null;&lt;br /&gt;  SqlCommand prodVendCmd = null;&lt;br /&gt;  SqlCommand updateCmd = null;&lt;br /&gt;&lt;br /&gt;  SqlDataReader prodVendReader = null;&lt;br /&gt;&lt;br /&gt;  int vendorID = 0;&lt;br /&gt;  int productID = 0;&lt;br /&gt;  int minOrderQty = 0;&lt;br /&gt;  int maxOrderQty = 0;&lt;br /&gt;  int onOrderQty = 0;&lt;br /&gt;  int recordsUpdated = 0;&lt;br /&gt;  int totalRecordsUpdated = 0;&lt;br /&gt;&lt;br /&gt;  string vendorSQL =&lt;br /&gt;      "SELECT VendorID, Name FROM Purchasing.Vendor " + &lt;br /&gt;      "WHERE CreditRating = 5";&lt;br /&gt;  string prodVendSQL =&lt;br /&gt;      "SELECT ProductID, MaxOrderQty, MinOrderQty, OnOrderQty " +&lt;br /&gt;      "FROM Purchasing.ProductVendor " + &lt;br /&gt;      "WHERE VendorID = @VendorID";&lt;br /&gt;  string updateSQL =&lt;br /&gt;      "UPDATE Purchasing.ProductVendor " + &lt;br /&gt;      "SET OnOrderQty = @OrderQty " +&lt;br /&gt;      "WHERE ProductID = @ProductID AND VendorID = @VendorID";&lt;br /&gt;&lt;br /&gt;  using (SqlConnection awConnection = &lt;br /&gt;    new SqlConnection(connectionString))&lt;br /&gt;  {&lt;br /&gt;    awConnection.Open();&lt;br /&gt;    updateTx = awConnection.BeginTransaction();&lt;br /&gt;&lt;br /&gt;    vendorCmd = new SqlCommand(vendorSQL, awConnection);&lt;br /&gt;    vendorCmd.Transaction = updateTx;&lt;br /&gt;&lt;br /&gt;    prodVendCmd = new SqlCommand(prodVendSQL, awConnection);&lt;br /&gt;    prodVendCmd.Transaction = updateTx;&lt;br /&gt;    prodVendCmd.Parameters.Add("@VendorId", SqlDbType.Int);&lt;br /&gt;&lt;br /&gt;    updateCmd = new SqlCommand(updateSQL, awConnection);&lt;br /&gt;    updateCmd.Transaction = updateTx;&lt;br /&gt;    updateCmd.Parameters.Add("@OrderQty", SqlDbType.Int);&lt;br /&gt;    updateCmd.Parameters.Add("@ProductID", SqlDbType.Int);&lt;br /&gt;    updateCmd.Parameters.Add("@VendorID", SqlDbType.Int);&lt;br /&gt;&lt;br /&gt;    using (SqlDataReader vendorReader = vendorCmd.ExecuteReader())&lt;br /&gt;    {&lt;br /&gt;      while (vendorReader.Read())&lt;br /&gt;      {&lt;br /&gt;        Console.WriteLine(vendorReader["Name"]);&lt;br /&gt;&lt;br /&gt;        vendorID = (int) vendorReader["VendorID"];&lt;br /&gt;        prodVendCmd.Parameters["@VendorID"].Value = vendorID;&lt;br /&gt;        prodVendReader = prodVendCmd.ExecuteReader();&lt;br /&gt;&lt;br /&gt;        using (prodVendReader)&lt;br /&gt;        {&lt;br /&gt;          while (prodVendReader.Read())&lt;br /&gt;          {&lt;br /&gt;            productID = (int) prodVendReader["ProductID"];&lt;br /&gt;&lt;br /&gt;            if (prodVendReader["OnOrderQty"] == DBNull.Value)&lt;br /&gt;            {&lt;br /&gt;              minOrderQty = (int) prodVendReader["MinOrderQty"];&lt;br /&gt;              onOrderQty = minOrderQty;&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;              maxOrderQty = (int) prodVendReader["MaxOrderQty"];&lt;br /&gt;              onOrderQty = (int)(maxOrderQty / 2);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            updateCmd.Parameters["@OrderQty"].Value = onOrderQty;&lt;br /&gt;            updateCmd.Parameters["@ProductID"].Value = productID;&lt;br /&gt;            updateCmd.Parameters["@VendorID"].Value = vendorID;&lt;br /&gt;&lt;br /&gt;            recordsUpdated = updateCmd.ExecuteNonQuery();&lt;br /&gt;            totalRecordsUpdated += recordsUpdated;&lt;br /&gt;          }&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;    Console.WriteLine("Total Records Updated: " + &lt;br /&gt;      totalRecordsUpdated.ToString());&lt;br /&gt;    updateTx.Rollback();&lt;br /&gt;    Console.WriteLine("Transaction Rolled Back");&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  Console.WriteLine("Press any key to continue");&lt;br /&gt;  Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;private static string GetConnectionString()&lt;br /&gt;{&lt;br /&gt;  // To avoid storing the connection string in your code,&lt;br /&gt;  // you can retrive it from a configuration file.&lt;br /&gt;  return "Data Source=(local);Integrated Security=SSPI;" + &lt;br /&gt;    "Initial Catalog=MARS;" + &lt;br /&gt;    "MultipleActiveResultSets=True";&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2.when multiple connections were used in a transactional situation, bound connections (with sp_getbindtoken and sp_bindsession) were required. The following scenarios show how to use a MARS-enabled connection instead of multiple connections.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; opens a single connection to the MARS database. Using a SqlCommand object, a SqlDataReader is created. As the reader is used, a second SqlDataReader is opened, using data from the first SqlDataReader as input to the WHERE clause for the second reader.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt;  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The following example uses the sample &lt;strong&gt;MARS&lt;/strong&gt; database included with SQL Server 2005. The connection string provided in the sample code assumes that the database is installed and available on the local computer. Modify the connection string as necessary for your environment.&lt;br /&gt; &lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Data.SqlClient;&lt;br /&gt;&lt;br /&gt;class Class1&lt;br /&gt;{&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt;  // By default, MARS is disabled when connecting&lt;br /&gt;  // to a MARS-enabled host such as SQL Server 2005.&lt;br /&gt;  // It must be enabled in the connection string.&lt;br /&gt;  string connectionString = GetConnectionString();&lt;br /&gt;&lt;br /&gt;  int vendorID;&lt;br /&gt;  SqlDataReader productReader = null;&lt;br /&gt;  string vendorSQL = &lt;br /&gt;    "SELECT VendorId, Name FROM Purchasing.Vendor";&lt;br /&gt;  string productSQL = &lt;br /&gt;    "SELECT Production.Product.Name FROM Production.Product " +&lt;br /&gt;    "INNER JOIN Purchasing.ProductVendor " +&lt;br /&gt;    "ON Production.Product.ProductID = " + &lt;br /&gt;    "Purchasing.ProductVendor.ProductID " +&lt;br /&gt;    "WHERE Purchasing.ProductVendor.VendorID = @VendorId";&lt;br /&gt;&lt;br /&gt;  using (SqlConnection awConnection = &lt;br /&gt;    new SqlConnection(connectionString))&lt;br /&gt;  {&lt;br /&gt;    SqlCommand vendorCmd = new SqlCommand(vendorSQL, awConnection);&lt;br /&gt;    SqlCommand productCmd = &lt;br /&gt;      new SqlCommand(productSQL, awConnection);&lt;br /&gt;&lt;br /&gt;    productCmd.Parameters.Add("@VendorId", SqlDbType.Int);&lt;br /&gt;&lt;br /&gt;    awConnection.Open();&lt;br /&gt;    using (SqlDataReader vendorReader = vendorCmd.ExecuteReader())&lt;br /&gt;    {&lt;br /&gt;      while (vendorReader.Read())&lt;br /&gt;      {&lt;br /&gt;        Console.WriteLine(vendorReader["Name"]);&lt;br /&gt;&lt;br /&gt;        vendorID = (int)vendorReader["VendorId"];&lt;br /&gt;&lt;br /&gt;        productCmd.Parameters["@VendorId"].Value = vendorID;&lt;br /&gt;        // The following line of code requires&lt;br /&gt;        // a MARS-enabled connection.&lt;br /&gt;        productReader = productCmd.ExecuteReader();&lt;br /&gt;        using (productReader)&lt;br /&gt;        {&lt;br /&gt;          while (productReader.Read())&lt;br /&gt;          {&lt;br /&gt;            Console.WriteLine("  " +&lt;br /&gt;              productReader["Name"].ToString());&lt;br /&gt;          }&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;      Console.WriteLine("Press any key to continue");&lt;br /&gt;      Console.ReadLine();&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  private static string GetConnectionString()&lt;br /&gt;  {&lt;br /&gt;    // To avoid storing the connection string in your code,&lt;br /&gt;    // you can retrive it from a configuration file.&lt;br /&gt;    return "Data Source=(local);Integrated Security=SSPI;" + &lt;br /&gt;      "Initial Catalog=MARS;MultipleActiveResultSets=True";&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Refer the link below for more info on MARS:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a target="_blank" href="http://dotnet.sys-con.com/node/45539"&gt;http://dotnet.sys-con.com/node/45539&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-1140656385673295272?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/1140656385673295272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/what-is-multiple-active-result-setsin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1140656385673295272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/1140656385673295272'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/what-is-multiple-active-result-setsin.html' title='What is Multiple Active Result Sets,In which scenario we will use that?'/><author><name>sandhya</name><uri>http://www.blogger.com/profile/07761896057654605938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3720132247711322023</id><published>2008-11-24T04:47:00.007-05:00</published><updated>2008-11-25T05:21:09.616-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>What is the defference between &lt;% %&gt;,&lt;%= %&gt;, &lt;%# %&gt;?</title><content type='html'>Whenever we are going to write code inside the &lt;% %&gt; then that piece of code will treated as server side code generally vbscript.&lt;br /&gt;&lt;br /&gt;when we are accessing any server side variable into the HTML(in .aspx) side then we use &lt;%= %&gt;.&lt;br /&gt;&lt;br /&gt;when we are using any binding control like repeater,gridview etc then to bind the particular column with the database value then we are using &lt;%# %&gt; when the Autogenerate column of the binding controls are &lt;strong&gt;FALSE&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;For Example:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Text='&lt;%#Eval("FirstName") %&gt;' this tag put inside the Text property of the control inside the datagrid like(textbox,label etc....)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3154678905522700970-3720132247711322023?l=interviews.dotnetthread.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviews.dotnetthread.com/feeds/3720132247711322023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://interviews.dotnetthread.com/2008/11/what-is-defference-between.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3720132247711322023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3154678905522700970/posts/default/3720132247711322023'/><link rel='alternate' type='text/html' href='http://interviews.dotnetthread.com/2008/11/what-is-defference-between.html' title='What is the defference between &amp;lt;% %&amp;gt;,&amp;lt;%= %&amp;gt;, &amp;lt;%# %&amp;gt;?'/><author><name>sandhya</name><uri>http://www.blogger.com/profile/07761896057654605938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3154678905522700970.post-3459631653031857652</id><published>2008-11-24T01:31:00.001-05:00</published><updated>2008-11-24T03:20:02.971-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Looping through CheckBoxList control.</title><content type='html'>&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;For looping through any ListControl we generally  use &lt;STRONG&gt;foreach&lt;/STRONG&gt; loop element&amp;nbsp;it to  &lt;STRONG&gt;ListItem.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;The foreach statement repeats a group of embedded  statements for each element in an array or an object collection.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Here like GriviewItem for GridView or DataListItem  for DataList we dont have CheckBoxList item for CheckBoxList object  collection.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;We need to use ListItem as element of  CheckBoxList collection.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face=Arial size=2&gt;.aspx: &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;FONT color=#0000ff size=2&gt; &lt;P&gt;&lt;STRONG&gt;&amp;lt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#800000 size=2&gt;h1&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT size=2&gt;Select your favorite  Sports&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000  size=2&gt;h1&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt; &lt;P&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000  size=2&gt;asp&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT color=#800000  size=2&gt;CheckBoxList&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000  size=2&gt;ID&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;="CheckBoxList1"&lt;/FONT&gt;&lt;FONT size=2&gt;  &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;runat&lt;/FONT&gt;&lt;FONT color=#0000ff  size=2&gt;="server"&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt; &lt;P&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000  size=2&gt;Text&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;="Cricket"&lt;/FONT&gt;&lt;FONT size=2&gt;  &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;Value&lt;/FONT&gt;&lt;FONT color=#0000ff  size=2&gt;="1"&amp;gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt; &lt;P&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000  size=2&gt;Text&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;="Tennis"&lt;/FONT&gt;&lt;FONT size=2&gt;  &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;Value&lt;/FONT&gt;&lt;FONT color=#0000ff  size=2&gt;="2"&amp;gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt; &lt;P&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000  size=2&gt;Text&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;="FootBall"&lt;/FONT&gt;&lt;FONT size=2&gt;  &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;Value&lt;/FONT&gt;&lt;FONT color=#0000ff  size=2&gt;="3"&amp;gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt; &lt;P&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000  size=2&gt;Text&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;="Table Tennis"&lt;/FONT&gt;&lt;FONT size=2&gt;  &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;Value&lt;/FONT&gt;&lt;FONT color=#0000ff  size=2&gt;="4"&amp;gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt; &lt;P&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000  size=2&gt;Text&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;="Hockey"&lt;/FONT&gt;&lt;FONT size=2&gt;  &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;Value&lt;/FONT&gt;&lt;FONT color=#0000ff  size=2&gt;="5"&amp;gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt; &lt;P&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT  color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000  size=2&gt;Text&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;="Baseball"&lt;/FONT&gt;&lt;FONT size=2&gt;  &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;Value&lt;/FONT&gt;&lt;FONT color=#0000ff  size=2&gt;="6"&amp;gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;asp&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;ListItem&lt;/FONT&gt;&lt;FONT  color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt; &lt;P&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff size=2&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000  size=2&gt;asp&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT color=#800000  size=2&gt;CheckBoxList&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;.cs:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt; &lt;P&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt; s
